.agenda-wrapper { max-width: 400px; padding: 0 !important; overflow: hidden; border-radius: 12px; }
.agenda-header { background: #ff6600; color: white; padding: 20px; text-align: center; }
.agenda-header h2 { margin: 0; font-size: 20px; }
.agenda-body { padding: 20px; }
.form-group-agenda { margin-bottom: 12px; }
.form-group-agenda label { display: block; font-weight: bold; font-size: 13px; margin-bottom: 5px; }
.form-group-agenda input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; }

.agenda-slots-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.slot-btn { border: 1px solid #ff6600; color: #ff6600; padding: 8px; text-align: center; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.slot-btn.selected { background: #ff6600; color: white; }

.btn-confirmar-agenda { width: 100%; background: #ff6600; color: white; border: none; padding: 15px; margin-top: 15px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-confirmar-agenda:disabled { background: #ccc; }

.close-agenda { position: absolute; right: 15px; top: 10px; color: white; font-size: 25px; cursor: pointer; }
.spinner-agenda { width: 20px; height: 20px; border: 2px solid #f3f3f3; border-top: 2px solid #ff6600; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
/* El fondo del modal ahora permite scroll */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto; /* PERMITE SCROLL SI EL CONTENIDO ES LARGO */
    -webkit-overflow-scrolling: touch; /* Suavidad en iOS */
}

/* Ajuste al contenido para que no se pegue a los bordes al scrollear */
.modal-content {
    background-color: #fff;
    margin: 2% auto; /* Reducimos el margen superior*/
    padding: 20px;
    width: 90%;
    max-width: 450px; /* Ajustado según tu diseño de agenda*/
    border-radius: 8px;
    position: relative;
    margin-bottom: 2%; /* Espacio abajo para que no toque el final al scrollear */
}

.iti{
    width: 100%;
}