/* ═══════════════════════════════════════════════════════════════════
   Sukanya Trust — site.css
   Supplementary styles: animations, overlay, print, accessibility,
   scrollbar, responsive fine-tuning, utility classes.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Custom Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 7px; height: 7px; }
::-webkit-scrollbar-track        { background: #FAF0EE; }
::-webkit-scrollbar-thumb        { background: linear-gradient(180deg, #0D2240, #1A3C6E); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover  { background: #061428; }

/* ── Page Fade-in ────────────────────────────────────────────────── */
main {
    animation: pageFadeIn 0.32s ease;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Loading Overlay (shown while Razorpay opens) ────────────────── */
.sk-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.sk-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.sk-spinner {
    width: 58px;
    height: 58px;
    border: 4px solid rgba(200, 169, 81, 0.25);
    border-top-color: #C8A951;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
.sk-loading-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    margin-top: 1.1rem;
    letter-spacing: 0.05em;
}

/* ── Button loading state ────────────────────────────────────────── */
.sk-btn.is-loading {
    pointer-events: none;
    opacity: 0.82;
}
.sk-btn.is-loading > i,
.sk-btn.is-loading > span {
    visibility: hidden;
}
.sk-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ── Spin keyframe ───────────────────────────────────────────────── */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Input autofill override ─────────────────────────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #1A1A2E;
    transition: background-color 5000s ease;
    caret-color: #1A1A2E;
}

/* ── Remove number input arrows ──────────────────────────────────── */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* ── Focus visible (keyboard navigation accessibility) ───────────── */
:focus-visible {
    outline: 2.5px solid #C8A951;
    outline-offset: 3px;
    border-radius: 6px;
}

/* ── Textarea resize handle ──────────────────────────────────────── */
textarea.sk-form-control {
    resize: vertical;
    min-height: 80px;
}

/* ── Daughter row slide-in ───────────────────────────────────────── */
.daughter-row {
    animation: rowSlideIn 0.22s ease;
}
@keyframes rowSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Payment amount reveal ───────────────────────────────────────── */
.sk-payment-amount {
    animation: amountReveal 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.2) forwards;
}
@keyframes amountReveal {
    0%   { transform: scale(0.9);  opacity: 0; }
    100% { transform: scale(1);    opacity: 1; }
}

/* ── Success icon pop ────────────────────────────────────────────── */
.sk-success-icon {
    animation: successPop 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.5) forwards;
}
@keyframes successPop {
    0%   { transform: scale(0.3);  opacity: 0; }
    70%  { transform: scale(1.12);             }
    100% { transform: scale(1);    opacity: 1; }
}

/* ── Confirmation rows staggered entrance ────────────────────────── */
.sk-confirm-row {
    animation: rowFadeIn 0.38s ease both;
}
.sk-confirm-row:nth-child(1) { animation-delay: 0.10s; }
.sk-confirm-row:nth-child(2) { animation-delay: 0.18s; }
.sk-confirm-row:nth-child(3) { animation-delay: 0.26s; }
.sk-confirm-row:nth-child(4) { animation-delay: 0.34s; }
.sk-confirm-row:nth-child(5) { animation-delay: 0.42s; }
@keyframes rowFadeIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0);     }
}

/* ── Validation error shake ──────────────────────────────────────── */
.sk-card.has-error {
    animation: shake 0.38s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0);   }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX( 6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX( 4px); }
}

/* ── Option card entrance (home page) ───────────────────────────── */
.sk-option-card {
    animation: cardEntrance 0.4s ease both;
}
.sk-option-card:nth-child(1) { animation-delay: 0.05s; }
.sk-option-card:nth-child(2) { animation-delay: 0.12s; }
.sk-option-card:nth-child(3) { animation-delay: 0.19s; }
.sk-option-card:nth-child(4) { animation-delay: 0.26s; }
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Trust badge ─────────────────────────────────────────────────── */
.sk-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.3rem 0.7rem;
    background: #fff;
    border: 1.5px solid #C8D8F0;
    border-radius: 50px;
}
.sk-trust-badge i { color: var(--primary); }

/* ── Stepper connector animation ─────────────────────────────────── */
.sk-step.done  .sk-step-num  { transition: background 0.3s ease, box-shadow 0.3s ease; }
.sk-step.active .sk-step-num { animation: stepPulse 1.8s ease infinite; }
@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(200,144,10,.22); }
    50%       { box-shadow: 0 0 0 9px rgba(200,144,10,.08); }
}

/* ── Navbar active link indicator ────────────────────────────────── */
.sk-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
}

/* ── Search toggle transition ────────────────────────────────────── */
.sk-toggle-btn { transition: all 0.2s ease; }

/* ── Member found card entrance ──────────────────────────────────── */
.sk-member-card {
    animation: cardEntrance 0.3s ease;
}

/* ── Razorpay button pulse ───────────────────────────────────────── */
@keyframes rzpPulse {
    0%, 100% { box-shadow: 0 4px 18px rgba(200,144,10,.35); }
    50%       { box-shadow: 0 6px 28px rgba(200,144,10,.62); }
}
.rzp-pay-btn { animation: rzpPulse 2s ease infinite; }

/* ── Utility classes ─────────────────────────────────────────────── */
.text-success-sk  { color: #1B8A4D !important; }
.text-danger-sk   { color: #C0392B !important; }
.bg-primary-sk    { background: var(--primary) !important; color: #fff; }
.rounded-sk       { border-radius: var(--radius) !important; }
.shadow-sk        { box-shadow: var(--shadow) !important; }
.shadow-sm-sk     { box-shadow: var(--shadow-sm) !important; }

/* ── Print styles (Confirmation page) ───────────────────────────── */
@media print {
    .sk-navbar,
    footer.sk-footer,
    .sk-btn,
    .sk-steps,
    .rzp-secure-note    { display: none !important; }

    body                { background: #fff; font-size: 12pt; color: #000; }
    .sk-card            { box-shadow: none; border: 1px solid #ccc; }
    .sk-page-header     { background: #1A3C6E !important;
                          -webkit-print-color-adjust: exact;
                          print-color-adjust: exact; }
    .sk-success-icon    { background: #1B8A4D !important;
                          -webkit-print-color-adjust: exact;
                          print-color-adjust: exact; }
    .sk-confirm-card    { background: #f5f9f5 !important;
                          -webkit-print-color-adjust: exact;
                          print-color-adjust: exact; }
    .container          { max-width: 100% !important; }
    a[href]::after      { content: none !important; }
}

/* ── Responsive fine-tuning ──────────────────────────────────────── */
@media (max-width: 480px) {
    .sk-payment-amount .amount-value { font-size: 2.2rem; }
    .sk-option-card                  { padding: 1.5rem 1.2rem 1.3rem; }
    .sk-option-icon                  { width: 56px; height: 56px; font-size: 1.35rem; }
    .sk-card-body                    { padding: 1.25rem 1rem; }
    .sk-assoc-banner                 { flex-wrap: wrap; gap: 0.6rem; }
    .d-flex.gap-3                    { flex-direction: column; gap: 0.65rem !important; }
    .d-flex.gap-3 .sk-btn            { width: 100%; justify-content: center; }
    .sk-summary-table tr td:first-child { width: 45%; }
}

/* ── Body scroll lock when overlay is active ─────────────────────── */
body.sk-overlay-open { overflow: hidden; }
