/* Print Styles for ID Card and Receipt */
@media print {
    body {
        margin: 0;
        padding: 0;
        background: white;
    }

    .no-print {
        display: none !important;
    }
}

/* ID Card Styles */
.id-card {
    width: 85.6mm;
    height: 54mm;
    background: linear-gradient(135deg, #ff9800 0%, #e65100 50%, #bf360c 100%);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', sans-serif;
    color: white;
    position: relative;
}

.id-card-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.id-logo,
.id-logo-placeholder {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.id-logo {
    object-fit: cover;
}

.id-committee-name {
    font-size: 0.85rem;
    font-weight: bold;
    flex: 1;
}

.id-year {
    background: white;
    color: #e65100;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.8rem;
}

.id-card-body {
    display: flex;
    padding: 10px;
    gap: 12px;
}

.id-photo-section {
    flex-shrink: 0;
}

.id-photo,
.id-photo-placeholder {
    width: 55px;
    height: 65px;
    border-radius: 6px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 2rem;
    object-fit: cover;
}

.id-details {
    flex: 1;
}

.id-name {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 3px;
}

.id-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 3px;
}

.id-label {
    opacity: 0.8;
}

.id-category {
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: bold;
}

.id-category.vip {
    background: #ffd700;
    color: #000;
}

.id-category.patron {
    background: #7b1fa2;
}

.id-category.general {
    background: rgba(255, 255, 255, 0.2);
}

.id-card-footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.id-blessing {
    font-size: 0.75rem;
}

.id-village {
    font-size: 0.65rem;
    opacity: 0.8;
}

/* Receipt Styles */
.receipt {
    width: 80mm;
    background: white;
    color: #333;
    font-family: 'Segoe UI', sans-serif;
    padding: 15px;
    border: 2px solid #e65100;
    border-radius: 8px;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #e65100;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.receipt-logo,
.receipt-logo-placeholder {
    width: 50px;
    height: 50px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #fff3e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.receipt-title {
    font-size: 1rem;
    font-weight: bold;
    color: #e65100;
}

.receipt-village {
    font-size: 0.8rem;
    color: #666;
}

.receipt-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 15px;
    padding: 8px;
    background: #fff3e0;
    border-radius: 5px;
}

.receipt-body {
    margin-bottom: 15px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.receipt-row .label {
    color: #666;
}

.receipt-amount {
    background: #e65100;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 10px 0;
}

.receipt-words {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    font-style: italic;
    margin-bottom: 10px;
}

.receipt-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 0.8rem;
}

.signature-line {
    border-top: 1px solid #333;
    padding-top: 5px;
    text-align: center;
    width: 80px;
}

.receipt-thanks {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px dashed #e65100;
    color: #e65100;
    font-weight: bold;
}

/* Print Window Actions */
.print-actions {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.print-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.print-actions button:first-child {
    background: #e65100;
    color: white;
}

.print-actions button:last-child {
    background: #666;
    color: white;
}

/* Preview Modal */
.preview-modal {
    max-width: 400px !important;
}

.preview-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Multiple ID Cards Grid */
.id-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

@media print {
    .id-cards-grid {
        gap: 10mm;
    }

    .id-card,
    .receipt,
    .receipt-traditional {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ============================================
   Traditional Receipt Styles (चिकना दुर्गा पूजा)
   ============================================ */
.receipt-traditional {
    width: 140mm;
    font-family: 'Noto Sans Devanagari', 'Mangal', sans-serif;
    background: #fff;
    color: #000;
}

.receipt-border {
    border: 3px solid #000;
    padding: 3px;
}

.receipt-border::before {
    content: '';
    display: block;
    border: 1px solid #000;
    padding: 2px;
}

.receipt-inner {
    border: 2px solid #000;
    padding: 10px 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Crect width='20' height='20' fill='none' stroke='%23ddd' stroke-width='0.5'/%3E%3C/svg%3E");
}

/* Header Mantras */
.receipt-mantra {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #c00;
    margin-bottom: 2px;
}

.receipt-submantra {
    text-align: center;
    font-size: 8px;
    color: #666;
    margin-bottom: 8px;
    font-style: italic;
}

/* Title Section */
.receipt-title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.durga-image {
    font-size: 2.5rem;
    color: #c00;
}

.receipt-main-title {
    text-align: center;
}

.receipt-main-title h1 {
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    color: #000;
    text-shadow: 1px 1px 0 #ddd;
    letter-spacing: 1px;
}

.receipt-location {
    font-size: 14px;
    border: 1px solid #000;
    display: inline-block;
    padding: 2px 15px;
    background: #f5f5f5;
    margin-top: 5px;
}

/* Receipt Details */
.receipt-details {
    margin: 15px 0;
}

.receipt-row-trad {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
    font-size: 14px;
}

.label-trad {
    font-weight: bold;
    min-width: 50px;
    flex-shrink: 0;
}

.value-trad {
    flex: 1;
    min-width: 80px;
}

.value-trad.dotted {
    border-bottom: 1px dotted #000;
    padding-bottom: 2px;
    margin-left: 5px;
}

.value-trad.full {
    flex: 1;
}

.amount-row-trad {
    background: #fff8e1;
    padding: 8px;
    border: 1px solid #000;
    margin-top: 10px;
}

.amount-value {
    font-size: 18px;
    font-weight: bold;
    color: #c00;
    min-width: 100px;
}

.amount-words {
    font-size: 12px;
    font-style: italic;
    margin-left: 10px;
    color: #333;
}

/* Footer */
.receipt-footer-trad {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #000;
}

.rupee-symbol {
    width: 50px;
    height: 50px;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.footer-right {
    text-align: right;
}

.receipt-row-small {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    font-size: 11px;
    margin-bottom: 5px;
}

.dotted-small {
    width: 80px;
    border-bottom: 1px dotted #000;
}

.signature-label {
    font-size: 10px;
    color: #666;
    margin-top: 10px;
    border-top: 1px solid #000;
    padding-top: 3px;
}

/* Print optimizations for traditional receipt */
@media print {
    .receipt-traditional {
        box-shadow: none;
    }

    .receipt-inner {
        background: white;
    }
}

/* Two receipts side by side for A4 printing */
.receipts-pair {
    display: flex;
    gap: 10mm;
    justify-content: center;
}

@media print {
    .receipts-pair {
        page-break-inside: avoid;
    }
}

/* ================================================
   Professional Receipt Styles (CorelDraw Style)
   ================================================ */
.pro-receipt {
    display: flex;
    width: 210mm;
    min-height: 90mm;
    font-family: 'Noto Sans Devanagari', 'Mangal', 'Arial Unicode MS', sans-serif;
    background: #fff;
    color: #000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.receipt-half {
    flex: 1;
    padding: 12px;
    position: relative;
    border: 2px solid #333;
}

.left-copy {
    background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
    border-right: none;
}

.right-copy {
    background: #fff;
    position: relative;
    overflow: hidden;
}

.perforation {
    width: 2px;
    background: repeating-linear-gradient(to bottom,
            #999 0px,
            #999 5px,
            transparent 5px,
            transparent 10px);
    margin: 0;
}

/* Header Styles */
.receipt-header-pro {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.mantra-text {
    font-size: 11px;
    color: #c00;
    font-weight: bold;
    margin-bottom: 5px;
}

.committee-box {
    border: 1px solid #333;
    padding: 5px 10px;
    display: inline-block;
    background: #f9f9f9;
}

.committee-name-pro {
    font-size: 14px;
    font-weight: bold;
}

.location-pro {
    font-size: 11px;
    color: #666;
}

/* Gradient Header for Right Side */
.gradient-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff6b35 100%);
    color: white;
    padding: 10px;
    border-radius: 5px 5px 0 0;
    margin: -12px -12px 15px -12px;
    border-bottom: 3px solid #cc5500;
}

.gradient-header .mantra-text {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.main-title-pro {
    font-size: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    margin: 8px 0;
}

.committee-subtitle {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 3px 15px;
    border-radius: 15px;
    margin-bottom: 5px;
}

.receipt-label {
    font-size: 16px;
    font-weight: bold;
    background: #fff;
    color: #c00;
    display: inline-block;
    padding: 3px 20px;
    border-radius: 3px;
    margin-top: 5px;
}

/* Durga Watermark */
.durga-watermark {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    opacity: 0.1;
    color: #ff6b35;
}

/* Form Fields */
.receipt-body-pro {
    padding: 10px 0;
}

.field-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.field-label {
    min-width: 80px;
    font-weight: bold;
    color: #333;
}

.field-value {
    flex: 0 0 auto;
    min-width: 80px;
    border-bottom: 1px dotted #666;
    padding: 2px 10px;
    margin-left: 5px;
}

.field-value.full {
    flex: 1;
}

/* Amount Row */
.amount-row-pro {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 10px;
    border: 2px solid #ff9800;
    border-radius: 5px;
    margin-top: 15px;
}

.rupee-circle,
.rupee-circle-small {
    width: 40px;
    height: 40px;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    background: #fff;
    margin-right: 10px;
    flex-shrink: 0;
}

.rupee-circle-small {
    width: 30px;
    height: 30px;
    font-size: 16px;
}

.amount-value-pro {
    font-size: 22px;
    font-weight: bold;
    color: #c00;
    margin: 0 15px;
}

.amount-words-pro {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.amount-text {
    font-size: 16px;
    font-weight: bold;
}

/* Footer */
.receipt-footer-pro {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.thanks-text {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-bottom: 10px;
}

.footer-signatures {
    display: flex;
    justify-content: flex-end;
}

.sig-item {
    text-align: center;
}

.sig-line {
    display: block;
    width: 100px;
    border-top: 1px solid #333;
    margin-bottom: 3px;
}

.sig-label {
    font-size: 10px;
    color: #666;
}

.signature-section {
    text-align: right;
}

.blessing-text {
    font-size: 9px;
    color: #666;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.4;
}

/* Print Styles */
@media print {
    .pro-receipt {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .receipt-half {
        border: 1px solid #333;
    }
}

/* Preview Modal for Professional Receipt */
.preview-modal {
    max-width: 800px !important;
}

.preview-container {
    background: #e0e0e0;
    padding: 20px;
    display: flex;
    justify-content: center;
}