/* ===========================
   MODAL AGENDA TU LLAMADA
=========================== */

#modal-agenda-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
    animation: fadeInOverlay 0.25s ease;
}

#modal-agenda-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#modal-agenda-box {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 560px;
    padding: 36px 32px;
    box-sizing: border-box;
    position: relative;
    animation: slideUp 0.3s ease;
    margin: auto;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Botón cerrar */
#modal-agenda-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
#modal-agenda-close:hover { color: #E8304A; }

/* Encabezado */
#modal-agenda-box h2 {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    color: #2DAE96;
    margin: 0 0 6px;
    font-weight: 700;
    line-height: 1.3;
}
#modal-agenda-box .modal-subtitle {
    font-size: clamp(0.82rem, 2vw, 0.9rem);
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Grupos del formulario */
.agenda-field-group {
    margin-bottom: 18px;
}

.agenda-field-group label {
    display: block;
    font-size: clamp(0.82rem, 2vw, 0.88rem);
    font-weight: 600;
    color: #2D2D2D;
    margin-bottom: 6px;
    line-height: 1.4;
}

.agenda-field-group label .required {
    color: #E8304A;
    margin-left: 2px;
}

/* Inputs y textarea */
.agenda-field-group input[type="text"],
.agenda-field-group input[type="email"],
.agenda-field-group input[type="tel"],
.agenda-field-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #D9E8E4;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #2D2D2D;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    background: #FAFAFA;
}

.agenda-field-group input:focus,
.agenda-field-group textarea:focus {
    outline: none;
    border-color: #2DAE96;
    box-shadow: 0 0 0 3px rgba(45, 174, 150, 0.12);
    background: #fff;
}

.agenda-field-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Radio y checkbox personalizados */
.agenda-radio-group,
.agenda-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agenda-radio-option,
.agenda-checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border: 1.5px solid #D9E8E4;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #FAFAFA;
}

.agenda-radio-option:hover,
.agenda-checkbox-option:hover {
    border-color: #2DAE96;
    background: #F0FAF8;
}

.agenda-radio-option input,
.agenda-checkbox-option input {
    margin-top: 2px;
    accent-color: #2DAE96;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.agenda-radio-option span,
.agenda-checkbox-option span {
    font-size: clamp(0.82rem, 2vw, 0.88rem);
    color: #2D2D2D;
    line-height: 1.4;
}

/* Opción seleccionada */
.agenda-radio-option.selected,
.agenda-checkbox-option.selected {
    border-color: #2DAE96;
    background: #F0FAF8;
}

/* Opción peligrosa (NO) */
.agenda-radio-option.danger-option {
    border-color: #f8d7da;
    background: #fff8f8;
}
.agenda-radio-option.danger-option:hover {
    border-color: #E8304A;
    background: #fff0f0;
}
.agenda-radio-option.danger-option.selected {
    border-color: #E8304A;
    background: #fff0f0;
}

/* Alerta de advertencia */
.agenda-warning-box {
    display: none;
    background: #fff3cd;
    border: 1.5px solid #ffc107;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #856404;
    margin-top: 10px;
    line-height: 1.5;
}
.agenda-warning-box.visible { display: block; }

/* Alerta de peligro */
.agenda-danger-box {
    display: none;
    background: #fde8ea;
    border: 1.5px solid #E8304A;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.88rem;
    color: #c0152a;
    margin-top: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
}
.agenda-danger-box.visible { display: block; }

/* Nota legal/aviso al final */
.agenda-notice {
    font-size: clamp(0.75rem, 1.8vw, 0.8rem);
    color: #777;
    background: #F5F7F6;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Separador */
.agenda-divider {
    border: none;
    border-top: 1.5px solid #EEF2F0;
    margin: 20px 0;
}

/* Botón submit */
#agenda-submit-btn {
    width: 100%;
    background: #2DAE96;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 15px 24px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    font-family: inherit;
}

#agenda-submit-btn:hover:not(:disabled) {
    background: #239E88;
    box-shadow: 0 8px 20px rgba(45, 174, 150, 0.35);
    transform: translateY(-1px);
}

#agenda-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Mensaje de éxito */
#modal-success-msg {
    display: none;
    text-align: center;
    padding: 20px 0;
}
#modal-success-msg .success-icon { font-size: 3rem; margin-bottom: 12px; }
#modal-success-msg h3 {
    color: #2DAE96;
    font-size: 1.3rem;
    margin-bottom: 8px;
}
#modal-success-msg p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Placeholder hint */
.agenda-field-hint {
    font-size: 0.78rem;
    color: #999;
    margin-top: 4px;
    font-style: italic;
}

/* Responsive mobile */
@media (max-width: 480px) {
    #modal-agenda-box {
        padding: 28px 20px;
    }
}
