/* Estilos para la vista de calendario semanal */
.calendar-container {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

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

.calendar-header .calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-full-height {
    height: 95vh;
    display: flex;
    flex-direction: column;
}

.card-full-height .card-body {
    flex-grow: 1;
    overflow: hidden;
}

.calendar-grid-container {
    height: 100%;
    overflow-y: auto;
}

.calendar-grid {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr); /* Columna para horas + 7 días */
    grid-template-rows: auto; /* Fila para cabecera de días */
    min-width: 900px;
}

.calendar-day-header {
    text-align: center;
    padding: 0.75rem 0.25rem;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    border-left: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
}
.calendar-day-header:first-child {
    border-left: none;
}

.time-slot-header {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 1px solid #dee2e6;
}

.time-slot-label {
    grid-column: 1 / 2;
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
    position: relative;
    top: -0.5em; /* Alinear con la línea de la hora */
    border-right: 1px solid #dee2e6;
    padding-right: 0.25rem;
}

.calendar-day-column {
    position: relative;
    border-left: 1px solid #dee2e6;
    height: 840px; /* (22 - 8) hours * 60px/hour */
}
.calendar-day-column:first-child {
    border-left: none;
}

.hour-line-bg {
    position: absolute;
    width: 100%;
    border-top: 1px solid #f1f1f1;
    z-index: 1;
}

.time-grid {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.hour-row {
    grid-column: 1 / -1;
    height: 60px; /* 2 slots de 30px */
    border-top: 1px solid #f1f1f1;
}
.hour-row:first-child {
    border-top: none;
}


.turno-card {
    position: absolute;
    left: 4px;
    right: 4px;
    background-color: #0d6efd;
    color: white;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.2);
}

.turno-card:hover {
    z-index: 6;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.turno-card .turno-title {
    font-weight: 600;
}
.turno-card .turno-details {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Colores de estado */
.turno-card[data-estado="reservado"] { background-color: #ffc107; color: #000; }
.turno-card[data-estado="confirmado"] { background-color: #198754; }
.turno-card[data-estado="cancelado"] { background-color: #dc3545; }
.turno-card[data-estado="asistio"] { background-color: #0dcaf0; }
.turno-card[data-estado="no_asistio"] { background-color: #6c757d; }
.turno-card[data-estado="disponible"] { background-color: #e9ecef; color: #000; border-style: dashed;}