.calendar-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.headerCalendar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    background: #014b50;
    color: #fff;
    padding:15px 10px 10px 10px;
}

#weekTitle {
    font-weight: bold;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
}

.headerCalendar button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #014b50;
    color: #fff;
    text-align: center;
}

.calendar div {
    padding: 10px;
    font-size: .9rem;
}

.slots {
    display: flex;
    width: 100%;
    /* min-height: 600px; */
}

.day {
    flex: 1;
    border-right: 1px solid #ddd;
}

.day:first-child {
    border-left: 1px solid #ddd;
}

.slot {
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.slot.disponible {
    color: #014b50;
    cursor: pointer;
}

.slot.ocupado {
    color: #aaa;
}

.slot.seleccionado {
    background: #014b50;
    color: #fff;
    font-weight: bold;
    border-radius: 4px;
}

.empty {
    padding: 5px;
    color: #666;
    text-align: center;
    font-size: 12px;
    line-height: 1.1;
}

/* Transición suave del calendario */
.calendar-fade {
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.calendar-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.calendar-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================
   RESPONSIVE
================================ */

/* Tablets y móviles */

@media (max-width: 576px) {
    #weekTitle {
        font-size: 14px;
    }
}

@media (max-width: 991px) {

    .headerCalendar {
        flex-wrap: wrap;
        gap: 10px;
        text-align: center;
    }

    .headerCalendar button {
        font-size: 16px;
    }

    .calendar {
        display: none;
        /* ocultamos encabezado de 7 días */
    }

    .slots {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
        min-height: auto;
        padding: 3px;
    }

    .day {
        min-width: 260px;
        /* cada día es una tarjeta */
        border-right: none;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
    }

    .day::before {
        content: attr(data-day);
        display: block;
        background: #014b50;
        color: #fff;
        font-weight: bold;
        padding: 10px;
        text-align: center;
    }

    .slot {
        font-size: 14px;
        padding: 10px;
    }
}

