/* Calendar Styles */

.calendar-section {
    padding: 5rem 0 2rem;
    min-height: calc(100vh - 80px);
}

.calendar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.calendar-header h1 {
    font-size: 2rem;
    font-weight: 300;
    color: #2d3748;
    margin: 0;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cal-btn {
    background: #f7f7f7;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.cal-btn:hover {
    background: #e2e8f0;
}

.current-week {
    font-size: 1.1rem;
    color: #4a5568;
    min-width: 200px;
    text-align: center;
}

.time-sync {
    font-size: 0.85rem;
    color: #718096;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-header-cell {
    background: #f7fafc;
    padding: 0.6rem 0.5rem;
    text-align: center;
    font-weight: 500;
    font-size: 0.8rem;
    color: #4a5568;
}

.calendar-header-cell.today {
    background: #e6f3ef;
    color: #2d5a4a;
}

.calendar-header-cell .day-name {
    display: block;
}

.calendar-header-cell .day-num {
    display: block;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.time-label {
    background: #f7fafc;
    padding: 0.25rem 0.5rem;
    text-align: right;
    font-size: 0.7rem;
    color: #718096;
    height: 44px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.calendar-cell {
    background: #fff;
    min-height: 44px;
    position: relative;
    padding: 2px;
}

.calendar-cell.today {
    background: #f0fdf4;
}

/* Class Cards */
.class-card {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    z-index: 1;
}

.class-card:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.class-card.yoga {
    background: #e6f3ef;
    border-left: 3px solid #4a9079;
    color: #2d5a4a;
}

.class-card.pilates {
    background: #e8f4fd;
    border-left: 3px solid #3182ce;
    color: #1a4971;
}

.class-card.private {
    background: #fef3e2;
    border-left: 3px solid #dd6b20;
    color: #7b341e;
}

.class-card .class-time {
    font-weight: 600;
    font-size: 0.65rem;
}

.class-card .class-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.class-card .booking-count {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
    padding: 1px 4px;
    margin-top: 1px;
}

.modal-booking-info {
    font-size: 0.85rem;
    color: #4a9079;
    font-weight: 500;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #e6f3ef;
    border-radius: 4px;
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.yoga {
    background: #4a9079;
}

.legend-dot.pilates {
    background: #3182ce;
}

.legend-dot.private {
    background: #dd6b20;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal[hidden] {
    display: none;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
}

.modal-close:hover {
    color: #2d3748;
}

.modal-content h2 {
    margin: 0 0 1.5rem;
    font-weight: 400;
    color: #2d3748;
}

.modal-details p {
    margin: 0.5rem 0;
    color: #4a5568;
}

.modal-details strong {
    color: #2d3748;
}

#modal-book {
    margin-top: 1.5rem;
    width: 100%;
}

#modal-book:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: 50px repeat(7, 1fr);
        font-size: 0.85rem;
    }

    .calendar-header-cell {
        padding: 0.75rem 0.25rem;
    }

    .calendar-header-cell .day-name {
        font-size: 0.7rem;
    }

    .calendar-header-cell .day-num {
        font-size: 1rem;
    }

    .class-card {
        font-size: 0.6rem;
    }

    .legend {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Nav active state */
.nav-links a.active {
    color: #4a9079;
    font-weight: 500;
}
