/* Estilos formularios públicos Mistatas
   Paleta basada en plantilla de email Quemellamen y web corporativa:
   - Azul primario #3d9be9 (header, acentos)
   - Magenta CTA  #e91e8c (botones)
   - Fondo claro  #f7f3ed (hero)
   - Texto        #2d2d2d
*/

:root {
    --mt-azul: #3d9be9;
    --mt-azul-oscuro: #2d7cb8;
    --mt-magenta: #e91e8c;
    --mt-magenta-oscuro: #c01872;
    --mt-fondo: #f7f3ed;
    --mt-texto: #2d2d2d;
    --mt-gris: #6b6b6b;
    --mt-borde: #e0d9cf;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--mt-texto);
    background: var(--mt-fondo);
    line-height: 1.5;
}

/* Header */
.mt-header {
    background: #fff;
    border-bottom: 3px solid var(--mt-azul);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.mt-header img {
    height: 48px;
    width: auto;
}
.mt-header-text {
    margin-left: 16px;
    font-size: 14px;
    color: var(--mt-gris);
}

/* Layout principal */
.mt-main {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px);
}

/* Hero (imagen lateral) */
.mt-hero {
    background: var(--mt-fondo);
    position: relative;
    padding: 32px 24px;
    text-align: center;
}
.mt-hero-img {
    max-width: 100%;
    width: 380px;
    height: auto;
    border-radius: 50% / 60%;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}
.mt-hero-titulo {
    font-size: 24px;
    font-weight: 700;
    margin: 16px 0 8px;
    color: var(--mt-texto);
}
.mt-hero-sub {
    font-size: 15px;
    color: var(--mt-gris);
    margin: 0;
}

/* Formulario */
.mt-form-wrap {
    background: #fff;
    padding: 32px 24px;
    flex: 1;
}
.mt-form {
    max-width: 480px;
    margin: 0 auto;
}
.mt-form h1 {
    font-size: 22px;
    margin: 0 0 8px;
    color: var(--mt-azul);
}
.mt-form .mt-mensaje {
    font-size: 14px;
    color: var(--mt-gris);
    margin-bottom: 24px;
}

.mt-field {
    margin-bottom: 16px;
}
.mt-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--mt-texto);
}
.mt-field input[type="text"],
.mt-field input[type="email"],
.mt-field input[type="tel"],
.mt-field select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid var(--mt-borde);
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.mt-field input:focus,
.mt-field select:focus {
    outline: none;
    border-color: var(--mt-azul);
    box-shadow: 0 0 0 3px rgba(61,155,233,.15);
}
.mt-field.invalid input,
.mt-field.invalid select {
    border-color: #d9534f;
    background: #fff5f5;
}
.mt-error {
    display: none;
    color: #d9534f;
    font-size: 12px;
    margin-top: 4px;
}
.mt-field.invalid .mt-error {
    display: block;
}

/* Selectores Región/Comuna en grilla */
.mt-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Checkboxes Sistema */
.mt-checkboxes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.mt-check {
    flex: 1;
    min-width: 100px;
    position: relative;
}
.mt-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.mt-check label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 2px solid var(--mt-borde);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all .15s;
    background: #fff;
    margin: 0;
}
.mt-check input[type="checkbox"]:checked + label {
    border-color: var(--mt-azul);
    background: rgba(61,155,233,.08);
    color: var(--mt-azul);
}
.mt-check input[type="checkbox"]:focus + label {
    box-shadow: 0 0 0 3px rgba(61,155,233,.15);
}

/* Honeypot anti-bot (oculto pero no display:none para evitar detección) */
.mt-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Botón CTA */
.mt-btn {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: var(--mt-magenta);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, transform .05s;
    margin-top: 8px;
}
.mt-btn:hover { background: var(--mt-magenta-oscuro); }
.mt-btn:active { transform: translateY(1px); }
.mt-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Mensajes globales */
.mt-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}
.mt-alert.error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

/* Footer */
.mt-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--mt-gris);
    background: #fff;
    border-top: 1px solid var(--mt-borde);
}

/* Página de gracias */
.mt-thanks {
    text-align: center;
    padding: 60px 24px;
    max-width: 600px;
    margin: 0 auto;
}
.mt-thanks h1 {
    font-size: 32px;
    color: var(--mt-azul);
    margin: 0 0 16px;
}
.mt-thanks p {
    font-size: 17px;
    color: var(--mt-texto);
    margin-bottom: 24px;
}
.mt-thanks .mt-redir {
    font-size: 13px;
    color: var(--mt-gris);
}

/* Desktop: split 50/50 form a la izq, hero a la derecha */
@media (min-width: 768px) {
    .mt-main {
        flex-direction: row-reverse;
    }
    .mt-hero {
        flex: 0 0 45%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 48px 32px;
    }
    .mt-hero-img {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
    }
    .mt-form-wrap {
        flex: 1;
        padding: 48px 32px;
        display: flex;
        align-items: center;
    }
    .mt-form {
        margin: 0 auto;
    }
}
