/* --- Calendar Styles (Responsive & Modern - Light Theme) --- */
.calendar-container {
    /* Light, clean background for the calendar */
    background-color: #ffffff;
    border-radius: 24px;
    padding: 25px;
    width: 100%;
    max-width: 400px;
    /* Softer shadow for light theme */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    direction: rtl;
    display: flex;
    flex-direction: column;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    color: #333; /* Dark text */
}

.nav-btn {
    background: none;
    border: none;
    color: #888; /* Gray for navigation buttons */
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0 15px;
}

.nav-btn:hover {
    color: #007aff; /* Accent color on hover */
}

#month-name {
    font-size: 22px;
    font-weight: 500;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    transition: opacity 0.3s ease-in-out; /* Smooth transition for month change */
}

.calendar-body.fade {
    opacity: 0;
}

.calendar-weekdays, .calendar-days {
    display: contents;
}

.weekday, .day {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1; /* Make cells square */
    font-size: 16px;
    border-radius: 12px;
}

.weekday {
    font-weight: bold;
    color: #999; /* Lighter gray for weekday names */
}

.day {
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.day:not(:empty):hover {
    background-color: #f0f2f5; /* Use the main bg color for hover */
    transform: scale(1.05);
}

.day.today {
    background-color: #007aff; /* Apple's blue for 'today' */
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

.calendar-footer {
    margin-top: 25px;
    text-align: center;
}

/* Style for days with plans in the calendar */
.day.has-plan {
    position: relative;
}

.day.has-plan::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #007aff;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .calendar-container {
        padding: 15px;
    }
    .weekday, .day {
        font-size: 14px;
        border-radius: 8px;
    }
    #month-name {
        font-size: 18px;
    }
    .nav-btn {
        font-size: 24px;
    }
    .back-btn {
        padding: 8px 20px;
    }
}
