/* =============================================================================
 *  jdate_picker.css — استایل اسکرول‌پیکر تاریخ شمسی
 *  هماهنگ با زبان بصری پروژه: سرمه‌ای عمیق + طلایی، شیشه‌ای، RTL
 * ========================================================================== */

/* ---------- فیلد ورودی ---------- */
.jdp-field { position: relative; }

.jdp-input {
    cursor: pointer;
    caret-color: transparent;
    padding-inline-end: 42px !important;
    direction: ltr;
    text-align: center;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}
.jdp-input:hover { border-color: rgba(255, 178, 0, 0.55) !important; }

.jdp-icon {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #ffb200;
    background: rgba(255, 178, 0, 0.10);
    cursor: pointer;
    pointer-events: auto;
    transition: background .18s ease, transform .12s ease;
    z-index: 3;
}
.jdp-icon:hover  { background: rgba(255, 178, 0, 0.22); }
.jdp-icon:active { transform: translateY(-50%) scale(.92); }


/* ---------- پوشش تمام‌صفحه ---------- */
body.jdp-open { overflow: hidden; }

.jdp-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(5, 7, 26, 0.72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity .18s ease;
}
.jdp-overlay.is-visible { opacity: 1; }
.jdp-overlay[hidden]    { display: none !important; }


/* ---------- کارت ---------- */
.jdp-sheet {
    width: 100%;
    max-width: 380px;
    border-radius: 24px;
    border: 1px solid rgba(255, 178, 0, 0.28);
    background: linear-gradient(160deg, rgba(24, 18, 100, 0.99), rgba(12, 10, 62, 0.99));
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
    padding: 18px 18px 16px;
    transform: translateY(14px) scale(.97);
    transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.jdp-overlay.is-visible .jdp-sheet { transform: translateY(0) scale(1); }


/* ---------- سربرگ ---------- */
.jdp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.jdp-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}
.jdp-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}
.jdp-close:hover { background: rgba(231, 76, 60, 0.18); color: #ff9d94; }


/* ---------- پیش‌نمایش مقدار انتخاب‌شده ---------- */
.jdp-preview {
    text-align: center;
    padding: 11px 12px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: rgba(255, 178, 0, 0.10);
    border: 1px solid rgba(255, 178, 0, 0.22);
}
.jdp-preview-val {
    font-size: 17px;
    font-weight: 800;
    color: #ffd873;
    letter-spacing: .6px;
    font-variant-numeric: tabular-nums;
}


/* ---------- ستون‌های چرخ ---------- */
.jdp-cols {
    position: relative;
    display: grid;
    grid-template-columns: 1.25fr 1.6fr 1fr;
    gap: 8px;
}

.jdp-col { display: flex; flex-direction: column; min-width: 0; }

.jdp-col-label {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.42);
    margin-bottom: 6px;
}

/* نوار طلایی وسط — نشان می‌دهد کدام آیتم انتخاب شده است */
.jdp-band {
    position: absolute;
    inset-inline: 0;
    top: calc(17px + 2 * 44px);     /* ارتفاع برچسب + دو آیتم بالایی */
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 178, 0, 0.12);
    border: 1px solid rgba(255, 178, 0, 0.38);
    pointer-events: none;
}

.jdp-wheel {
    position: relative;
    height: 220px;                  /* ۵ آیتم × ۴۴ پیکسل */
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    outline: none;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
            mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.jdp-wheel::-webkit-scrollbar { display: none; }
.jdp-wheel:focus-visible { box-shadow: 0 0 0 2px rgba(255, 178, 0, .6); border-radius: 12px; }

.jdp-wheel ul { list-style: none; margin: 0; padding: 0; }

.jdp-wheel li {
    height: 44px;
    line-height: 44px;
    scroll-snap-align: center;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
    transition: color .15s ease;
    will-change: transform, opacity;
    font-variant-numeric: tabular-nums;
}
.jdp-wheel li.jdp-pad { cursor: default; pointer-events: none; }
.jdp-wheel li.is-active { color: #ffd873; font-size: 16.5px; }


/* ---------- دکمه‌ها ---------- */
.jdp-actions {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 10px;
    margin-top: 16px;
}
.jdp-btn {
    min-height: 48px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
}
.jdp-btn:active { transform: translateY(1px); }

.jdp-cancel {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.82);
}
.jdp-cancel:hover { background: rgba(255, 255, 255, 0.12); }

.jdp-ok {
    background: linear-gradient(180deg, #ffc233, #ffb200);
    color: #1a1206;
    box-shadow: 0 8px 22px rgba(255, 178, 0, 0.28);
}
.jdp-ok:hover { box-shadow: 0 10px 28px rgba(255, 178, 0, 0.42); }


/* ---------- موبایل: از پایین بالا می‌آید ---------- */
@media (max-width: 520px) {
    .jdp-overlay { align-items: flex-end; padding: 0; }
    .jdp-sheet {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        transform: translateY(100%);
    }
    .jdp-overlay.is-visible .jdp-sheet { transform: translateY(0); }
    .jdp-wheel li { font-size: 16px; }
}

/* ---------- احترام به تنظیم کاهش انیمیشن ---------- */
@media (prefers-reduced-motion: reduce) {
    .jdp-overlay, .jdp-sheet, .jdp-wheel li, .jdp-btn { transition: none !important; }
    .jdp-wheel { scroll-behavior: auto; }
}
