/* Jalali popup date picker */

.jdp-field {
    position: relative;
}
.jdp-display {
    cursor: pointer;
    background: #fff;
    padding-left: 2.4rem;
}
.jdp-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #2563eb;
    pointer-events: none;
    font-size: 1rem;
}
.jdp-hidden-source {
    display: none !important;
}

.jdp-popup {
    position: absolute;
    z-index: 2300;
    width: 280px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    padding: 10px;
}

.jdp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 2px 2px 8px;
    border-bottom: 1px solid #f1f5f9;
}
.jdp-head strong {
    font-size: 0.9rem;
}
.jdp-nav {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8fafc;
    border-radius: 8px;
    color: #2563eb;
    cursor: pointer;
}
.jdp-nav:hover { background: #eff6ff; }

.jdp-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.jdp-week span {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #94a3b8;
    padding: 4px 0;
}
.jdp-week span:last-child { color: #ef4444; }

.jdp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.jdp-day {
    aspect-ratio: 1;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: #0f172a;
}
.jdp-day.empty {
    cursor: default;
    visibility: hidden;
}
.jdp-day:hover { background: #eff6ff; }
.jdp-day.today {
    box-shadow: inset 0 0 0 1.5px #2563eb;
    color: #2563eb;
}
.jdp-day.selected {
    background: #2563eb;
    color: #fff;
}

.jdp-time {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}
.jdp-time label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.jdp-time select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
    font-size: 0.85rem;
}
.jdp-ok {
    border: none;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    height: 36px;
}

@media (max-width: 576px) {
    .jdp-popup {
        position: fixed;
        left: 50% !important;
        right: auto !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        width: calc(100vw - 24px);
        max-width: 320px;
    }
}
