/* assets/css/pages/index.css — v10.5.3 (F4)
   Ported from index.php's $customStyles. Contains one bare `body` rule (plus
   body::before) for the page background overlay — kept as-is because it is
   compatible with app.css's body rule (same min-height, adds position:relative)
   and this stylesheet only loads on index.php. Legacy style.css custom
   properties remapped to theme tokens. */

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
.blink-text {
    animation: blink 1.0s infinite;
}
/* Background Image & Overlay */
body {
    position: relative;
    min-height: 100vh;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Relative to THIS file (assets/css/pages/), not to the document root — the
       document-root-relative form silently resolved to
       assets/css/pages/assets/images/bg-ashram.png and 404'd. */

    /* v10.5.6 (F7): this decorative backdrop was a 4,953 KB / 3168x1344 PNG — on its own more
       than 90% of the homepage's payload and the reason index.php's LCP was 4.0s on throttled
       4G. It is scaled with background-size, so its intrinsic resolution was never needed.
       Now 1280w WebP (20 KB) by default and 1920w (33 KB) on large viewports.

       Two declarations on purpose: a browser that does not understand image-set() keeps the
       first (the original PNG); everything modern takes the second and never fetches the PNG.
       Only the winning declaration's resource is downloaded. */
    background-repeat: no-repeat;
    background-position: center center;
    background-image: url('../../images/bg-ashram.png');
    background-image: image-set(
        url('../../images/bg-ashram-1280.webp') type('image/webp'),
        url('../../images/bg-ashram.png') type('image/png')
    );
    background-size: contain;
    z-index: -2;
}

@media (min-width: 1400px) {
    body::before {
        background-image: url('../../images/bg-ashram.png');
        background-image: image-set(
            url('../../images/bg-ashram-1920.webp') type('image/webp'),
            url('../../images/bg-ashram.png') type('image/png')
        );
    }
}
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    z-index: -1;
}
/* Payment Loading Overlay */
.payment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}
.payment-overlay.active {
    display: flex;
}
.payment-overlay .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.payment-overlay .message {
    color: white;
    text-align: center;
    margin-top: 25px;
}
.payment-overlay .message h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}
.payment-overlay .message p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}
.payment-overlay .error-box {
    display: none;
    background: #ff4444;
    padding: 15px 25px;
    border-radius: 10px;
    margin-top: 20px;
    max-width: 350px;
    text-align: center;
}
.payment-overlay .error-box.show {
    display: block;
}
.payment-overlay .error-box p {
    color: white;
    margin-bottom: 15px;
}
.payment-overlay .retry-btn {
    background: white;
    color: #ff4444;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
}
.payment-overlay .retry-btn:hover {
    background: #f0f0f0;
}

/* ==========================================================================
   v10.6.0 inline-style sweep — the 47 style attributes and the six
   onmouseover/onmouseout handlers that lived in index.php.

   The hover effects were inline JS writing element.style directly; they are
   :hover rules now, so they also work under keyboard focus, which the handler
   pair never did.

   .info-card and its variants are in app.css — donation_category.php uses the
   same component.
   ========================================================================== */


.idx-para {
    margin-bottom: 15px;
}

.idx-join-h {
    color: var(--pcd-primary);
    margin: 20px 0 12px 0;
}

.idx-gain-h {
    color: #1a237e;
    margin-bottom: 10px;
    font-size: 1.05em;
}





.idx-warning-text {
    color: #c62828;
    font-size: 1em;
}

.idx-agree-section {
    text-align: center;
    margin-bottom: 25px;
}

/* Gradient CTA. Two colourways; the hover lift was previously an inline
   onmouseover/onmouseout pair. */
.idx-btn-cta {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.idx-btn-cta:hover,
.idx-btn-cta:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.idx-btn-block {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.idx-btn-block:hover,
.idx-btn-block:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.idx-btn-block--go {
    margin-top: 15px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.idx-btn-block--go:hover,
.idx-btn-block--go:focus-visible {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* OTP delivery chooser */
.idx-otp-section {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.idx-otp-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.idx-otp-icon {
    margin-right: 5px;
}

.idx-otp-choices {
    display: flex;
    gap: 15px;
    align-items: center;
}

.idx-otp-choice {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    background: #fff;
    transition: border-color 0.3s, background 0.3s;
}

.idx-otp-choice:hover {
    border-color: var(--pcd-primary);
}

.idx-otp-choice input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.idx-otp-name {
    font-weight: 500;
}



.idx-otp-note {
    color: #6c757d;
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
}

/* OTP + redirect modals */
.idx-otp-message {
    margin: 10px 0;
    color: var(--pcd-text-muted);
}

.idx-otp-method {
    margin: 5px 0 15px 0;
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

/* Fully specified: this input was bare before v10.6.0 and took its box from
   app.css's `:is(input, select, textarea):not([class])`, which adding a class
   stops matching. */
.idx-otp-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--pcd-border);
    border-radius: var(--pcd-radius);
    font-family: inherit;
    background: var(--pcd-surface);
    color: var(--pcd-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    letter-spacing: 5px;
    font-size: 1.2rem;
}

.idx-otp-input:focus {
    outline: none;
    border-color: var(--pcd-primary);
    box-shadow: 0 0 0 3px rgba(var(--pcd-primary-rgb), 0.12);
}

.idx-redirect {
    text-align: center;
}

.idx-redirect__icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.idx-redirect__text {
    margin: 10px 0;
    color: var(--pcd-text-muted);
}

.idx-redirect__note {
    font-weight: 500;
    color: var(--pcd-primary);
}

.idx-redirect__spinner {
    margin-top: 20px;
}
