/* ============================================================
   jalali-datepicker.css — ظاهرِ تقویمِ شمسیِ سفارشی
   از متغیرهای رنگِ اپ استفاده می‌کند تا با تم روشن/تیره هماهنگ باشد.
   ============================================================ */
.jdp2 {
    position: absolute;
    z-index: 100000;
    width: 288px;
    background: var(--surface, #fff);
    color: var(--text, #1f2a3a);
    border: 1px solid var(--border, #e4e9f1);
    border-radius: 14px;
    box-shadow: 0 10px 34px rgba(20, 35, 60, .18);
    padding: 10px;
    direction: rtl;
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
    animation: jdp2-in .12s ease;
}

@keyframes jdp2-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* سربرگ */
.jdp2-head {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}
.jdp2-nav {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: var(--surface-2, #f6f8fc);
    color: var(--text, #1f2a3a);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s;
}
.jdp2-nav:hover { background: var(--gold, #C8A96E); color: #fff; }
.jdp2-title {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text, #1f2a3a);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 8px;
    text-align: center;
}
.jdp2-title:hover { background: var(--surface-2, #f6f8fc); }

/* ردیفِ نامِ روزها */
.jdp2-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}
.jdp2-week span {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #8a93a3);
    padding: 4px 0;
}
.jdp2-week span.fri { color: var(--danger, #e74c3c); }

/* شبکهٔ روزها */
.jdp2-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.jdp2-empty { height: 34px; }
.jdp2-day {
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text, #1f2a3a);
    font-family: inherit;
    font-size: 13px;
    border-radius: 9px;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.jdp2-day:hover { background: var(--surface-2, #eef1f6); }
.jdp2-day.holiday { color: var(--danger, #e74c3c); font-weight: 600; }
.jdp2-day.today {
    box-shadow: inset 0 0 0 1.5px var(--gold, #C8A96E);
    font-weight: 700;
}
.jdp2-day.selected {
    background: var(--accent, #359479) !important;
    color: #fff !important;
    font-weight: 700;
}

/* پابرگ */
.jdp2-foot {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border, #e4e9f1);
}
.jdp2-btn {
    flex: 1;
    border: none;
    border-radius: 9px;
    padding: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent, #359479);
    color: #fff;
    transition: opacity .15s;
}
.jdp2-btn:hover { opacity: .9; }
.jdp2-btn.ghost {
    background: var(--surface-2, #f6f8fc);
    color: var(--muted, #8a93a3);
}

/* شبکهٔ ماه‌ها */
.jdp2-mgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.jdp2-mo {
    padding: 12px 4px;
    border: none;
    border-radius: 9px;
    background: var(--surface-2, #f6f8fc);
    color: var(--text, #1f2a3a);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.jdp2-mo:hover { background: var(--gold, #C8A96E); color: #fff; }
.jdp2-mo.selected { background: var(--accent, #359479); color: #fff; font-weight: 700; }

/* شبکهٔ سال‌ها */
.jdp2-ygrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.jdp2-yr {
    padding: 12px 4px;
    border: none;
    border-radius: 9px;
    background: var(--surface-2, #f6f8fc);
    color: var(--text, #1f2a3a);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.jdp2-yr:hover { background: var(--gold, #C8A96E); color: #fff; }
.jdp2-yr.selected { background: var(--accent, #359479); color: #fff; font-weight: 700; }

/* موبایل: هدفِ لمسِ بزرگ‌تر (عرض ثابت می‌ماند تا جای‌گذاریِ JS نشکند) */
@media (max-width: 600px) {
    .jdp2-day, .jdp2-empty { height: 38px; }
    .jdp2-day { font-size: 14px; }
    .jdp2-nav { width: 34px; height: 34px; }
    .jdp2-btn { padding: 10px; }
}

/* ============================================================
   انتخابگرِ ساعتِ ۲۴ساعته (.tp2) — هم‌خوان با تقویمِ بالا
   ============================================================ */
.tp2 {
    position: absolute;
    z-index: 100000;
    width: 236px;
    background: var(--surface, #fff);
    color: var(--text, #1f2a3a);
    border: 1px solid var(--border, #e4e9f1);
    border-radius: 14px;
    box-shadow: 0 10px 34px rgba(20, 35, 60, .18);
    padding: 12px;
    direction: rtl;
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
    animation: jdp2-in .12s ease;
}

/* نمایشِ درشتِ زمانِ انتخاب‌شده */
.tp2-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    direction: ltr;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text, #1f2a3a);
    background: var(--surface-2, #f6f8fc);
    border-radius: 11px;
    padding: 8px 0;
    margin-bottom: 10px;
}
.tp2-colon { opacity: .5; margin: 0 1px; }

/* دو ستونِ ساعت/دقیقه */
.tp2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.tp2-collabel {
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted, #8a93a3);
    margin-bottom: 5px;
}
.tp2-list {
    max-height: 172px;
    overflow-y: auto;
    display: grid;
    gap: 4px;
    padding-inline-end: 3px;
    scrollbar-width: thin;
    scrollbar-color: var(--border, #e4e9f1) transparent;
}
.tp2-list::-webkit-scrollbar { width: 6px; }
.tp2-list::-webkit-scrollbar-thumb { background: var(--border, #e4e9f1); border-radius: 6px; }
.tp2-list::-webkit-scrollbar-track { background: transparent; }
.tp2-item {
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text, #1f2a3a);
    font-family: inherit;
    font-size: 14px;
    border-radius: 9px;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.tp2-item:hover { background: var(--surface-2, #eef1f6); }
.tp2-item.selected {
    background: var(--accent, #359479);
    color: #fff;
    font-weight: 700;
}

/* پابرگ */
.tp2-foot {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border, #e4e9f1);
}
.tp2-btn {
    flex: 1;
    border: none;
    border-radius: 9px;
    padding: 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: var(--accent, #359479);
    color: #fff;
    transition: opacity .15s, background .15s;
}
.tp2-btn:hover { opacity: .92; }
.tp2-btn.ghost { background: var(--surface-2, #f6f8fc); color: var(--muted, #8a93a3); }
.tp2-btn.ghost:hover { background: var(--border, #e4e9f1); color: var(--text, #1f2a3a); opacity: 1; }

@media (max-width: 600px) {
    .tp2-item { height: 38px; font-size: 15px; }
    .tp2-btn { padding: 11px; }
}
