.calendar-container {
    width: 100%;
    background: var(--table_bg);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-scroll-container {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 5px;
}

.calendar-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.calendar-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.calendar-scroll-container::-webkit-scrollbar-thumb {
    background: var(--table_border);
    border-radius: 3px;
}

.calendar-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

body.dark-theme .calendar-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.calendar-month {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--table_border);
    margin-bottom: 15px;
}

.calendar-month:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.calendar-month-title {
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--table_text_color);
    text-align: left;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 0 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 10px;
    color: #64748b;
    padding-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

body.dark-theme .calendar-weekday {
    color: #94a3b8;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    border-radius: 6px;
    color: var(--table_text_color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-day:hover {
    background: rgba(255, 69, 0, 0.1);
    color: #ff4500;
}

.calendar-day.today {
    border: 1px solid #ff4500;
    color: #ff4500;
    font-weight: 600;
}

.calendar-day.future {
    color: #475569;
    cursor: default;
    opacity: 0.4;
}

body.dark-theme .calendar-day.future {
    color: #94a3b8;
}

.calendar-day.selected {
    background: #ff4500 !important;
    color: white !important;
    border-color: #ff4500 !important;
    font-weight: 600;
}

.calendar-day.in-range {
    background: rgba(255, 69, 0, 0.2);
    border-radius: 0;
}

.calendar-day.in-range:hover {
    background: rgba(255, 69, 0, 0.3);
}

/* Adjust the time modal width to accommodate the calendar */
#time_modal {
    width: 320px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: var(--table_bg);
}
