/* Custom Calendar Widget Styles */
.calendar-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1.5rem;
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-month-year {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav button {
    background: #f87466;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.calendar-nav button:hover {
    background: #e65d50;
    transform: scale(1.1);
}

.calendar-nav button:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d;
    padding: 0.5rem 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 2px solid transparent;
}

.calendar-day.empty {
    cursor: default;
    visibility: hidden;
}

.calendar-day.past {
    color: #ced4da;
    cursor: not-allowed;
    background: #f8f9fa;
}

.calendar-day.available {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.calendar-day.available:hover {
    background: #28a745;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(40,167,69,0.3);
}

.calendar-day.unavailable {
    background: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-day.weekend {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: #f87466 !important;
    color: white !important;
    border-color: #e65d50;
    font-weight: 700;
    transform: scale(1.1);
}

.calendar-day.today {
    border-color: #f87466;
    font-weight: 700;
}

.calendar-legend {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.legend-color.available { background: #d4edda; border: 1px solid #c3e6cb; }
.legend-color.unavailable { background: #f8d7da; border: 1px solid #f5c6cb; }
.legend-color.selected { background: #f87466; }

.calendar-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* Loading state */
.calendar-widget.loading .calendar-days {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 768px) {
    .calendar-widget {
        padding: 1rem;
        max-width: 100%;
    }

    .calendar-month-year {
        font-size: 1rem;
    }

    .calendar-day {
        font-size: 0.85rem;
    }

    .calendar-nav button {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .calendar-legend {
        font-size: 0.75rem;
        gap: 0.75rem;
    }

    .calendar-weekday {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .calendar-widget {
        padding: 0.75rem;
    }

    .calendar-header {
        margin-bottom: 1rem;
    }

    .calendar-month-year {
        font-size: 0.95rem;
    }

    .calendar-day {
        font-size: 0.8rem;
    }

    .calendar-weekday {
        font-size: 0.7rem;
        padding: 0.3rem 0;
    }

    .legend-item {
        font-size: 0.7rem;
    }

    .legend-color {
        width: 14px;
        height: 14px;
    }
}
