/* Estilos para el contenedor principal del calendario */
main {
    width: 100%;
    max-width: 1350px;
    margin: 50px auto 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    box-sizing: border-box;
}

/* Contenedor principal del calendario y formulario */
.calendario-wrapper {
    width: 100%;
    max-width: 1350px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 auto; /* ⬅️ Centrado real del contenido */
    gap: 30px;
    padding: 0 15px; /* Espaciado lateral */
}

/* Calendario */
.calendario-wrapper .izquierdo {
    width: 70%;
    padding: 20px;
    box-sizing: border-box;
    background-color: #fff;
    border: 1px solid #ccc;
    min-width: 320px;
    border-radius: 10px;

}

.calendario-wrapper .derecho {
    width: 25%;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
    min-width: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Importante si tienes hijos en columna como el formulario */
    margin-left: 10px;
}

.calendario-wrapper #current-date {
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    color: #444;
    padding: 15px 0;
}

.calendario-wrapper section {
    text-align: center;
}

.calendario-wrapper ol {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(7, minmax(80px, 1fr));
    padding: 0;
    width: 100%;
    overflow-x: auto;
    transition: opacity 0.3s ease;
}

.calendario-wrapper li {
    border: 1px solid #ccc;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    font-size: 30px;
    transition: background-color 0.3s, cursor 0.3s;
    cursor: pointer;
    margin: 3px;
}

.calendario-wrapper li:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.calendario-wrapper .day-name {
    background-color: #eee;
    font-weight: bold;
    font-size: 1.5rem;
    height: 40px;
}

.calendario-wrapper .day {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 90px;
}

.calendario-wrapper .disponibilidad,
.calendario-wrapper .no-disponible,
.calendario-wrapper .reservado {
    border: 1px dotted;
    width: 100%;
    height: 20px;
    background-color: #ccc;
    font-size: 0.8rem;
    margin-bottom: -30px;
    border-radius: 0 0 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendario-wrapper .disponibilidad {
    border-color: rgb(0, 85, 3);
    background-color: rgb(149, 247, 70);
}

.calendario-wrapper .no-disponible {
    border-color: rgb(128, 128, 128);
    background-color: rgb(192, 192, 192);
}

.calendario-wrapper .reservado {
    border-color: rgb(255, 0, 0);
    background-color: rgb(255, 122, 122);
}

.calendario-wrapper #boton-reservar:disabled {
    background-color: #cccccc !important;
    cursor: not-allowed;
}

.calendario-wrapper .day-name:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.calendario-wrapper .current-day {
    border: 3px solid #0cd6e8;
    box-shadow: 0 0 20px rgba(12, 214, 232, 0.6);
    border-radius: 10px;
    background-color: #70eaff;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.calendario-wrapper .hoy {
    outline: 2px dashed #FFD700;
}

.calendario-wrapper form {
    display: flex;
    flex-direction: column;
}

.calendario-wrapper h1 {
    text-align: center;
}

.calendario-wrapper .contenedor {
    width: 90%;
    background: lightgray;
    padding: 5%;
}

.calendario-wrapper label {
    font-size: 16px;
    font-style: italic;
    line-height: 1.8;
}

.calendario-wrapper .submit {
    background-color: #FD7C93;
    color: white;
    padding: 7px 0px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 17px;
    width: 60%;
}

.calendario-wrapper .terminos-container {
    display: flex;
    align-items: center;
}

.calendario-wrapper input[type="checkbox"] {
    margin-right: 10px;
}

.calendario-wrapper .message {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 16px;
    border-radius: 5px;
    margin-top: 10px;
    display: none;
}

.calendario-wrapper .no-click {
    pointer-events: none;
    cursor: default;
    opacity: 0.5;
    background-color: #f0f0f0;
}

.calendario-wrapper .boton-mes {
    border: solid 3px rgb(28, 109, 249);
    border-radius: 5px;
    background-color: rgb(113, 141, 253);
    text-decoration: none;
    color: #f0f0f0;
    padding: 0 15px;
    transition: all 0.2s ease-in-out;
}

.calendario-wrapper .boton-mes:hover {
    background-color: rgb(83, 110, 245);
    transform: scale(1.05);
}

.calendario-wrapper .mes-navegacion {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.calendario-wrapper .submit:disabled {
    background-color: #cccccc !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.calendario-wrapper .feedback-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

.calendario-wrapper .feedback-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.calendario-wrapper .feedback-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.calendario-wrapper .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.calendario-wrapper .instruccion-visual {
    background-color: #eef6ff;
    border-left: 4px solid #007bff;
    padding: 10px;
    margin: 10px 0;
    font-size: 0.95rem;
    color: #333;
}
/* 💻 Responsive: FORMULARIO ARRIBA cuando pantalla < 1340px */
@media (max-width: 1440px) {
    .calendario-wrapper {
        flex-direction: column-reverse;
        align-items: center;
    }

    .calendario-wrapper .day-name {
    font-size: 1.1rem;
    /* height: auto;
    word-break: break-word;
    padding: 5px 2px; */
    }

    .calendario-wrapper .izquierdo {
        width: 100%;
        max-width: 1000px;
        margin-bottom: 20px;
        margin-left: 0px;
    }

    .calendario-wrapper li {
        font-size: 1.50rem;
        /* padding: 5px; */
    }


    .calendario-wrapper .izquierdo,
    .calendario-wrapper .derecho {
        width: 100%;
        max-width: 1000px;
        margin-bottom: 20px;
        margin-left: 0px;
    }

    .calendario-wrapper .derecho {
        margin-top: 0;
    }

    .calendario-wrapper .izquierdo {
        margin-bottom: 10px;
    }

    .calendario-wrapper ol {
        overflow-x: hidden !important;
        justify-content: center;
    }
}

@media screen and (max-width: 768px) {
.calendario-wrapper ol {
    grid-template-columns: repeat(7, 1fr);
    font-size: 0.7rem;
}

.calendario-wrapper li {
    font-size: 0.75rem;
}

.calendario-wrapper .day-name {
    font-size: 0.65rem;
    height: auto;
    word-break: break-word;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    width: auto;
    text-align: center;
    line-height: 40px;
    padding: 0 10px;
}

.calendario-wrapper .day {
    position: relative;
    height: 70px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;       /* Centra el número verticalmente */
    justify-content: center;   /* Centra el número horizontalmente */
    text-align: center;
    box-sizing: border-box;
}

/* Contenedores de disponibilidad/estado abajo */
.calendario-wrapper .day > div[class*="disponibilidad"],
.calendario-wrapper .day > div[class*="reservado"],
.calendario-wrapper .day > div[class*="no-disponible"] {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    font-size: 0;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    margin: 0 !important;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

/* Mostramos solo el número de citas */
.calendario-wrapper .disponibilidad::after {
    content: attr(data-citas);
    font-size: 0.9rem;
    font-weight: bold;
    color: black;
}
}


/* 📱 Responsive para móviles pequeños (hasta 480px) */
@media screen and (max-width: 480px) {
    .calendario-wrapper {
        padding: 0 10px;
    }

    .calendario-wrapper .izquierdo,
    .calendario-wrapper .derecho {
        width: 100%;
        padding: 15px 10px;
        margin: 0 auto 20px auto;
        box-sizing: border-box;
    }

    .calendario-wrapper ol {
        grid-template-columns: repeat(7, 1fr);
        font-size: 0.6rem;
        overflow-x: hidden;
    }

    .calendario-wrapper .disponibilidad,
    .calendario-wrapper .no-disponible,
    .calendario-wrapper .reservado {
        font-size: 0.55rem;
        padding: 1px 2px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        word-break: break-word;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .calendario-wrapper .day-name {
        font-size: 0.6rem;
        height: auto;
        padding: 4px 2px;
    }

    .calendario-wrapper .submit {
        width: 100%;
    }
}
