/* =========================================
   SULAT KAMAY - MAIN STYLESHEET
   ========================================= */

/* 1. Core Imports */
@import 'base.css';
@import 'animations.css';
@import 'layout.css';
@import 'components.css';

/* 2. Page Specific Imports */
@import 'pages/home.css';
@import 'pages/shop.css';
@import 'pages/builder.css';
@import 'pages/about.css';

/* =========================================
   3. TOAST NOTIFICATION (Popups)
   ========================================= */
#toast-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none; /* Allows clicking through empty area */
}

.toast {
    pointer-events: auto;
    background: #3e2723;
    color: #fff;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(150%); /* Start hidden off-screen */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Playfair Display', serif;
    border-left: 4px solid #d4af37;
    min-width: 250px;
}

.toast.show { 
    transform: translateX(0); 
}

/* =========================================
   4. RECEIPT GENERATION MODAL (POS/Order Slip)
   ========================================= */

.receipt-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(20, 10, 5, 0.95); /* Deep dark overlay */
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px 0;
}

.receipt-content {
    margin: 10px auto;
    width: 90%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-bottom: 50px;
}

.modal-top-bar { text-align: center; color: #fff; margin-bottom: 10px; }
.modal-top-bar h2 { font-family: 'Playfair Display', serif; color: #d4af37; margin-bottom: 5px; }
.modal-top-bar p { font-size: 0.9rem; opacity: 0.8; }

/* --- SOURCE HTML CONTAINER --- 
   This contains the raw HTML receipts. 
   We hide it off-screen so the user doesn't see it, 
   but html2canvas can still "see" and render it. 
*/
#source-html-container {
    position: absolute;
    left: -9999px; /* Move off-screen */
    top: 0;
    pointer-events: none;
}

/* Shared Paper Style for Source */
.paper-source {
    width: 450px; /* Fixed width for consistent high-res screenshots */
    padding: 40px 30px;
    background-color: #fffdf5; 
    background-image: url('https://www.transparenttextures.com/patterns/natural-paper.png');
    margin-bottom: 50px;
    position: relative;
    box-shadow: none; /* No shadow on source to avoid artifacts */
}

/* ----------------------------------
   PAPER 1: FINANCIAL ORDER SLIP
   ---------------------------------- */
#receipt-preview {
    border-top: 5px solid #bf360c;
    border-bottom: 5px solid #bf360c;
    font-family: 'Courier New', Courier, monospace;
    color: #2c241b;
    /* Zigzag Bottom Edge */
    clip-path: polygon(
        0% 0%, 100% 0%, 100% 98%, 95% 100%, 90% 98%, 85% 100%, 80% 98%, 75% 100%, 70% 98%, 65% 100%, 60% 98%, 55% 100%, 50% 98%, 45% 100%, 40% 98%, 35% 100%, 30% 98%, 25% 100%, 20% 98%, 15% 100%, 10% 98%, 5% 100%, 0% 98%
    );
}

.receipt-header, .receipt-items, .receipt-total, .receipt-footer { text-align: center; }
.receipt-logo { width: 60px; margin-bottom: 10px; }
.receipt-title { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: bold; color: #bf360c; text-transform: uppercase; }

.receipt-meta-grid { text-align: left; font-size: 0.9rem; color: #5d4037; width: 90%; margin: 0 auto; }
.meta-row { display: flex; justify-content: space-between; margin-bottom: 2px; }
.nickname-row { border-top: 1px dotted #aaa; padding-top: 5px; margin-top: 5px; font-weight: bold; }

.receipt-items { width: 100%; border-collapse: collapse; margin: 20px 0; }
.receipt-items td { 
    border-bottom: 1px dashed #ccc; 
    padding: 10px 0; 
    font-size: 1rem; 
    vertical-align: top; /* Ensures items align top for multi-line addons */
}
.receipt-items .r-price { text-align: right; font-weight: bold; }
.receipt-items .r-name { text-align: left; width: 70%; }

/* --- ORDER SLIP ADD-ONS STYLING --- */
.receipt-addon-container {
    font-size: 0.8rem;
    color: #5d4037;
    margin-top: 4px;
    line-height: 1.3;
}
.receipt-addon-item { font-style: italic; }

.receipt-total { display: flex; justify-content: space-between; font-weight: bold; font-size: 1.6rem; color: #bf360c; border-top: 3px double #333; padding-top: 10px; margin-top: 10px; }
.receipt-footer { margin-top: 20px; font-size: 0.8rem; font-style: italic; color: #888; }


/* ----------------------------------
   PAPER 2: LETTER CONTENT SLIP
   ---------------------------------- */
.letter-theme {
    background-color: #ffffff; /* Cleaner white for readability */
    border: 1px solid #d7ccc8;
    font-family: 'Courier New', monospace;
}

.letter-header {
    text-align: center; 
    border-bottom: 2px solid #333; 
    padding-bottom: 10px; 
    margin-bottom: 15px;
}
.letter-header h3 { font-family: 'Playfair Display', serif; text-transform: uppercase; letter-spacing: 1px; color: #333; }
.mini-meta { font-size: 0.8rem; color: #888; font-family: sans-serif; }
.clip-icon { font-size: 2rem; display: block; margin-bottom: 5px; }

.transcription-task {
    background: #f4f4f4;
    padding: 15px;
    border-left: 4px solid #bf360c;
    margin-bottom: 20px;
    text-align: left;
}

/* --- RECIPIENT LINE STYLE (To: X) --- */
.task-recipient {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #3e2723;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #ccc;
}
.task-recipient strong {
    color: #bf360c;
    font-weight: bold;
    margin-right: 5px;
}

.task-message { font-style: italic; white-space: pre-wrap; line-height: 1.5; margin-top: 5px; font-size: 1rem; }
.letter-footer { text-align: center; border-top: 1px solid #eee; padding-top: 10px; font-size: 0.8rem; color: #aaa; text-transform: uppercase; }


/* --- VISIBLE PREVIEW AREA (User UI) --- */
#generated-files-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.file-block {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.file-label {
    color: #fff;
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}

.final-img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin-bottom: 15px;
    border: 2px solid #eee;
}

/* --- ACTION BUTTONS --- */
.receipt-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

.action-btn {
    width: 100%;
    padding: 14px;
    border: none;
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    text-decoration: none;
    letter-spacing: 1px;
}

.btn-download { background: #fff; color: #3e2723; }
.btn-download:hover { background: #eee; transform: translateY(-2px); }

.btn-instagram { 
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); 
    color: white; 
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.4);
}
.btn-instagram:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(220, 39, 67, 0.6); }

.btn-close-receipt { background: transparent; color: #ccc; border: 1px solid #666; margin-top: 10px; }
.btn-close-receipt:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }