/* Donation System Premium Stylesheet */

/* Active / Inactive states for amount selectors */
.give-donation-amount span {
    display: inline-block;
    padding: 12px 24px;
    margin: 6px;
    border-radius: 50px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.give-donation-amount span:hover {
    border-color: #28a745;
    background: #f4faf6;
    color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40,167,69,0.1);
}

.give-donation-amount span.active {
    background: linear-gradient(135deg, #28a745, #218838);
    color: #ffffff;
    border-color: #218838;
    box-shadow: 0 4px 15px rgba(40,167,69,0.3);
}

/* Custom amount field */
.custom-amount-input-wrap {
    margin-top: 15px;
    animation: fadeIn 0.4s ease;
}
.custom-amount-input-wrap input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    border: 2px solid #ced4da;
    font-size: 18px;
    font-weight: 600;
    transition: border-color 0.3s;
}
.custom-amount-input-wrap input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

/* Checkout Modal Overlay */
.donation-checkout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.donation-checkout-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content Container */
.donation-checkout-modal {
    background: #ffffff;
    border-radius: 24px;
    width: 92%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.donation-checkout-overlay.active .donation-checkout-modal {
    transform: scale(1);
}

.modal-header-premium {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 24px 30px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.modal-header-premium h3 {
    color: #ffffff;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-header-premium .close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.modal-header-premium .close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body-premium {
    padding: 30px;
}

/* Step Progress Indicator */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 35px;
}
.checkout-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 5%;
    right: 5%;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}
.checkout-steps-progress {
    position: absolute;
    top: 15px;
    left: 5%;
    width: 0%;
    height: 3px;
    background: #28a745;
    z-index: 2;
    transition: width 0.3s ease;
}
.checkout-step-item {
    position: relative;
    z-index: 3;
    background: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #64748b;
    transition: all 0.3s;
}
.checkout-step-item.active {
    border-color: #28a745;
    color: #28a745;
    box-shadow: 0 0 0 5px rgba(40,167,69,0.15);
}
.checkout-step-item.completed {
    border-color: #28a745;
    background: #28a745;
    color: #ffffff;
}

/* Multi-step panels */
.checkout-panel {
    display: none;
    animation: slideIn 0.3s ease-out forwards;
}
.checkout-panel.active {
    display: block;
}

/* Card Payment Simulator CSS */
.credit-card-wrapper {
    perspective: 1000px;
    width: 100%;
    max-width: 350px;
    height: 200px;
    margin: 0 auto 30px auto;
}
.credit-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-radius: 15px;
}
.credit-card.flipped {
    transform: rotateY(180deg);
}
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 22px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-front {
    background: linear-gradient(135deg, #0f172a, #334155);
}
.card-back {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    transform: rotateY(180deg);
    padding: 22px 0;
}
.card-chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #e2e8f0, #94a3b8);
    border-radius: 6px;
}
.card-number-display {
    font-size: 20px;
    font-family: monospace;
    letter-spacing: 2px;
    word-spacing: 4px;
    margin-top: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.card-details-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.card-details-row span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}
.card-stripe {
    width: 100%;
    height: 40px;
    background: #000000;
    margin-top: 10px;
}
.card-signature-area {
    margin: 15px 22px;
    background: #e2e8f0;
    color: #1e293b;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}
.card-cvv-display {
    background: #ffffff;
    color: #000;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Card input form styling */
.card-input-group {
    margin-bottom: 15px;
}
.card-input-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
}
.card-input-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.3s;
}
.card-input-group input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 3px rgba(40,167,69,0.1);
}

/* UPI QR Code Simulator */
.upi-checkout-wrap {
    text-align: center;
}
.qr-code-box {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px auto;
    border: 6px solid #f8f9fa;
    border-radius: 12px;
    padding: 8px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.qr-code-box img {
    width: 100%;
    height: 100%;
}
.upi-id-copy-container {
    background: #f1f5f9;
    padding: 10px 15px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}
.upi-id-copy-container span {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}
.copy-btn {
    border: none;
    background: #ffffff;
    color: #28a745;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
}
.copy-btn:hover {
    background: #28a745;
    color: #ffffff;
}

/* Offline Payment details */
.offline-details-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}
.offline-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
}
.offline-detail-row:last-child {
    border-bottom: none;
}
.offline-detail-row strong {
    color: #1e293b;
}

/* Success and Confirmation Screen */
.success-screen-wrapper {
    text-align: center;
    padding: 20px 0;
}
.success-icon-animated {
    width: 80px;
    height: 80px;
    background: #d1e7dd;
    color: #0f5132;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    animation: scalePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.2) forwards;
}
.success-details-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    margin: 20px auto;
    text-align: left;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}
.summary-item:last-child {
    margin-bottom: 0;
}

/* Buttons in modal */
.checkout-navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

/* Confetti CSS */
.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd300;
    top: 0;
    opacity: 0;
    z-index: 1000;
}

/* Tax Exemption Certificate/Receipt Layout */
.receipt-printable-wrapper {
    display: none; /* Hidden on screen by default */
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .receipt-printable-wrapper, .receipt-printable-wrapper * {
        visibility: visible;
    }
    .receipt-printable-wrapper {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        color: #000000;
        font-family: 'Inter', sans-serif;
        padding: 30px;
        box-sizing: border-box;
    }
    /* Simple black and white design for printer friendliness */
    .receipt-border {
        border: 4px double #333;
        padding: 40px;
        border-radius: 8px;
    }
    .receipt-header {
        text-align: center;
        margin-bottom: 30px;
        border-bottom: 2px solid #333;
        padding-bottom: 20px;
    }
    .receipt-header h1 {
        font-size: 26px;
        font-weight: 800;
        margin-bottom: 5px;
    }
    .receipt-info-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    .receipt-details-table {
        width: 100%;
        border-collapse: collapse;
        margin: 25px 0;
    }
    .receipt-details-table th, .receipt-details-table td {
        border: 1px solid #333;
        padding: 10px 12px;
        text-align: left;
    }
    .receipt-details-table th {
        background: #f2f2f2;
    }
    .receipt-footer {
        margin-top: 50px;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }
    .receipt-signature-box {
        text-align: center;
        width: 200px;
    }
    .receipt-signature-line {
        border-top: 1px solid #000;
        margin-top: 40px;
        padding-top: 5px;
        font-size: 13px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(15px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scalePop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
