.jalali-datepicker {
    position: absolute;
    z-index: 99999;

    width: 320px;
    max-width: calc(100vw - 20px);

    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 12px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.15);

    padding: 12px;

    direction: rtl;

    font-family:
        Tahoma,
        Arial,
        sans-serif;

    display: none;
}

.jalali-datepicker.open {
    display: block;
}

.jalali-datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 12px;
}

.jalali-current-month {
    font-size: 15px;
    font-weight: bold;
    color: #333333;

    text-align: center;

    flex: 1;
}

/* =========================================================
   انتخاب ماه و سال در تقویم جلالی
   ========================================================= */

.jalali-current-month {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
}

.jalali-month-selector,
.jalali-year-selector {
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #333333;
    font-size: 15px;
    font-weight: bold;
    padding: 6px 8px;
    cursor: pointer;
}

.jalali-month-selector:hover,
.jalali-year-selector:hover {
    background: #f0f0f0;
    border-color: #dddddd;
}

.jalali-picker-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.jalali-picker-option {
    min-height: 40px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    font-size: 13px;
}

.jalali-picker-option:hover {
    background: #f0f0f0;
}

.jalali-picker-option.selected {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    font-weight: bold;
}

.jalali-year-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.jalali-year-navigation button {
    width: 36px;
    height: 36px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #f7f7f7;
    color: #333333;
    cursor: pointer;
}

.jalali-year-navigation button:hover {
    background: #eeeeee;
}

.jalali-datepicker-header button {
    width: 36px;
    height: 36px;

    border: 1px solid #dddddd;
    border-radius: 8px;

    background: #f7f7f7;
    color: #333333;

    cursor: pointer;

    font-size: 22px;
    line-height: 1;
}

.jalali-datepicker-header button:hover {
    background: #eeeeee;
}

.jalali-weekdays,
.jalali-days {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    gap: 4px;
}

.jalali-weekdays {
    margin-bottom: 5px;
}

.jalali-weekdays div {
    text-align: center;

    font-size: 12px;
    font-weight: bold;

    color: #777777;

    padding: 6px 0;
}

.jalali-day {
    min-width: 0;

    height: 36px;

    border: 1px solid transparent;
    border-radius: 8px;

    background: #ffffff;

    color: #333333;

    cursor: pointer;

    font-size: 13px;
}

.jalali-day:hover {
    background: #f0f0f0;
    border-color: #cccccc;
}

.jalali-day.today {
    border-color: #999999;
    font-weight: bold;
}

.jalali-day.selected {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    font-weight: bold;
}

.jalali-day.selected:hover {
    background: #1d4ed8;
}

.jalali-day.empty {
    cursor: default;
    background: transparent;
}

.jalali-day.empty:hover {
    background: transparent;
    border-color: transparent;
}

.jalali-datepicker-footer {
    display: flex;

    justify-content: space-between;

    gap: 8px;

    margin-top: 12px;

    padding-top: 10px;

    border-top: 1px solid #eeeeee;
}

.jalali-datepicker-footer button {
    flex: 1;

    min-height: 36px;

    border: 1px solid #dddddd;
    border-radius: 8px;

    background: #f8f8f8;

    color: #333333;

    cursor: pointer;

    font-family: inherit;
    font-size: 12px;
}

.jalali-datepicker-footer button:hover {
    background: #eeeeee;
}

@media (max-width: 480px) {

    .jalali-datepicker {
        width: 300px;
    }

    .jalali-day {
        height: 34px;
        font-size: 12px;
    }
}