﻿/* Base Variables (Eshkolot Theme) */
:root {
    --primary-color: #1E9E49;
    /* Eshkolot Main Green */
    --secondary-color: #11BA54;
    /* Brighter Green */
    --accent-color: #EE4039;
    /* Red Accent */
    --bg-color: #F9FAFA;
    /* Light Gray Background */
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

/* DATEPICKER VARIABLES (Sync with Main Theme) */
.datepicker-theme-scope {
    --primary: #1E9E49;
    --primary-soft: #11BA54;
    --bg-glass: rgba(255, 255, 255, 0.98);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #1f2937;
    --text-muted: #6b7280;

    /* Holiday Colors */
    --shabbat-bg: #f0fdf4;
    --shabbat-text: #166534;
    --holiday-bg: #fff7ed;
    --holiday-text: #c2410c;
    --chol-hamoed-bg: #eff6ff;
    --chol-hamoed-text: #1d4ed8;
    --fast-bg: #fef2f2;
    --fast-text: #b91c1c;

    --today-ring: #1E9E49;
}

.dfp-wrapper * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.dfp-wrapper {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: visible;
    border: 1px solid #eee;
    direction: rtl;
    text-align: right;
    margin: 0 auto;
    padding-top: 50px;
    padding-bottom: 30px;
    min-height: 480px;
}

/* Global Desktop Consistency Fix - Ensures all steps (current & future) have the exact same width */
@media (min-width: 801px) {
    .dfp-wrapper {
        width: 850px !important;
        /* רוחב קבוע ואחיד לכל השלבים */
        max-width: 100% !important;
        margin: 0 auto !important;
    }
}

/* Progress Bar & Step Indicators Upgrade */
.progress-container {
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    background: #fff;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: relative;
    margin-bottom: 10px;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 40px;
    /* Same as circle width */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.1rem;
    position: relative;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Glassmorphism & Active State */
.step-indicator.active .step-circle {
    background: #fff;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 158, 73, 0.15), 0 4px 12px rgba(30, 158, 73, 0.2);
    transform: scale(1.1);
    animation: stepPulse 2s infinite ease-in-out;
}

@keyframes stepPulse {
    0% {
        box-shadow: 0 0 0 0px rgba(30, 158, 73, 0.3), 0 4px 12px rgba(30, 158, 73, 0.2);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(30, 158, 73, 0), 0 4px 12px rgba(30, 158, 73, 0.2);
    }

    100% {
        box-shadow: 0 0 0 0px rgba(30, 158, 73, 0), 0 4px 12px rgba(30, 158, 73, 0.2);
    }
}

/* Completed State with Checkmark */
.step-indicator.completed {
    cursor: pointer;
}

.step-indicator.completed .step-circle {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.step-indicator.completed .step-num {
    display: none;
}

.step-indicator.completed .step-circle::after {
    content: '✓';
    font-size: 1.2rem;
    animation: checkIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes checkIn {
    from {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.step-label {
    font-size: 0.85rem;
    color: #9ca3af;
    transition: all 0.4s ease;
    font-weight: 500;
    letter-spacing: -0.01em;
    white-space: nowrap;
    position: absolute;
    top: 50px;
    width: 120px;
    text-align: center;
}

.step-indicator.active .step-label {
    color: #111;
    font-weight: 700;
    transform: translateY(-2px);
}

.step-indicator.completed .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Enhanced Progress Track & Fill */
.progress-track {
    position: absolute;
    top: 50px;
    left: 40px;
    /* Aligns with center of first/last circle */
    right: 40px;
    height: 4px;
    background: #f3f4f6;
    z-index: 1;
    border-radius: 4px;
}

.progress-fill {
    position: absolute;
    top: 0;
    right: 0;
    /* Grow from right for RTL */
    height: 100%;
    width: 0%;
    background: var(--btn-gradient);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(30, 158, 73, 0.3);
    border-radius: 4px;
}

/* Steps Content */
.step-content {
    display: none;
    padding: 30px;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.step-content.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content h2 {
    margin-top: 0;
    text-align: center;
    color: #000;
    font-weight: 700;
}

.step-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 1.15rem;
}

/* ══════════════════════════════════════════
   YAHRZEIT STRIP - PREMIUM DARK THEME
   ══════════════════════════════════════════ */

/* ═══ SKELETON LOADER ═══ */
.ys-skeleton {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 30px;
    gap: 20px;
}

.ys-skeleton-flame {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(201, 168, 76, 0.1);
    animation: ysPulse 1.5s infinite ease-in-out;
}

.ys-skeleton-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ys-skeleton-line {
    height: 12px;
    background: rgba(245, 240, 232, 0.05);
    border-radius: 4px;
    animation: ysPulse 1.5s infinite ease-in-out;
}

.ys-skeleton-line.short {
    width: 40%;
}

.ys-skeleton-line.medium {
    width: 60%;
}

.ys-skeleton-line.long {
    width: 85%;
}

@keyframes ysPulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.3;
    }
}

.yahrzeit-strip {
    width: 100%;
    background: #0b0b0e;
    position: relative;
    overflow: hidden;
    direction: rtl;
    border-radius: 12px;
    margin-top: 40px;
    /* Space for the floating portrait */
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
    cursor: pointer;
}

@media (hover: hover) {
    .yahrzeit-strip:not(.selected):not(.is-loading):hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(201, 168, 76, 0.25), 0 0 0 1px rgba(201, 168, 76, 0.2);
    }
}

.yahrzeit-strip.selected {
    box-shadow: 0 0 0 2px var(--primary-color, #1E9E49), 0 4px 16px rgba(30, 158, 73, 0.3);
}

/* ═══ CLEAR BUTTON ═══ */
.ys-clear-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 20;
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    flex-shrink: 0;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    backdrop-filter: blur(4px);
}

.ys-clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* ═══ TAP HINT ═══ */
.ys-tap-hint {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: #ffffff;
    letter-spacing: 1px;
    z-index: 10;
    pointer-events: none;
    animation: ysTapPulse 2.5s ease-in-out infinite;
    font-weight: 700;
}

.yahrzeit-strip.selected .ys-tap-hint {
    display: none;
}

@keyframes ysTapPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* ═══ LOADING STATE (LIGHT) ═══ */
.yahrzeit-strip.is-loading {
    background: #f9f9f9;
    box-shadow: none;
    border: 1px solid #e5e7eb;
}

.yahrzeit-strip.is-loading::before,
.yahrzeit-strip.is-loading::after {
    display: none;
}

.yahrzeit-strip.is-loading .ys-skeleton-flame {
    background: #e5e7eb;
}

.yahrzeit-strip.is-loading .ys-skeleton-line {
    background: #e5e7eb;
}

/* Ambient texture */
.yahrzeit-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 100% at 15% 50%, rgba(201, 168, 76, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 60% 120% at 90% 50%, rgba(201, 168, 76, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle top/bottom border */
.yahrzeit-strip::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(201, 168, 76, 0.2), transparent);
    z-index: 1;
}

.ys-inner {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 10px 30px;
    /* Reduced vertical padding */
    gap: 0;
    min-height: 170px;
}

/* Portrait as background with gradient fade to black */
.ys-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.45;
    transition: background-image 1s ease;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to left, black 0%, black 40%, transparent 85%);
    mask-image: linear-gradient(to left, black 0%, black 40%, transparent 85%);
}

/* ═══ FLAME ═══ */
.ys-flame-wrap {
    flex-shrink: 0;
    width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-left: 25px;
}

.ys-flame-unit {
    position: relative;
    width: 32px;
    height: 50px;
}

.ys-flame-outer {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 28px;
    background: linear-gradient(to top, rgba(255, 200, 60, 0.9), rgba(255, 140, 30, 0.6), transparent);
    border-radius: 50% 50% 30% 30% / 70% 70% 40% 40%;
    filter: blur(0.5px);
    animation: ysFlame 2s ease-in-out infinite;
}

.ys-flame-inner {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 16px;
    background: linear-gradient(to top, rgba(255, 255, 220, 1), rgba(255, 230, 120, 0.7), transparent);
    border-radius: 50% 50% 30% 30% / 70% 70% 40% 40%;
    animation: ysFlameInner 1.5s ease-in-out infinite;
}

.ys-flame-glow {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(255, 180, 50, 0.12), transparent 70%);
    border-radius: 50%;
    animation: ysGlow 3s ease-in-out infinite;
}

.ys-wick {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5px;
    height: 6px;
    background: #444;
    border-radius: 1px;
}

.ys-cup {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 14px;
    background: linear-gradient(135deg, #d8d3ca, #c0bab0);
    border-radius: 2px 2px 6px 6px;
}

.ys-cup::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 3px;
    background: linear-gradient(135deg, #e8e3da, #cfc9bf);
    border-radius: 2px;
}

@keyframes ysFlame {

    0%,
    100% {
        transform: translateX(-50%) scaleX(1) scaleY(1);
    }

    20% {
        transform: translateX(-53%) scaleX(0.9) scaleY(1.1);
    }

    40% {
        transform: translateX(-47%) scaleX(1.1) scaleY(0.9);
    }

    60% {
        transform: translateX(-52%) scaleX(0.85) scaleY(1.15);
    }

    80% {
        transform: translateX(-48%) scaleX(1.05) scaleY(0.95);
    }
}

@keyframes ysFlameInner {

    0%,
    100% {
        transform: translateX(-50%) scaleY(1);
    }

    33% {
        transform: translateX(-52%) scaleY(1.15);
    }

    66% {
        transform: translateX(-48%) scaleY(0.85);
    }
}

@keyframes ysGlow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.85;
    }
}

/* ═══ SLIDES VIEWPORT ═══ */
.ys-slides-area {
    flex: 1;
    position: relative;
    height: 100px;
    overflow: visible;
    /* Allow portrait overflow */
}

.ys-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    /* Align items to bottom since portrait is floated up */
    padding-bottom: 5px;
    gap: 20px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.ys-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ys-slide.exit {
    opacity: 0;
    transform: translateY(-12px);
}

/* Portrait */
.ys-portrait {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #c9a84c, #e8d48b, #c9a84c);
    background-size: 200% 200%;
    animation: ysRing 6s linear infinite;
    margin-top: -55px;
    /* Floating break-out effect */
    position: relative;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25), 0 0 8px rgba(201, 168, 76, 0.15);
}

.ys-portrait::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.15), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.ys-portrait img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0b0b0e;
}

@keyframes ysRing {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.ys-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ys-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #c9a84c;
    text-transform: uppercase;
}

.ys-prefix {
    font-size: 0.95rem;
    font-weight: 300;
    color: rgba(245, 240, 232, 0.5);
}

.ys-name {
    font-size: 1.7rem;
    font-weight: 900;
    color: #f5f0e8;
    line-height: 1.1;
}

.ys-suffix {
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(245, 240, 232, 0.6);
    margin-top: 4px;
}

/* ═══ DIVIDER ═══ */
.ys-divider {
    flex-shrink: 0;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(201, 168, 76, 0.25), transparent);
    margin: 0 20px;
}

/* ═══ HEBREW DATE / META ═══ */
.ys-meta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 80px;
}

.ys-heb-date {
    font-size: 1.5rem;
    font-weight: 900;
    color: #c9a84c;
    line-height: 1;
}

.ys-heb-month {
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(245, 240, 232, 0.35);
    letter-spacing: 1px;
}

/* ═══ NAV PIPS ═══ */
.ys-nav {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-right: 15px;
}

.ys-pip {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* Hit area expansion */
.ys-pip::after {
    content: '';
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -10px;
    right: -10px;
    cursor: pointer;
}

.ys-pip:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.ys-pip.active {
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    height: 18px;
    border-radius: 3px;
}

/* Hide nav pips when selected */
.yahrzeit-strip.selected .ys-nav {
    display: none;
    pointer-events: none;
}

/* ═══ RESPONSIVE YAHRZEIT ═══ */
@media (max-width: 600px) {
    .yahrzeit-strip {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .ys-inner {
        padding: 8px 12px;
        min-height: 170px;
        overflow: hidden;
    }

    .ys-flame-wrap {
        margin-left: 6px;
        width: 28px;
    }

    .ys-flame-unit {
        transform: scale(0.6);
    }

    .ys-slides-area {
        height: 70px;
    }

    .ys-slide {
        gap: 10px;
    }

    .ys-portrait {
        width: 50px;
        height: 50px;
        margin-top: -30px;
    }

    .ys-label {
        font-size: 0.55rem;
        letter-spacing: 1.5px;
    }

    .ys-prefix {
        font-size: 0.75rem;
    }

    .ys-text {
        overflow: hidden;
        min-width: 0;
    }

    .ys-name {
        font-size: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .ys-suffix {
        font-size: 0.7rem;
    }

    .ys-divider {
        margin: 0 10px;
        height: 30px;
    }

    .ys-meta {
        min-width: 50px;
    }

    .ys-heb-date {
        font-size: 1.1rem;
    }

    .ys-heb-month {
        font-size: 0.6rem;
    }

    .ys-nav {
        margin-right: 8px;
    }
}


/* STEP 1: Reason Selection */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.reason-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 14px 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
}

.reason-card:hover {
    border-color: var(--secondary-color);
    background: #f9fafb;
}

.reason-card.selected {
    border-color: var(--primary-color);
    background: #eefdf3;
    color: var(--primary-color);
    font-weight: 600;
}

.reason-card.error-border {
    border-color: #ef4444;
    background-color: #fff5f5;
    animation: dfpShake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* STEP 2: Amount Selection */
.donation-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.donation-grid .donation-card {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
}

@media (max-width: 800px) {
    .donation-grid .donation-card {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
}

@media (min-width: 801px) {
    .donation-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        /* Default align-items is stretch, ensuring equal height */
    }

    .donation-grid .donation-card {
        /* Calculate width for 3 items per row with 15px gap: (100% - 2*15px)/3 */
        width: calc((100% - 30px) / 3);
        flex: 0 0 calc((100% - 30px) / 3);
        max-width: none;

        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: auto;
        /* Flex stretch handles height */
    }

    .donation-card .price {
        margin-top: auto;
        padding-top: 15px;
    }
}

.donation-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    padding: 20px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    position: relative;
}

.donation-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.donation-card.selected {
    border-color: var(--primary-color);
    background: #eefdf3;
    box-shadow: 0 0 0 2px rgba(30, 158, 73, 0.1);
}

.donation-card.error {
    border-color: #ef4444;
    background-color: #fff5f5;
    animation: dfpShake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.donation-card .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: #f0fdf4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: 0.2s;
}

.donation-card.selected .icon-wrapper {
    background: white;
    color: var(--secondary-color);
}

.donation-card svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.donation-card .icon-wrapper img.dfp-custom-icon {
    max-width: 30px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.donation-card h3 {
    margin: 5px 0;
    font-size: 1rem;
    font-weight: 700;
}

.donation-card .price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.donation-card .card-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 8px 0;
    unicode-bidi: isolate;
}

.custom-amount-section {
    margin-top: 30px;
    padding: 25px;
    background: #fdfdfd;
    border: 1px solid #f1f2f6;
    border-radius: 20px;
    text-align: center;
}

#dfpSelectedProduct {
    display: none;
    /* User requested default hidden */
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}


.custom-amount-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 300px;
    margin: 10px auto;
}

.currency-prefix {
    position: absolute;
    right: 18px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    pointer-events: none;
}

.custom-amount-input {
    width: 100%;
    padding: 12px 35px 12px 12px;
    border: 2px solid #eef0f2;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
    color: var(--text-main);
}

.custom-amount-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Required field error state */
/* FLOATING LABELS */
.floating-group {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
}

.floating-group input {
    width: 100% !important;
    padding: 16px 16px !important;
    /* Balanced padding for vertical centering */
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    color: var(--text-main) !important;
    height: 56px !important;
    /* Fixed height for reliable centering */
    line-height: normal !important;
}

.floating-group .floating-label {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    z-index: 2;
    white-space: nowrap;
}

/* Specific offset for amount field with prefix */
.amount-group .floating-label {
    right: 42px;
}

.amount-group.has-value .floating-label,
.amount-group input:focus~.floating-label,
.amount-group input:not(:placeholder-shown)~.floating-label {
    right: 36px !important;
}

.currency-prefix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    z-index: 3;
    pointer-events: none;
}

/* Float logic */
.floating-group.has-value .floating-label,
.floating-group input:focus~.floating-label,
.floating-group input:not(:placeholder-shown)~.floating-label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    right: 12px;
    background: #fff;
    padding: 0 4px;
    color: var(--primary-color);
    font-weight: 600;
}

.floating-group input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(30, 158, 73, 0.1) !important;
    outline: none !important;
}

/* Custom Amount Specifics (Step 2) */
.custom-amount-section .custom-amount-wrapper {
    position: relative;
    width: 100%;
}

.custom-amount-wrapper .custom-amount-input {
    padding-right: 40px !important;
    padding-left: 15px !important;
    text-align: center !important;
    line-height: normal !important;
}

/* ERROR STATES FOR FLOATING LABELS */
.floating-group input.error {
    border-color: #ef4444 !important;
    background: #fff5f5 !important;
    animation: dfpShake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.floating-group input.error~.floating-label {
    color: #ef4444;
}

/* Hide WP Page Title on Destination Page */
body.dfp-form-active .entry-title,
body.dfp-form-active .page-title,
body.dfp-form-active h1.title,
body.dfp-form-active .post-title,
body.dfp-form-active .elementor-heading-title {
    display: none !important;
}

/* STEP 2: Payment Selection (Vertical Layout) */

.duration-selector-wrapper {
    width: auto;
    flex: 1;
    max-width: 200px;
    height: 50px;
    margin: 0;
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 5;
}

/* Remove legacy row-spacer if any */
.row-spacer {
    display: none !important;
}

.compact-select-container select:disabled {
    opacity: 0.7;
    background: #f3f4f6;
    cursor: default;
    color: var(--text-muted);
    border-color: #ccd0d4;
}


.compact-select-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.compact-select-container select {
    width: 100%;
    height: 100%;
    padding: 0 10px 0 28px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.85rem;
    /* Slightly smaller for compactness */
    font-weight: 500;
    background: #f9fafb;
    appearance: none;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
}

.compact-select-container select:focus {
    border-color: var(--primary-color);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 158, 73, 0.05);
}

.compact-select-container::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #9ca3af;
    border-bottom: 2px solid #9ca3af;
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
}

/* Toggle Switcher Styling */
.cycle-switcher-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 0;
    flex: 1;
    max-width: 200px;
}

.dfp-options-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 0 auto 0 auto;
    width: 100%;
    max-width: 300px;
    /* 200px * 2 + 20px gap */
}

@media (max-width: 450px) {
    .dfp-options-row {
        gap: 12px;
        max-width: 300px;
    }

    .cycle-switcher-wrapper,
    .duration-selector-wrapper {
        max-width: 100%;
        width: 100%;
    }
}

.cycle-switcher {
    position: relative;
    width: 100%;
    height: 44px;
    background: #f3f4f6;
    border-radius: 22px;
    padding: 4px;
    display: flex;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cycle-switcher input[type="checkbox"] {
    display: none;
}

.switcher-label {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    cursor: pointer;
    align-items: center;
}

.switcher-text {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 2;
    transition: color 0.3s ease;
    user-select: none;
    color: #6b7280;
}

.switcher-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Default state (One-time selected) - Checkbox NOT checked */
.ragil-text {
    color: var(--primary-color);
}

.hk-text {
    color: #6b7280;
}

.switcher-indicator {
    transform: translateX(0);
}

/* HK state (Monthly selected) - Checkbox IS checked */
.cycle-switcher input:checked~.switcher-label .hk-text {
    color: var(--primary-color);
}

.cycle-switcher input:checked~.switcher-label .ragil-text {
    color: #6b7280;
}

.cycle-switcher input:checked~.switcher-label .switcher-indicator {
    transform: translateX(-100%);
    /* RTL: switch moves to the left for HK */
}

/* Disabled State */
.cycle-switcher.disabled {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes inputShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* STEP 2: Details */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 15px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #e4e4e7;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="checkbox"]:checked+.toggle-switch {
    background: var(--primary-color);
}

input[type="checkbox"]:checked+.toggle-switch::after {
    transform: translateX(18px);
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: vertical;
}

.payment-type-group {
    display: flex;
    gap: 15px;
}

.radio-card {
    flex: 1;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.radio-card.selected {
    border-color: var(--primary-color);
    background: #eefdf3;
    color: var(--primary-color);
    font-weight: bold;
}

/* DATEPICKER CSS (Modal Version) */
.datepicker-wrapper {
    position: relative;
    width: 100%;
    display: none;
}

.datepicker-wrapper.visible {
    display: block;
}

.datepicker-trigger {
    width: 100%;
    max-width: 350px;
    margin: 20px auto;
    padding: 30px 20px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: white;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-main);
    text-align: center;
}

.datepicker-trigger:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.datepicker-trigger svg {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* ══════════════════════════════════════════
   LOCKED DATE TRIGGER (YAHRZEIT MODE)
   ══════════════════════════════════════════ */
.datepicker-trigger.is-locked {
    background: #fdfdfd;
    border-color: #d1d5db;
    cursor: default;
    pointer-events: none;
    /* Prevent clicks */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    height: auto;
    min-height: 80px;
    box-shadow: none !important;
    transform: none !important;
}

.datepicker-trigger.is-locked svg {
    display: none;
}

.locked-yahrzeit-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    text-align: center;
}

.locked-label-top {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 2px;
}

.yahrzeit-title {
    font-size: 1.1rem;
    font-weight: 400;
    /* Standard weight as requested */
    color: var(--primary-color);
    margin-bottom: 2px;
}

.yahrzeit-date {
    font-size: 1rem;
    color: #4b5563;
    font-weight: 500;
}

.yahrzeit-date .small-date {
    font-size: 0.85em;
    opacity: 0.8;
}

/* Intl-Tel-Input Styling */
.iti {
    display: block;
    width: 100%;
    direction: ltr;
}

/* Ensure the flag container is clickable and visible */
.iti__flag-container {
    z-index: 5;
}

/* International Phone Input Fixes */
.iti,
.iti * {
    direction: ltr !important;
}

input#dfpPhone {
    width: 100% !important;
    text-align: left !important;
    padding-right: 12px !important;
    unicode-bidi: bidi-override !important;
}

/* Space between dial code and number */
.iti__selected-dial-code {
    margin-right: 8px !important;
}

/* Position the country/flag container to the absolute left */
.iti__country-container {
    left: 0 !important;
    right: auto !important;
}

/* Ensure the selected country display is also LTR and left-aligned */
.iti__selected-country {
    padding-left: 8px !important;
    padding-right: 4px !important;
    white-space: nowrap !important;
}

/* Arrow spacing from flag */
.iti__selected-country-primary .iti__arrow,
.iti .iti__arrow {
    margin-left: 6px !important;
}

/* Prevent line break in country selector on mobile */
.iti__selected-country {
    display: flex !important;
    align-items: center !important;
    padding-top: 0 !important;
    /* Centered naturally now */
    border: none !important;
}

.iti__flag-container {
    height: 100% !important;
}

/* Ensure dial code and number are centered together */
#dfpPhone {
    line-height: 1.2 !important;
}

/* Mobile: fix phone input prefix layout */
@media (max-width: 480px) {

    /* Hide dial code on mobile - only show flag */
    .iti__selected-dial-code {
        display: none !important;
    }

    .iti__selected-country {
        padding-left: 4px !important;
        padding-right: 2px !important;
    }

    .iti .iti__arrow {
        margin-left: 2px !important;
    }

    .iti__country-container {
        width: 48px !important;
    }
}

/* Hover on flag/country selector — uses plugin primary color */
.iti__selected-country-primary:hover,
.iti__selected-country-primary:focus,
.iti__selected-country:hover,
.iti__selected-country:focus {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.iti__dropdown-content {
    width: 350px !important;
    max-width: 90vw !important;
    text-align: left !important;
}

/* Country list hover — uses plugin primary color */
.iti__country:hover,
.iti__country.iti__highlight {
    background-color: rgba(30, 158, 73, 0.12) !important;
    /* fallback */
    background-color: color-mix(in srgb, var(--primary-color) 12%, transparent) !important;
}

/* Red border for error */
input#dfpPhone.error {
    border-color: #dc3232 !important;
}

.datepicker-trigger:focus-visible,
.datepicker-trigger:active,
.datepicker-wrapper.active .datepicker-trigger {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
}

.datepicker-trigger.placeholder {
    color: #9ca3af;
}

.small-date {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-right: 6px;
    font-weight: 400;
}

.calendar-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    width: 90%;
    max-width: 480px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 4px;
    z-index: 999999;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transform-origin: center center;
    pointer-events: none;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    overflow: visible;
}

.calendar-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.5);
}

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.year-display {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-left: 8px;
}

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    color: var(--text-main);
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(30, 158, 73, 0.12);
    /* fallback */
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
}

.nav-btn:active {
    background: rgba(30, 158, 73, 0.2);
    /* fallback */
    background: color-mix(in srgb, var(--primary) 20%, transparent);
}

.btn-jump-today {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px;
}

.btn-jump-today:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(30, 158, 73, 0.05);
}

.current-month-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.year-main {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

.year-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.calendar-grid {
    padding: 16px;
    overflow: visible;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    overflow: visible;
}

.day-cell {
    position: relative;
    background: white;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    user-select: none;
    padding-top: 10px;
}

.day-cell.is-past {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
    filter: grayscale(1);
}

.day-cell:hover {
    background: #f3f4f6;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.day-cell.selected {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 158, 73, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    z-index: 5;
}

.day-cell.pending-selection {
    box-shadow: inset 0 0 0 3px var(--primary);
    background: rgba(30, 158, 73, 0.08);
}

.day-cell.selected .gregorian-date {
    color: rgba(255, 255, 255, 0.9);
}

.day-cell.info-active {
    border: 2px solid var(--primary) !important;
    background: rgba(30, 158, 73, 0.05);
    animation: cellPulse 1.5s infinite ease-in-out;
}

@keyframes cellPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 158, 73, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(30, 158, 73, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(30, 158, 73, 0);
    }
}

.day-cell.disabled {
    opacity: 0.4;
    pointer-events: none;
    background: #f9f9f9;
    cursor: not-allowed;
    border-color: transparent;
}

.day-cell .hebrew-num {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.day-cell .gregorian-date {
    font-size: 0.7rem;
    color: #9ca3af;
    position: absolute;
    bottom: 4px;
    right: 6px;
    font-weight: 500;
}

/* Mobile: smaller calendar text for less cramped view */
@media (max-width: 480px) {
    .day-cell {
        height: 52px;
        padding-top: 8px;
    }

    .day-cell .hebrew-num {
        font-size: 1.1rem;
    }

    .day-cell .gregorian-date {
        font-size: 0.6rem;
        bottom: 2px;
        right: 4px;
    }

    .weekdays {
        font-size: 0.8rem;
    }

    .days-grid {
        gap: 4px;
    }

    .calendar-grid {
        padding: 10px;
    }

    .current-month-label .month-text {
        font-size: 1rem !important;
    }
}

.day-cell.is-shabbat {
    background-color: var(--shabbat-bg) !important;
    color: var(--shabbat-text) !important;
    border-color: transparent !important;
}

.day-cell.is-holiday {
    background-color: var(--holiday-bg);
    color: var(--holiday-text);
    border: 1px solid rgba(194, 65, 12, 0.2);
}

.day-cell.is-chol-hamoed {
    background-color: var(--chol-hamoed-bg);
    color: var(--chol-hamoed-text);
}

.day-cell.is-fast {
    background-color: var(--fast-bg);
    color: var(--fast-text);
    border: 1px solid rgba(185, 28, 28, 0.2);
}

.day-cell.is-today {
    box-shadow: inset 0 0 0 2px var(--today-ring);
}

.donation-icon {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    display: none;
}

.day-cell.has-donations .donation-icon {
    display: block;
}

.memorial-candle {
    position: absolute;
    bottom: 4px;
    left: 8px;
    width: 10px;
    height: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.tiny-flame {
    width: 5px;
    height: 7px;
    background: radial-gradient(circle at 50% 100%, #fffde7, #ffd600, #ff6d00);
    border-radius: 50% 50% 20% 20% / 80% 80% 20% 20%;
    animation: tinyFlicker 0.5s infinite alternate ease-in-out;
    position: relative;
    z-index: 2;
}

/* Tiny wick */
.tiny-flame::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 3px;
    background: #444;
    z-index: -1;
}

.tiny-candle-body {
    width: 6px;
    height: 8px;
    background: linear-gradient(to right, #f1f5f9, #ffffff, #f1f5f9);
    border-radius: 1px;
    border: 1px solid #e2e8f0;
    margin-top: -1px;
}

@keyframes tinyFlicker {
    0% {
        transform: scale(1) translateY(0);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.1) translateY(-1px);
        opacity: 1;
    }
}

/* Floating Tooltip (appended to body, not affected by modal transform) */
.floating-tooltip {
    position: fixed;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    z-index: 99999999;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    /* Information only */
    opacity: 0;
    transition: opacity 0.15s ease;
    display: none;
    font-family: inherit;
    direction: rtl;
}

.floating-tooltip.visible {
    opacity: 1;
}

/* Legacy tooltip (hidden, using floating instead) */
.custom-tooltip {
    display: none !important;
}

.tooltip-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tooltip-section+.tooltip-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tooltip-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.tooltip-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.tooltip-section.parasha .tooltip-value {
    background: linear-gradient(135deg, var(--primary), #4338ca);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tooltip-item {
    font-size: 0.9rem;
    color: var(--holiday-text);
    font-weight: 500;
    padding: 2px 0;
}


.status-bar {
    padding: 10px 16px;
    background: #f9fafb;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Footer Control */
.calendar-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: center;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.btn-confirm-date {
    background: #cbd5e0;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.2s ease;
    width: 80%;
}

.btn-confirm-date.active {
    background: var(--btn-gradient);
    cursor: pointer;
}

.btn-confirm-date.active:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(22, 101, 52, 0.2);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    backdrop-filter: blur(2px);
    border-radius: 16px;
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid var(--primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden-el {
    display: none !important;
}

.empty-cell {
    pointer-events: none;
}

/* Navigation Buttons */
.nav-actions {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}

button {
    padding: 12px 24px;
    border-radius: 30px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-next {
    background: var(--btn-gradient);
    color: white;
    box-shadow: 0 4px 6px rgba(30, 158, 73, 0.2);
}

.btn-next:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 12px rgba(30, 158, 73, 0.3);
    transform: translateY(-1px);
}

.btn-prev {
    background: #f1f2f6;
    color: #2d3436;
}

.btn-prev:hover {
    background: #e2e6ea;
    color: #000;
}

/* Result Messages */
.result-message {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.result-icon.success {
    color: var(--primary);
}

.result-icon.error {
    color: #ef4444;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.result-text {
    color: #4b5563;
    margin-bottom: 20px;
}

.result-detail {
    background: #f3f4f6;
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #374151;
    display: inline-block;
}

/* -------------------------------------------------------------------------- */
/*                        ANIMATED SUCCESS CHECKMARK                          */
/* -------------------------------------------------------------------------- */
.dfp-checkmark-circle {
    width: 80px;
    height: 80px;
    position: relative;
    display: inline-block;
    vertical-align: top;
    margin-bottom: 20px;
}

.dfp-checkmark-circle .background {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #2ECC71;
    position: absolute;
    transform: scale(0);
    animation: dfpFill .4s ease-in-out .4s forwards, dfpScale .3s ease-in-out .9s both;
}

.dfp-checkmark-circle .checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #2ECC71;
    animation: dfpFill .4s ease-in-out .4s forwards, dfpScale .3s ease-in-out .9s both;
    position: relative;
    z-index: 10;
}

.dfp-checkmark-circle .check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: dfpStroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes dfpStroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes dfpScale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes dfpFill {
    100% {
        box-shadow: inset 0px 0px 0px 50px #2ECC71;
    }
}

/* =========================================
   CENTERED CALENDAR MODAL OVERLAY
   ========================================= */
.calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* =========================================
   CUSTOM ALERT MODAL SYSTEM
   ========================================= */
.dfp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    direction: rtl;
}

.dfp-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dfp-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 400px;
    padding: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.dfp-modal-overlay.active .dfp-modal {
    transform: scale(1) translateY(0);
}

.dfp-modal-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.dfp-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dfp-modal-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.dfp-modal-icon.error {
    background: #fee2e2;
    color: #dc2626;
}

.dfp-modal-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.dfp-modal-icon.info {
    background: #dbeafe;
    color: #2563eb;
}

.dfp-modal-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.dfp-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.dfp-modal-body {
    padding: 20px 24px;
}

.dfp-modal-message {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.dfp-modal-footer {
    padding: 16px 24px;
    background: #f9fafb;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.dfp-modal-btn {
    padding: 12px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.dfp-modal-btn.primary {
    background: var(--btn-gradient);
    color: white;
    box-shadow: 0 4px 6px rgba(30, 158, 73, 0.2);
}

.dfp-modal-btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.dfp-modal-btn.secondary {
    background: #e5e7eb;
    color: #374151;
}

.dfp-modal-btn.secondary:hover {
    background: #d1d5db;
}

/* Modal shake animation for emphasis */
@keyframes modalShake {

    0%,
    100% {
        transform: scale(1) translateY(0) translateX(0);
    }

    25% {
        transform: scale(1) translateY(0) translateX(-5px);
    }

    75% {
        transform: scale(1) translateY(0) translateX(5px);
    }
}

.dfp-modal.shake {
    animation: modalShake 0.3s ease;
}

/* Error State — only on form inputs */
input.error,
textarea.error,
select.error {
    border-color: #dc3232 !important;
}

input#dfpPhone.error+.iti__flag-container {
    border-bottom: 2px solid #dc3232;
}



/* ═══ FIXED NAVIGATION ═══ */
#dfpWizardForm {
    display: flex;
    flex-direction: column;
    min-height: 520px;
    /* Ensure consistent height for steps */
}

/* Ensure active step takes available space if needed */
.step-content.active {
    flex: 1;
}

.nav-actions {
    margin-top: auto;
    /* Push to bottom */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle separator */
    padding-top: 20px;
}

@media (max-width: 600px) {
    #dfpWizardForm {
        min-height: 480px;
        /* Slightly shorter on mobile */
    }

    .dfp-wrapper {
        overflow-x: hidden;
    }
}

/* Product Label in Step 2 */
.selected-product-label {
    text-align: center;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 15px;
    min-height: 24px;
    font-size: 1.1rem;
    transition: opacity 0.3s;
}

/* ══════════════════════════════════════════
   MOBILE LAYOUT ADJUSTMENTS (max-width: 768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {

    /* TOPIC 1: Step 1 - Reasons Grid (One per row) */
    .reasons-grid {
        grid-template-columns: 1fr;
        /* Force single column */
    }

    /* TOPIC 2: Step 2 - Donation Cards (Horizontal Layout) */
    .donation-grid {
        flex-direction: column;
        /* Stack cards vertically */
        align-items: stretch;
    }

    .donation-grid .donation-card {
        flex: 0 0 100%;
        /* Full width */
        max-width: 100%;
        display: grid;
        grid-template-columns: auto 1fr;
        /* Icon | Text */
        grid-template-rows: auto auto auto;
        /* Title, Subtitle, Price */
        align-items: center;
        text-align: right;
        /* Align text to start (RTL) */
        padding: 15px;
        gap: 0 15px;
        /* Gap between columns */
    }

    /* Icon Wrapper - Spans all rows in first column */
    .donation-card .icon-wrapper {
        grid-column: 1;
        grid-row: 1 / -1;
        /* Span all rows */
        margin: 0;
        /* Remove bottom margin */
        width: 50px;
        height: 50px;
    }

    .donation-card svg {
        width: 24px;
        height: 24px;
    }

    /* Text Elements - Second Column */
    .donation-card h3 {
        grid-column: 2;
        margin: 0;
        font-size: 1.05rem;
        line-height: 1.2;
    }

    .donation-card .card-subtitle {
        grid-column: 2;
        margin: 2px 0 0 0;
        font-size: 0.85rem;
    }

    .donation-card .price {
        grid-column: 2;
        margin-top: 4px;
        font-size: 1rem;
    }
}

/* ══════════════════════════════════════════
   INLINE ERROR MESSAGE
   ══════════════════════════════════════════ */
.dfp-error-message {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    margin: 10px 30px;
    font-weight: 500;
    text-align: center;
    font-size: 0.95rem;
    animation: dfpShake 0.4s cubic-bezier(.36, .07, .19, .97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

@keyframes dfpShake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Visibility Utility */
.dfp-hidden {
    display: none !important;
}

.btn-next {
    margin-right: auto !important;
    /* Push to left in RTL when back button is hidden */
}

/* Step 2 Layout Refactor Overrides */
.custom-amount-section {
    margin-top: 10px !important;
    margin-bottom: 20px !important;
    padding: 10px 0 !important;
}

.donation-grid {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure compact layout */
#step2Title {
    margin-bottom: 15px !important;
}

/* Phone Input Alignment */
#dfpPhone {
    text-align: left !important;
    direction: ltr !important;
}

/* Step 5 needs relative positioning for the payment loader overlay */
#step-5 {
    position: relative;
}

/* ══════════════════════════════════════════
   PAYMENT PROCESSING LOADER
   ══════════════════════════════════════════ */
.dfp-payment-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border-radius: 12px;
    animation: dfpLoaderFadeIn 0.3s ease;
}

@keyframes dfpLoaderFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dfp-payment-loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.dfp-payment-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: dfpPaySpin 0.8s linear infinite;
}

@keyframes dfpPaySpin {
    to { transform: rotate(360deg); }
}

.dfp-payment-loader-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
}

.dfp-payment-loader-subtext {
    font-size: 0.9rem;
    color: #6b7280;
}