/* ============================================================================
   Multiplex — formularios de la cuenta del usuario
   Preview aprobada: PreviewsHTML/multiplex-cuenta-formularios.html

   Vistas V2 de Views/Authentication (UiVersion = V2):
     EditV2             Mis datos            .v2-edit-*
     RegisterV2         Registro             .v2-reg-*
     RestorePasswordV2  Restablecer clave    .v2-rp-*
     ChangeEmailV2      Cambiar correo       .v2-ce-*

   Pisa los <style> embebidos de cada vista (que quedan intactos) usando las
   mismas clases con el prefijo .tema-multiplex: (0,2,0) contra (0,1,0), sin
   !important salvo donde la base también lo usa.

   Mismo lenguaje visual que el formulario de Contacto / Libro de quejas
   (.mp-contact-form-card / .mp-contact-form en body.css): tarjeta bordó
   oscura, campos de 48px con foco rojo, botón rojo (.mp-btn--primary) y
   secundario translúcido (.mp-btn--ghost). Los mensajes del servidor van por
   el popup del sitio (mpPopup).
   ============================================================================ */

/* --- 1. Página y título --------------------------------------------------- */
.tema-multiplex :is(.v2-edit-page, .v2-reg-page, .v2-rp-page, .v2-ce-page) {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 16px 64px;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}

.tema-multiplex :is(.v2-rp-page, .v2-ce-page) {
    max-width: 520px;
}

.tema-multiplex :is(.v2-edit-header, .v2-reg-header, .v2-rp-header, .v2-ce-header) {
    position: relative;
    margin: 0;
    padding-left: 16px;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: 1px;
    text-align: left;
    text-transform: uppercase;
    color: #ffffff !important;
}

    .tema-multiplex :is(.v2-edit-header, .v2-reg-header, .v2-rp-header, .v2-ce-header)::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        border-radius: 999px;
        background-color: #e50611;
    }

    .tema-multiplex :is(.v2-edit-header, .v2-reg-header, .v2-rp-header, .v2-ce-header) strong {
        font-weight: 700;
        color: #ffffff !important;
    }

.tema-multiplex :is(.v2-edit-sub, .v2-reg-sub, .v2-rp-sub, .v2-ce-sub) {
    margin: 12px 0 24px;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    color: rgba(255, 255, 255, 0.55) !important;
}

/* --- 2. Tarjeta del formulario -------------------------------------------- */
.tema-multiplex :is(.v2-edit-card, .v2-reg-card, .v2-rp-card, .v2-ce-card) {
    padding: 24px 16px;
    background: #210202;
    border: 1px solid rgba(130, 24, 26, 0.4);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

.tema-multiplex :is(.v2-edit-grid, .v2-reg-grid) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tema-multiplex :is(.v2-edit-field, .v2-reg-field) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* Pasos de "Cambiar correo" y "Restablecer": campos uno debajo del otro */
.tema-multiplex :is(.v2-rp-card, .v2-ce-card) form,
.tema-multiplex .v2-ce-card {
    display: flex;
    flex-direction: column;
}

.tema-multiplex .v2-ce-step-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff !important;
}

.tema-multiplex .v2-ce-step-sub {
    margin: 0 0 18px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55) !important;
}

/* --- 3. Rótulos ------------------------------------------------------------ */
.tema-multiplex :is(.v2-edit-label, .v2-reg-label, .v2-rp-lbl, .v2-ce-lbl) {
    display: block;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(255, 255, 255, 0.75) !important;
}

.tema-multiplex :is(.v2-rp-lbl, .v2-ce-lbl) {
    margin-bottom: 8px;
}

    .tema-multiplex .v2-ce-lbl:not(:first-child) {
        margin-top: 20px;
    }

    .tema-multiplex .v2-ce-step-sub + .v2-ce-lbl {
        margin-top: 0;
    }

/* --- 4. Campos -------------------------------------------------------------- */
.tema-multiplex :is(.v2-edit-input, .v2-edit-select, .v2-edit-phone-select, .v2-edit-phone-input,
                    .v2-reg-input, .v2-reg-select, .v2-reg-phone-select, .v2-reg-phone-input,
                    .v2-rp-input, .v2-ce-input) {
    display: block;
    width: 100%;
    min-width: 0;
    height: 48px;
    margin: 0;
    padding: 0 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #ffffff !important;
    background: #210202;
    border: 1px solid rgba(70, 8, 9, 0.8);
    border-radius: 6px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    opacity: 1;
    outline: none;
    color-scheme: dark;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .tema-multiplex :is(.v2-edit-input, .v2-edit-select, .v2-edit-phone-select, .v2-edit-phone-input,
                        .v2-reg-input, .v2-reg-select, .v2-reg-phone-select, .v2-reg-phone-input,
                        .v2-rp-input, .v2-ce-input)::placeholder {
        color: rgba(255, 255, 255, 0.3) !important;
    }

    .tema-multiplex :is(.v2-edit-input, .v2-edit-select, .v2-edit-phone-select, .v2-edit-phone-input,
                        .v2-reg-input, .v2-reg-select, .v2-reg-phone-select, .v2-reg-phone-input,
                        .v2-rp-input, .v2-ce-input):focus {
        border-color: #e50611;
    }

/* Error (validación del formulario: .is-invalid, igual que Bootstrap) */
.tema-multiplex :is(.v2-edit-page, .v2-reg-page, .v2-rp-page, .v2-ce-page) .is-invalid {
    border-color: #ff6b6b !important;
}

/* Selects: flecha dibujada (la base usa la del navegador), igual que Contacto */
.tema-multiplex :is(.v2-edit-select, .v2-edit-phone-select, .v2-reg-select, .v2-reg-phone-select) {
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    background: #210202 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-opacity='0.5' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 12px 8px;
    cursor: pointer;
}

    .tema-multiplex :is(.v2-edit-select, .v2-edit-phone-select, .v2-reg-select, .v2-reg-phone-select) option {
        color: #ffffff;
        background: #210202;
    }

/* Solo lectura (el correo en "Mis datos") */
.tema-multiplex .v2-edit-input[readonly] {
    color: rgba(255, 255, 255, 0.5) !important;
    background: #160101;
    cursor: not-allowed;
}

/* Teléfono: código de país + número */
.tema-multiplex :is(.v2-edit-phone-group, .v2-reg-phone-group) {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 8px;
}

/* --- 5. "Mis datos": edición directa ----------------------------------------
   Los campos son editables desde el principio: los lápices de la base
   (.v2-edit-btn-edit) quedan ocultos y el correo es el único de solo lectura. */
.tema-multiplex .v2-edit-input-group {
    display: block;
}

.tema-multiplex .v2-edit-btn-edit {
    display: none;
}

/* La base no envía el formulario por POST normal: el resumen de validación
   de ASP.NET nunca tiene mensajes, pero no queda vacío (trae un <ul>). */
.tema-multiplex .v2-edit-page .validation-summary-valid {
    display: none;
}

/* Ayuda debajo de un campo (ej. el correo) */
.tema-multiplex .mp-cuenta-hint {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45) !important;
}

    .tema-multiplex .mp-cuenta-hint a {
        color: rgba(255, 255, 255, 0.8) !important;
        text-decoration: underline;
        text-underline-offset: 2px;
    }

        .tema-multiplex .mp-cuenta-hint a:hover {
            color: #ffffff !important;
        }

/* Hueco vacío de la grilla de contraseñas: solo ocupa lugar en desktop */
.tema-multiplex .v2-edit-field:empty {
    display: none;
}

/* Separador "Seguridad" */
.tema-multiplex .v2-edit-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 0;
}

.tema-multiplex .v2-edit-div-line {
    flex: 1;
    height: 1px;
    background: rgba(130, 24, 26, 0.4);
}

.tema-multiplex .v2-edit-div-lbl {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5) !important;
}

/* --- 6. Errores debajo del campo ------------------------------------------- */
.tema-multiplex :is(.v2-edit-validation, .v2-reg-error, .mp-cuenta-err) {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    color: #ff6b6b !important;
}

    .tema-multiplex .mp-cuenta-err:empty {
        display: none;
    }

.tema-multiplex :is(.v2-rp-card, .v2-ce-card) .mp-cuenta-err {
    margin-top: 6px;
}

/* --- 7. Botones -------------------------------------------------------------- */
.tema-multiplex :is(.v2-edit-actions, .v2-reg-actions) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 8px;
}

.tema-multiplex :is(.v2-btn-save, .v2-btn-register, .v2-rp-btn, .v2-ce-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 28px;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff !important;
    background: #e50611;
    border: 1px solid #f91f2a;
    border-radius: 6px;
    opacity: 1;
    transform: none;
    cursor: pointer;
    transition: background-color .15s ease, opacity .15s ease;
}

    .tema-multiplex :is(.v2-btn-save, .v2-btn-register, .v2-rp-btn, .v2-ce-btn):hover {
        background: #c90510;
        transform: none;
    }

    .tema-multiplex :is(.v2-btn-save, .v2-btn-register, .v2-rp-btn, .v2-ce-btn):disabled {
        opacity: .6;
        cursor: wait;
    }

.tema-multiplex :is(.v2-rp-btn, .v2-ce-btn) {
    margin-top: 24px;
}

.tema-multiplex :is(.v2-btn-cancel, .v2-ce-btn-secondary, .v2-btn-toggle-pass) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 24px;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

    .tema-multiplex :is(.v2-btn-cancel, .v2-ce-btn-secondary, .v2-btn-toggle-pass):hover {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.18);
    }

.tema-multiplex .v2-ce-btn-secondary {
    margin-top: 10px;
}

.tema-multiplex .v2-btn-toggle-pass {
    width: auto;
    justify-self: start;
}

/* Links debajo de la tarjeta ("Volver", "¿No tenés acceso a tu correo?") */
.tema-multiplex :is(.v2-rp-back, .v2-ce-back) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 18px 18px 0 0;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

    .tema-multiplex :is(.v2-rp-back, .v2-ce-back):hover {
        color: #ffffff !important;
    }

.tema-multiplex .v2-reg-link {
    margin: 4px 0 0;
    font-size: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55) !important;
}

    .tema-multiplex .v2-reg-link span {
        font-weight: 600;
        color: rgba(255, 255, 255, 0.85) !important;
        text-decoration: underline;
        text-underline-offset: 3px;
        cursor: pointer;
    }

/* --- 8. Cambiar correo: tipo de usuario ------------------------------------- */
.tema-multiplex .v2-ce-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tema-multiplex .v2-ce-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 13px 14px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85) !important;
    background: #210202;
    border: 1px solid rgba(70, 8, 9, 0.8);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

    .tema-multiplex .v2-ce-radio input {
        flex: none;
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: #e50611;
    }

    .tema-multiplex .v2-ce-radio:has(input:checked) {
        color: #ffffff !important;
        background: rgba(229, 6, 17, 0.1);
        border-color: #e50611;
    }

/* --- 9. "Mis datos" sin sesión (ViewData["Error"]) -------------------------- */
.tema-multiplex .mp-cuenta-vacia {
    max-width: 520px;
    margin: 48px auto 72px;
    padding: 32px 16px;
    text-align: center;
    background: #210202;
    border: 1px solid rgba(130, 24, 26, 0.4);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

.tema-multiplex .mp-cuenta-vacia__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #e50611 !important;
    background: rgba(229, 6, 17, 0.15);
    border: 1px solid rgba(229, 6, 17, 0.25);
    border-radius: 50%;
}

    .tema-multiplex .mp-cuenta-vacia__icon svg {
        width: 30px;
        height: 30px;
    }

.tema-multiplex .mp-cuenta-vacia__title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #ffffff !important;
}

.tema-multiplex .mp-cuenta-vacia__text {
    margin: 0 0 22px;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55) !important;
}

.tema-multiplex .mp-cuenta-vacia__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- 10. Desktop -------------------------------------------------------------- */
@media (min-width: 641px) {
    .tema-multiplex :is(.v2-edit-page, .v2-reg-page, .v2-rp-page, .v2-ce-page) {
        padding: 48px 24px 80px;
    }

    .tema-multiplex :is(.v2-edit-header, .v2-reg-header, .v2-rp-header, .v2-ce-header) {
        font-size: 36px;
    }

    .tema-multiplex :is(.v2-edit-card, .v2-reg-card, .v2-rp-card, .v2-ce-card) {
        padding: 32px;
    }

    .tema-multiplex :is(.v2-edit-grid, .v2-reg-grid) {
        grid-template-columns: 1fr 1fr;
        gap: 24px 20px;
    }

    .tema-multiplex :is(.v2-edit-divider, .v2-btn-toggle-pass, .v2-edit-actions, .v2-reg-actions, .v2-edit-field.full) {
        grid-column: 1 / -1;
    }

    .tema-multiplex :is(.v2-edit-actions, .v2-reg-actions) {
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: wrap;
        padding-top: 24px;
        border-top: 1px solid rgba(130, 24, 26, 0.4);
    }

        .tema-multiplex :is(.v2-edit-actions, .v2-reg-actions) :is(.v2-btn-save, .v2-btn-register, .v2-btn-cancel) {
            width: auto;
            min-width: 180px;
        }

        .tema-multiplex .v2-edit-actions .v2-btn-cancel {
            order: -1;
        }

    .tema-multiplex .v2-edit-field:empty {
        display: flex;
    }

    .tema-multiplex .v2-reg-actions {
        align-items: center;
    }

    .tema-multiplex .v2-reg-link {
        flex: 1 1 auto;
        order: -1;
        margin: 0;
        text-align: left;
    }

    .tema-multiplex .mp-cuenta-vacia {
        padding: 36px 32px;
    }

    .tema-multiplex .mp-cuenta-vacia__actions {
        flex-direction: row;
        justify-content: center;
    }

        .tema-multiplex .mp-cuenta-vacia__actions > * {
            width: auto;
            min-width: 180px;
        }
}
