/* Jalali Datepicker - Professional Persian Date Picker */
.jdp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: background 0.25s ease, opacity 0.25s ease;
}
.jdp-overlay.jdp-open {
    opacity: 1;
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.jdp-picker {
    width: 320px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28), 0 4px 14px rgba(15, 23, 42, 0.12);
    padding: 16px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    border: 1px solid rgba(226, 232, 240, 0.9);
}
.jdp-picker.jdp-in {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header */
.jdp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    margin: -16px -16px 12px -16px;
    padding: 14px 16px;
    border-radius: 17px 17px 0 0;
    color: #fff;
}
.jdp-title { text-align: center; line-height: 1.35; }
.jdp-month { font-size: 16px; font-weight: 700; }
.jdp-year { font-size: 12px; opacity: 0.75; margin-top: 2px; }
.jdp-nav {
    width: 34px; height: 34px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease;
    font-size: 14px;
}
.jdp-nav:hover { background: rgba(255, 255, 255, 0.24); }
.jdp-nav:active { transform: scale(0.92); }

/* Weekdays */
.jdp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 6px;
}
.jdp-wd {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    padding: 4px 0;
}
.jdp-wd-friday { color: #e2b9b9; }

/* Days */
.jdp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.jdp-day {
    aspect-ratio: 1 / 1;
    border: none;
    background: #f8fafc;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
    padding: 0;
}
.jdp-day:hover:not(.jdp-disabled) {
    background: #dbeafe;
    color: #1d4ed8;
    transform: translateY(-1px);
}
.jdp-day.jdp-blank { background: transparent; cursor: default; }
.jdp-day.jdp-friday { color: #c0392b; background: #fdf3f3; }
.jdp-day.jdp-today {
    background: #ecfdf5;
    color: #047857;
    font-weight: 700;
    box-shadow: inset 0 0 0 1.5px #10b981;
}
.jdp-day.jdp-holiday { background: #fdf3f3; color: #c0392b; }
.jdp-day.jdp-holiday:hover { background: #fbe3e1; color: #a93226; }
.jdp-day.jdp-selected {
    background: linear-gradient(135deg, #3b82f6, #1e3a5f) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.jdp-day.jdp-disabled {
    color: #cbd5e1;
    background: #f8fafc;
    cursor: not-allowed;
    opacity: 0.55;
}

/* Footer */
.jdp-footer {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.jdp-footer button {
    flex: 1;
    padding: 8px 0;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.jdp-today-btn { background: #eff6ff; color: #1d4ed8; }
.jdp-today-btn:hover { background: #dbeafe; }
.jdp-clear-btn { background: #f1f5f9; color: #64748b; }
.jdp-clear-btn:hover { background: #e2e8f0; }

/* Input affordance */
input[data-jdp] {
    background-color: #fff;
    cursor: pointer !important;
}
.form-group input[data-jdp] {
    padding-left: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%2394a3b8' d='M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zm64 80v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm128 0v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H272c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H336zM64 400v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H208zm112 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H336c-8.8 0-16 7.2-16 16z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 15px;
}
