
.container-calendar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
}

/* Estilos para el título y subtítulo */
.titulo-principal {
    font-size: 1.875rem;
    font-weight: bold;
    color: #1f2937;
    margin-top: 0;
}

.subtitulo {
    color: #6b7280;
    margin-top: 8px;
}

/* Estilos para la leyenda */
.leyenda {
    margin-top: 24px;
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.titulo-leyenda {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.contenedor-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.item-leyenda {
    display: flex;
    align-items: center;
}

.cuadro-color {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.cuadro-rojo {
    background-color: rgba(252, 165, 165, 0.8);
}

.cuadro-inicio {
    background: linear-gradient(to right bottom, transparent 49%, rgba(252, 165, 165, 0.8) 50%);
}

.cuadro-fin {
    background: linear-gradient(to left top, transparent 49%, rgba(252, 165, 165, 0.8) 50%);
}

/* Estilos para el calendario */
.calendario-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 64rem;
    margin: 0 auto;
}

.cabecera-calendario {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.titulo-mes {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4b5563;
    margin: 8px 0;
}

.controles-calendario {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}

.btn-hoy {
    background-color: #6b7280;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.controles-mes {
    display: flex;
}

.btn-mes {
    background-color: #374151;
    color: white;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
}

.btn-mes-izq {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-mes-der {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Estilos para la tabla del calendario */
.tabla-calendario {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.tabla-calendario th {
    border: 1px solid #e5e7eb;
    padding: 8px;
    text-align: center;
    font-size: 0.875rem;
}

.tabla-calendario td {
    border: 1px solid #e5e7eb;
    position: relative;
    width: calc(100% / 7);
    vertical-align: top;
}

/* Este es el truco para mantener celdas cuadradas */
.tabla-calendario td::before {
    content: "";
    display: block;
    padding-top: 100%; /* Mantiene el aspecto 1:1 (cuadrado) */
}

.celda-contenido {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.num-dia {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 0.875rem;
    z-index: 2;
}

.dia-otro-mes {
    color: #6b7280;
}

/* Estilos para las reservas */
.dia-reservado {
    position: absolute;
    inset: 0;
    background-color: rgba(252, 165, 165, 0.8);
}

.contenedor-reserva {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.indicador-inicio {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right bottom, transparent 49%, rgba(252, 165, 165, 0.8) 50%);
}

.texto-inicio {
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-size: 0.75rem;
    color: #dc2626;
    z-index: 2;
}

.indicador-fin {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left top, transparent 49%, rgba(252, 165, 165, 0.8) 50%);
}

.texto-fin {
    position: absolute;
    top: 40%;
    left: 40%;
    font-size: 0.75rem;
    color: #dc2626;
    z-index: 2;
}

.dia-completo {
    position: absolute;
    inset: 0;
    background-color: rgba(252, 165, 165, 0.8);
}

.texto-reserva-completa {
    position: absolute;
    top: 40%;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: #dc2626;
    z-index: 2;
}

/* Media queries para responsividad */
@media (max-width: 768px) {
    .cabecera-calendario {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .controles-calendario {
        width: 100%;
        justify-content: space-between;
    }
    
    .tabla-calendario th {
        font-size: 0.75rem;
        padding: 4px;
    }
    
    .num-dia {
        font-size: 0.75rem;
    }
    
    .texto-inicio,
    .texto-fin,
    .texto-reserva-completa {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    
    .container-calendar {
        padding: 10px;
    }
    
    .titulo-principal {
        font-size: 1.5rem;
    }
    
    .titulo-mes {
        font-size: 1.25rem;
    }
    
    .btn-hoy,
    .btn-mes {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
    
    .tabla-calendario th {
        font-size: 0.7rem;
        padding: 2px;
    }
}

/* Texto de la leyenda: verde más oscuro para un contraste AA */
.item-leyenda span { color: #57702F; }
