﻿

@page {
    size: A4 portrait;
    margin: 10mm;
}

@media print {
    html,
    body {
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

        body * {
            visibility: hidden !important;
        }

    #printableReceipt,
    #printableReceipt * {
        visibility: visible !important;
    }

    #printableReceipt {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 190mm !important;
        
        min-height: 0 !important;
        max-height: 277mm !important;
        margin: 0 !important;
        padding: 7mm !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        border: 1px solid #d6d3d1 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
        color: #1c1917 !important;
        break-before: avoid !important;
        break-after: avoid !important;
        break-inside: avoid !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

        #printableReceipt .receipt-footer {
            position: static !important;
            margin-top: auto !important;
            padding-top: 8px !important;
            flex-shrink: 0 !important;
            border-top: 1px solid #d6d3d1 !important;
            text-align: center !important;
            font-size: 9px !important;
            line-height: 1.4 !important;
        }

        #printableReceipt h3 {
            font-size: 15px !important;
        }

        #printableReceipt table {
            width: 100% !important;
            font-size: 10px !important;
            border-collapse: collapse !important;
        }

        #printableReceipt td {
            padding-top: 5px !important;
            padding-bottom: 5px !important;
        }

        #printableReceipt img {
            max-width: 48px !important;
            max-height: 48px !important;
        }

        #printableReceipt .statutory-grid {
            gap: 5px !important;
        }

        #printableReceipt .statutory-grid,
        #printableReceipt table,
        #printableReceipt .receipt-footer {
            break-inside: avoid !important;
            page-break-inside: avoid !important;
        }

    .success-hero,
    button,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }
}


:root {
    --primary: #d97706;
    --primary-dark: #b45309;
    --bg: #FFFDF9;
    --card-bg: #ffffff;
    --text: #1c1917;
    --muted: #78716c;
    --border: #e7e5e4;
    --emerald: #059669;
    --emerald-dark: #047857;
}
/* Container */
.container {
    max-width: 900px;
    margin: 32px auto 60px;
    padding: 0 20px;
}

/* Success Hero */
.success-hero {
    text-align: center;
    margin-bottom: 28px;
}

.icon-badge {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px rgba(22, 101, 52, 0.2);
}

.success-hero h1 {
    font-size: 28px;
    font-weight: 800;
    color: #0c0a09;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.success-hero p {
    color: var(--muted);
    font-size: 14px;
    max-width: 600px;
    margin: 0 auto;
}

.blessing-text {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 13px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    margin-top: 12px;
    font-weight: 600;
}

/* Action Bar */
.action-bar {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.action-left h3 {
    font-size: 15px;
    font-weight: 800;
    color: #1c1917;
}

.action-left p {
    font-size: 12px;
    color: #78716c;
}

.action-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-download {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    transition: all 0.2s;
}

    .btn-download:hover {
        background: linear-gradient(135deg, #047857, #065f46);
        transform: translateY(-1px);
    }

.btn-secondary {
    background: #ffffff;
    color: #44403c;
    border: 1px solid #d6d3d1;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

    .btn-secondary:hover {
        background: #f5f5f4;
        color: #1c1917;
    }

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

    .btn-whatsapp:hover {
        background: #1eb956;
    }

/* Official Printable Receipt Box */
.receipt-card {
    background: #ffffff;
    border: 2px solid #e7e5e4;
    border-radius: 20px;
    padding: 36px 40px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Rozha One', serif;
    font-size: 260px;
    color: rgba(217, 119, 6, 0.035);
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.receipt-content {
    position: relative;
    z-index: 1;
}

/* Receipt Header */
.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #f59e0b;
    padding-bottom: 20px;
    margin-bottom: 24px;
    gap: 20px;
}

.receipt-trust-info h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1c1917;
    margin-bottom: 2px;
}

.receipt-trust-hindi {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 6px;
}

.receipt-address {
    font-size: 11px;
    color: #57534e;
    line-height: 1.5;
}

.receipt-meta-box {
    text-align: right;
    font-size: 12px;
}

.receipt-badge-80g {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 8px;
}

.receipt-no {
    font-family: monospace;
    font-weight: 800;
    font-size: 15px;
    color: #1c1917;
}

.receipt-date {
    color: #78716c;
    font-size: 11px;
    margin-top: 2px;
}

/* Statutory Grid */
.statutory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

@media (max-width: 680px) {
    .statutory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: #78716c;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.stat-item strong {
    display: block;
    font-size: 12px;
    font-family: monospace;
    color: #1c1917;
    margin-top: 2px;
}

/* Details Table */
.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 13px;
}

    .receipt-table th, .receipt-table td {
        padding: 10px 14px;
        border-bottom: 1px solid #f5f5f4;
        text-align: left;
    }

    .receipt-table th {
        background: #fffbeb;
        color: #78350f;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: 800;
    }

    .receipt-table td.label-col {
        width: 32%;
        color: #57534e;
        font-weight: 600;
    }

    .receipt-table td.val-col {
        color: #1c1917;
        font-weight: 700;
    }

/* Amount Highlight Box */
.amount-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.amount-words {
    font-size: 12px;
    color: #78350f;
}

    .amount-words strong {
        display: block;
        font-size: 14px;
        color: #451a03;
        margin-top: 2px;
    }

.amount-figure {
    text-align: right;
}

    .amount-figure span {
        font-size: 11px;
        color: #92400e;
        text-transform: uppercase;
        font-weight: 700;
    }

    .amount-figure h3 {
        font-size: 28px;
        font-weight: 900;
        color: #b45309;
        font-family: monospace;
        line-height: 1;
    }

/* Legal 80G Declaration & Signatures */
.legal-declaration {
    background: #fafaf9;
    border-left: 3px solid #059669;
    padding: 12px 16px;
    font-size: 11px;
    color: #44403c;
    line-height: 1.6;
    border-radius: 0 8px 8px 0;
    margin-bottom: 28px;
}

.receipt-signatures {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 20px;
    border-top: 1px dashed #d6d3d1;
}

.seal-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.official-seal {
    width: 70px;
    height: 70px;
    border: 2px dashed #d97706;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #b45309;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.1;
}

.signatory-box {
    text-align: center;
}

.sign-line {
    width: 160px;
    border-bottom: 1.5px solid #1c1917;
    margin-bottom: 4px;
    padding-bottom: 4px;
    font-family: 'Rozha One', serif;
    font-size: 14px;
    color: #b45309;
}

.signatory-title {
    font-size: 11px;
    font-weight: 700;
    color: #57534e;
}

/* Bottom Navigation Links */
.bottom-nav {
    margin-top: 36px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Printable Styles */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }

    .header, .success-hero, .action-bar, .bottom-nav {
        display: none !important;
    }

    .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .receipt-card {
        border: none !important;
        box-shadow: none !important;
        padding: 20px !important;
    }

    .watermark {
        opacity: 0.05 !important;
    }
}
