.persian-datepicker {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    width: 280px;
    font-family: Tahoma, sans-serif;
    display: none;
    direction: rtl
}

.persian-datepicker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #2d7d46;
    color: white;
    border-radius: 8px 8px 0 0
}

.persian-datepicker-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px
}

.persian-datepicker-header button:hover {
    background: rgba(255, 255, 255, 0.3)
}

.persian-datepicker-header .month-year {
    font-weight: bold;
    font-size: 14px
}

.persian-datepicker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 10px;
    gap: 2px
}

.persian-datepicker-grid .day-name {
    text-align: center;
    font-size: 11px;
    color: #7f8c8d;
    padding: 8px 0;
    font-weight: bold
}

.persian-datepicker-grid .day-name.friday {
    color: #e74c3c
}

.persian-datepicker-grid .day {
    text-align: center;
    padding: 8px 0;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
    position: relative
}

.persian-datepicker-grid .day:hover {
    background: #3498db;
    color: white
}

.persian-datepicker-grid .day.holiday {
    color: #e74c3c;
    font-weight: bold
}

.persian-datepicker-grid .day.official-holiday {
    background: #fff0f0
}

.persian-datepicker-grid .day.today {
    background: #e8f4fd;
    font-weight: bold;
    border: 1px solid #3498db
}

.persian-datepicker-grid .day.selected {
    background: #2d7d46;
    color: white;
    font-weight: bold
}

.persian-datepicker-grid .day.selected.holiday {
    background: #c0392b;
    color: white
}

.persian-datepicker-grid .day.empty {
    cursor: default
}

.persian-datepicker-grid .day.empty:hover {
    background: transparent
}

.persian-datepicker-grid .day.disabled {
    color: #ccc;
    cursor: not-allowed
}

.persian-datepicker-grid .day.disabled:hover {
    background: transparent;
    color: #ccc
}

.persian-datepicker-grid .day[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    background: #2c3e50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 4px;
    font-weight: normal
}
body.dark-mode .persian-datepicker {
    background: #16213e !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}
body.dark-mode .persian-datepicker .day-name {
    color: #aaa !important;
}
body.dark-mode .persian-datepicker .day {
    color: #e0e0e0 !important;
}
body.dark-mode .persian-datepicker .day:hover {
    background: #00897b !important;
}
body.dark-mode .persian-datepicker .day.selected {
    background: #00897b !important;
    color: white !important;
}
body.dark-mode .persian-datepicker .day.today {
    border-color: #00897b !important;
    color: #000000 !important;
    font-weight: bold !important;
}
body.dark-mode .persian-datepicker .day.holiday {
    color: #ef5350 !important;
}
body.dark-mode .persian-datepicker .month-year {
    color: #e0e0e0 !important;
}
body.dark-mode .persian-datepicker button {
    background: transparent !important;
    color: #e0e0e0 !important;
}
body.dark-mode .persian-datepicker .day.empty {
    background: transparent !important;
}