/* ============================================================================
   Multiplex — devoluciones (Views/Devoluciones, UiVersion = V2)
   Preview aprobada: PreviewsHTML/multiplex-devoluciones.html

     Index        /devoluciones                     .v2-devol-page
     ComprasV2    /devoluciones/compras             .v2-compras-* / .v2-compra-*
                  /devoluciones/compras?codigo=…    .v2-refund-*

   Pisa los <style> embebidos de cada vista (que quedan intactos) con
   .tema-multiplex delante. Mismo lenguaje que css/multiplex/cuenta.css
   (Contacto / Libro de quejas). Los colores llevan !important por el
   catch-all de body.css (.tema-multiplex .body *) y, en Index, por el
   ".v2-devol-page.cond-term *" de la vista.
   ============================================================================ */

/* --- 1. Portal (/devoluciones) ---------------------------------------------- */
.tema-multiplex .v2-devol-page {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto !important;
    padding: 32px 16px 64px !important;
    font-family: 'Montserrat', sans-serif;
}

/* El contenido de RefundPage llega dentro de un div .text-center */
.tema-multiplex .v2-devol-page #dymContentTerm {
    margin-top: 0 !important;
    text-align: left !important;
}

.tema-multiplex .v2-devol-page.cond-term h1 {
    margin: 0 0 16px;
    font-size: 32px;
    line-height: 1.1;
    color: #ffffff !important;
}

    .tema-multiplex .v2-devol-page.cond-term h1 strong {
        color: #ffffff !important;
    }

.tema-multiplex .v2-devol-page.cond-term .mp-devol-lead {
    max-width: 720px;
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.8) !important;
}

.tema-multiplex .v2-devol-page.cond-term .mp-devol-text {
    max-width: 720px;
    margin: 0 0 32px;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55) !important;
}

.tema-multiplex .v2-devol-page.cond-term .mp-info-card__title {
    font-weight: 600;
    color: #ffffff !important;
}

.tema-multiplex .v2-devol-page.cond-term :is(.mp-info-card__text, .mp-inline-note) {
    color: rgba(255, 255, 255, 0.7) !important;
}

    .tema-multiplex .v2-devol-page.cond-term .mp-info-card__text strong {
        font-weight: 600;
        color: #ffffff !important;
    }

.tema-multiplex .v2-devol-page.cond-term .mp-info-card::before {
    color: #e50611 !important;
}

.tema-multiplex .v2-devol-page.cond-term .mp-inline-note {
    margin-top: 24px;
}

    .tema-multiplex .v2-devol-page.cond-term .mp-inline-note::before {
        color: #e50611 !important;
    }

    .tema-multiplex .v2-devol-page.cond-term .mp-inline-note a {
        font-weight: 600;
        color: #ffffff !important;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

/* Botón "Realizar devolución" (form de la vista, debajo del contenido) */
.tema-multiplex .v2-devol-page > .text-center {
    margin-top: 32px !important;
    text-align: left !important;
}

.tema-multiplex .v2-devol-page .btn-1-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    padding: 0 16px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    letter-spacing: 1px !important;
    white-space: nowrap;
    color: #ffffff !important;
    background: #e50611 !important;
    border: 1px solid #f91f2a !important;
    border-radius: 6px !important;
    transform: none !important;
    opacity: 1 !important;
    transition: background-color .15s ease !important;
}

    .tema-multiplex .v2-devol-page .btn-1-outlined:hover {
        background: #c90510 !important;
    }

.tema-multiplex .v2-devol-page #refundForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tema-multiplex .v2-devol-page .v2-devol-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 16px;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    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: background-color .15s ease;
}

    .tema-multiplex .v2-devol-page .v2-devol-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.18);
    }

    .tema-multiplex .v2-devol-page .btn-1-outlined:disabled {
        opacity: .6 !important;
        cursor: wait;
    }

/* --- 2. Mis compras: página y título ---------------------------------------- */
.tema-multiplex .v2-compras-page {
    width: 100%;
    max-width: 960px;
    padding: 32px 16px 64px;
    font-family: 'Montserrat', sans-serif;
}

.tema-multiplex :is(.v2-compras-header, .v2-refund-title) {
    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-compras-header, .v2-refund-title)::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        border-radius: 999px;
        background-color: #e50611;
    }

    .tema-multiplex :is(.v2-compras-header, .v2-refund-title) strong {
        font-weight: 700;
        color: #ffffff !important;
    }

.tema-multiplex :is(.v2-compras-sub, .v2-refund-sub) {
    margin: 12px 0 24px;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    color: rgba(255, 255, 255, 0.55) !important;
}

/* --- 3. Tarjeta de compra ----------------------------------------------------
   Mobile: póster + título arriba, datos debajo y la acción al final.
   Desktop: todo en una fila (póster · datos · acción). */
.tema-multiplex .v2-compra-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
    margin: 0 0 16px;
    padding: 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);
    overflow: visible;
    transition: border-color .15s ease;
}

    .tema-multiplex .v2-compra-card:hover {
        background: #210202;
        border-color: rgba(229, 6, 17, 0.45);
    }

.tema-multiplex .v2-compra-poster {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Mobile: el título va al lado del póster y los datos debajo, a todo el ancho */
.tema-multiplex .v2-compra-info {
    display: contents;
}

.tema-multiplex .v2-compra-title {
    grid-column: 2 / -1;
    grid-row: 1;
    align-self: center;
}

.tema-multiplex .v2-compra-details {
    grid-column: 1 / -1;
    grid-row: 2;
}

.tema-multiplex .v2-compra-title {
    margin: 0;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: #ffffff !important;
}

.tema-multiplex .v2-compra-details {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 12px;
    align-items: baseline;
}

.tema-multiplex .v2-compra-detail {
    display: contents;
}

.tema-multiplex .v2-compra-detail-label {
    min-width: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45) !important;
}

.tema-multiplex .v2-compra-detail-val {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85) !important;
    overflow-wrap: anywhere;
}

/* Sin QR de retiro (pedido de la clienta): queda en el markup, oculto */
.tema-multiplex .v2-compra-qr {
    display: none;
}

/* Acción: botón o estado */
.tema-multiplex .v2-compra-action {
    grid-column: 1 / -1;
    grid-row: 3;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    width: auto;
    padding: 16px 0 0;
    border-top: 1px solid rgba(130, 24, 26, 0.4);
}

/* Función ya pasada: no hay nada que mostrar */
.tema-multiplex .v2-compra-action:not(:has(*)) {
    display: none;
}

.tema-multiplex .v2-btn-devolver {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 20px;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
    color: #ffffff !important;
    background: transparent;
    border: 1px solid #e50611;
    border-radius: 6px;
    transition: background-color .15s ease;
}

    .tema-multiplex .v2-btn-devolver:hover {
        color: #ffffff !important;
        background: #e50611;
    }

    .tema-multiplex .v2-btn-devolver:disabled {
        opacity: .6;
        cursor: wait;
        background: transparent;
    }

/* Estados */
.tema-multiplex .v2-badge {
    align-self: flex-start;
    gap: 6px;
    padding: 6px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
}

.tema-multiplex .v2-badge.success {
    color: #4ade80 !important;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.tema-multiplex .v2-badge.info {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.tema-multiplex .v2-badge.warning {
    color: #ffb900 !important;
    background: rgba(254, 154, 0, 0.12);
    border: 1px solid rgba(254, 154, 0, 0.3);
}

.tema-multiplex .v2-badge.danger {
    color: #ff6b6b !important;
    background: rgba(229, 6, 17, 0.12);
    border: 1px solid rgba(229, 6, 17, 0.3);
}

.tema-multiplex .v2-badge-msg {
    max-width: none;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    color: rgba(255, 255, 255, 0.55) !important;
}

/* --- 4. Sin compras --------------------------------------------------------- */
.tema-multiplex .v2-empty {
    padding: 32px 16px;
    text-align: center;
    background: #210202;
    border: 1px solid rgba(130, 24, 26, 0.4);
    border-radius: 16px;
}

/* El ícono de la vista es un emoji: se reemplaza por el ticket de Font Awesome */
.tema-multiplex .v2-empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    font-size: 0;
    background: rgba(229, 6, 17, 0.15);
    border: 1px solid rgba(229, 6, 17, 0.25);
    border-radius: 50%;
}

    .tema-multiplex .v2-empty-icon::before {
        content: '\f3ff'; /* fa-ticket-alt */
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 26px;
        color: #e50611 !important;
    }

.tema-multiplex .v2-empty-text {
    margin: 0 0 22px;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55) !important;
}

.tema-multiplex .v2-btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 32px;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #ffffff !important;
    background: #e50611;
    border: 1px solid #f91f2a;
    border-radius: 6px;
}

    .tema-multiplex .v2-btn-home:hover {
        color: #ffffff !important;
        background: #c90510;
    }

/* --- 5. Devolución con código (sin sesión) ---------------------------------- */
.tema-multiplex .v2-refund-section {
    width: calc(100% - 32px);
    max-width: 520px;
    margin: 32px auto 64px;
    padding: 24px 16px;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    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 .v2-refund-title {
    font-size: 24px;
}

.tema-multiplex .v2-refund-label {
    display: block;
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75) !important;
}

.tema-multiplex .v2-refund-input {
    display: block;
    width: 100%;
    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);
    outline: none;
    color-scheme: dark;
    transition: border-color .15s ease;
}

    .tema-multiplex .v2-refund-input::placeholder {
        color: rgba(255, 255, 255, 0.3) !important;
    }

    .tema-multiplex .v2-refund-input:focus {
        border-color: #e50611;
    }

.tema-multiplex .v2-refund-section .is-invalid {
    border-color: #ff6b6b !important;
}

.tema-multiplex .v2-refund-err {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.35;
    color: #ff6b6b !important;
}

    .tema-multiplex .v2-refund-err:empty {
        display: none;
    }

.tema-multiplex .v2-refund-label--code {
    margin-top: 20px;
}

/* Grilla y no flex: con minmax(0, …) las casillas no ensanchan la página en
   pantallas angostas */
.tema-multiplex .v2-code-inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 52px));
    gap: 8px;
    margin: 0;
}

.tema-multiplex .v2-code-input {
    width: 100%;
    min-width: 0;
    height: 60px;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 26px;
    font-weight: 700;
    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);
    caret-color: #e50611;
    transition: border-color .15s ease;
}

    .tema-multiplex .v2-code-input:focus {
        border-color: #e50611;
        background: #210202;
    }

.tema-multiplex .v2-refund-hint {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.45) !important;
}

.tema-multiplex .v2-btn-verify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    margin-top: 24px;
    padding: 0 16px;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #ffffff !important;
    background: #e50611;
    border: 1px solid #f91f2a;
    border-radius: 6px;
    transition: background-color .15s ease, opacity .15s ease;
}

    .tema-multiplex .v2-btn-verify:hover {
        background: #c90510;
    }

    .tema-multiplex .v2-btn-verify:disabled {
        color: #ffffff !important;
        background: #e50611;
        border: 1px solid #f91f2a;
        opacity: .45;
        cursor: not-allowed;
    }

    /* Verificando (ComprasV2.cshtml): spinner + texto, sin el aspecto de deshabilitado */
    .tema-multiplex .v2-btn-verify[aria-busy="true"]:disabled {
        opacity: .8;
        cursor: progress;
    }

    .tema-multiplex .v2-btn-verify .fa-spinner {
        margin-right: 10px;
    }

/* El aviso con cuenta regresiva se reemplaza por mpPopup */
.tema-multiplex .v2-redirect-alert {
    display: none !important;
}

/* --- 6. Desktop --------------------------------------------------------------- */
@media (min-width: 641px) {
    .tema-multiplex .v2-devol-page,
    .tema-multiplex .v2-compras-page {
        padding: 48px 24px 80px !important;
    }

    .tema-multiplex .v2-devol-page.cond-term h1 {
        font-size: 48px;
    }

    .tema-multiplex .v2-devol-page #refundForm {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tema-multiplex .v2-devol-page :is(.btn-1-outlined, .v2-devol-btn-secondary) {
        width: auto;
        min-width: 260px;
    }

    .tema-multiplex .v2-compras-header {
        font-size: 36px;
    }

    .tema-multiplex .v2-refund-section {
        margin-top: 48px;
        padding: 32px;
    }
}

@media (min-width: 768px) {
    .tema-multiplex .v2-compra-card {
        grid-template-columns: 100px minmax(0, 1fr) 200px;
        align-items: center;
        gap: 24px;
        padding: 20px 24px 20px 20px;
    }

    .tema-multiplex .v2-compra-info {
        display: block;
        grid-column: 2;
        grid-row: 1;
    }

    .tema-multiplex .v2-compra-title {
        margin: 0 0 12px;
        font-size: 18px;
    }

    .tema-multiplex .v2-compra-action {
        grid-column: 3;
        grid-row: 1;
        padding: 0;
        border: 0;
    }
}

@media (max-width: 380px) {
    .tema-multiplex .v2-code-input {
        height: 52px;
        font-size: 22px;
    }
}
