/*
 * zbGuia.css — reproductor de las guías animadas y piezas de maqueta.
 *
 * El escenario mide siempre 960 × 540 y se escala entero con transform: todo
 * lo de dentro va en px fijos (no rem ni %), o en el vídeo y en un móvil no
 * se vería igual. Nada de transition ni animation dentro del escenario: lo
 * mueve zbGuia.js en función del tiempo (si no, no se graba bien).
 */

.zbg {
    --zbg-naranja: #ef6603;
    --zbg-naranja-claro: #fff1e6;
    --zbg-oscuro: #2a2c39;
    --zbg-tinta: #1f2330;
    --zbg-gris: #6b7280;
    --zbg-linea: #e5e7eb;
    --zbg-fondo: #f5f6f8;
    --zbg-ps: #25b9d7;
    --zbg-ps-oscuro: #363a41;
    --zbg-verde: #16a34a;
    --zbg-verde-claro: #dcfce7;
    --zbg-ambar: #d97706;
    --zbg-ambar-claro: #fef3c7;
    --zbg-rojo: #dc2626;
    --zbg-azul: #2563eb;
    --zbg-azul-claro: #dbeafe;
    position: relative;
    font-family: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--zbg-tinta);
}

/* ---------- Marco y escenario ---------- */

.zbg-marco {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff7f0 0%, #f3f4f8 55%, #eef2ff 100%);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 28px rgba(16, 24, 40, .10);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.zbg-captura .zbg-marco {
    border-radius: 0;
    box-shadow: none;
    width: 960px;
    height: 540px;
    cursor: default;
}

.zbg-escenario {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.35;
}

.zbg-capa,
.zbg-escena {
    position: absolute;
    inset: 0;
}

.zbg-escena * {
    box-sizing: border-box;
}

/* Rótulo de la escena (lo que se lee en el vídeo) */
.zbg-rotulo {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 820px;
    padding: 11px 22px 11px 12px;
    border-radius: 999px;
    background: rgba(31, 35, 48, .92);
    color: #fff;
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -.005em;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    z-index: 5;
}

.zbg-rotulo-paso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--zbg-naranja);
    font-size: 17px;
    font-weight: 700;
    flex: 0 0 auto;
}

/* Cursor y onda de clic */
.zbg-cursor {
    position: absolute;
    left: -4px;
    top: -3px;
    width: 26px;
    height: 26px;
    z-index: 8;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
    pointer-events: none;
    transform-origin: 4px 3px;
}

.zbg-onda {
    position: absolute;
    left: -22px;
    top: -22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--zbg-naranja);
    z-index: 7;
    pointer-events: none;
}

/* Tapa con el botón de play */
.zbg-tapa {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(255, 255, 255, .12);
    cursor: pointer;
    z-index: 10;
}

.zbg-tapa-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--zbg-naranja);
    color: #fff;
    font-size: 40px;
    box-shadow: 0 10px 30px rgba(239, 102, 3, .45);
    transition: transform .15s ease;
}

.zbg-tapa-boton .bi-play-fill {
    margin-left: 5px;
}

.zbg-tapa:hover .zbg-tapa-boton,
.zbg-tapa:focus-visible .zbg-tapa-boton {
    transform: scale(1.06);
}

.zbg-tapa:focus-visible {
    outline: 3px solid var(--zbg-naranja);
    outline-offset: -3px;
}

.zbg-tapa-fin {
    background: rgba(255, 255, 255, .55);
}

/* Controles debajo del marco */
.zbg-controles {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.zbg-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--zbg-linea);
    border-radius: 50%;
    background: #fff;
    color: var(--zbg-tinta);
    font-size: 18px;
    cursor: pointer;
}

.zbg-btn:hover {
    border-color: var(--zbg-naranja);
    color: var(--zbg-naranja);
}

.zbg-capitulos {
    flex: 1 1 auto;
    display: flex;
    gap: 6px;
    min-width: 0;
}

.zbg-cap {
    position: relative;
    flex-basis: 0;
    min-width: 0;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.zbg-cap::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    border-radius: 4px;
    background: var(--zbg-linea);
}

.zbg-cap-relleno {
    position: absolute;
    left: 0;
    top: 0;
    height: 4px;
    width: 0;
    border-radius: 4px;
    background: var(--zbg-naranja);
}

.zbg-cap-nombre {
    position: absolute;
    left: 0;
    right: 0;
    top: 9px;
    font-size: 12px;
    color: var(--zbg-gris);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zbg-cap:hover .zbg-cap-nombre {
    color: var(--zbg-tinta);
}

/* Pie con el rótulo de la escena: solo en pantallas estrechas, donde el
   escenario se escala tanto que el rótulo de dentro no se lee. En el resto,
   oculto a la vista pero no a los lectores de pantalla. */
.zbg-pie {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.zbg-pie-paso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--zbg-naranja);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 576px) {
    .zbg-pie {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        white-space: normal;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 10px;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.3;
    }

    .zbg-escenario .zbg-rotulo {
        display: none !important;
    }

    .zbg-cap-nombre {
        display: none;
    }

    /* Barra fina, pero con un blanco de dedo de 24 px. */
    .zbg-cap {
        height: 24px;
    }
}

/* =====================================================================
   Piezas de maqueta (dentro del escenario: siempre px)
   ===================================================================== */

/* Portada / cierre */
.zbg-portada {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 0 80px 40px;
}

.zbg-portada-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    border-radius: 28px;
    background: var(--zbg-naranja);
    color: #fff;
    font-size: 54px;
    box-shadow: 0 16px 40px rgba(239, 102, 3, .35);
}

.zbg-portada-marca {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--zbg-naranja);
}

.zbg-portada-titulo {
    font-family: "Raleway", "Poppins", sans-serif;
    font-size: 46px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.02em;
    color: var(--zbg-tinta);
}

.zbg-portada-sub {
    max-width: 700px;
    font-size: 21px;
    color: #4b5563;
}

.zbg-lista-fin {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    text-align: left;
}

.zbg-lista-fin div {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 500;
}

.zbg-lista-fin i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--zbg-verde-claro);
    color: var(--zbg-verde);
    font-size: 18px;
}

/* Ventana de navegador */
.zbg-ventana {
    position: absolute;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 18px 40px rgba(16, 24, 40, .16);
    border: 1px solid rgba(16, 24, 40, .08);
}

.zbg-ventana-barra {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    background: #f1f2f5;
    border-bottom: 1px solid var(--zbg-linea);
}

.zbg-ventana-barra b {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #d1d5db;
}

.zbg-ventana-barra b:nth-child(1) {
    background: #f87171;
}

.zbg-ventana-barra b:nth-child(2) {
    background: #fbbf24;
}

.zbg-ventana-barra b:nth-child(3) {
    background: #34d399;
}

.zbg-ventana-url {
    flex: 1;
    margin-left: 10px;
    height: 22px;
    line-height: 22px;
    padding: 0 12px;
    border-radius: 11px;
    background: #fff;
    color: var(--zbg-gris);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
}

.zbg-ventana-cuerpo {
    position: relative;
    height: calc(100% - 34px);
}

/* Back office de PrestaShop (estilizado, sin marcas) */
.zbg-ps {
    display: flex;
    height: 100%;
    background: #eff1f2;
}

.zbg-ps-menu {
    flex: 0 0 150px;
    padding: 12px 0;
    background: var(--zbg-ps-oscuro);
    color: #bcc0c6;
    font-size: 13px;
}

.zbg-ps-menu div {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
}

.zbg-ps-menu .zbg-activo {
    background: #2b2e33;
    color: #fff;
    box-shadow: inset 3px 0 0 var(--zbg-ps);
}

.zbg-ps-logo {
    padding: 2px 16px 14px !important;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.zbg-ps-main {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
    position: relative;
}

.zbg-ps-titulo {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #363a41;
}

.zbg-panel {
    background: #fff;
    border: 1px solid #dbe6e9;
    border-radius: 6px;
    padding: 14px;
}

.zbg-boton {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border-radius: 6px;
    background: var(--zbg-ps);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.zbg-boton-zb {
    background: var(--zbg-naranja);
}

.zbg-boton-gris {
    background: #fff;
    color: var(--zbg-tinta);
    border: 1px solid #cfd4da;
}

.zbg-boton.zbg-pulsado {
    filter: brightness(.88);
}

/* Tabla de pedidos */
.zbg-tabla {
    width: 100%;
    background: #fff;
    border: 1px solid #dbe6e9;
    border-radius: 6px;
    overflow: hidden;
    font-size: 13px;
}

.zbg-fila {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    border-top: 1px solid #edf0f2;
}

.zbg-fila:first-child {
    border-top: 0;
}

.zbg-fila-cab {
    height: 32px;
    background: #f8fafb;
    color: var(--zbg-gris);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.zbg-fila.zbg-resaltada {
    background: var(--zbg-naranja-claro);
}

.zbg-c1 {
    flex: 0 0 64px;
    font-weight: 600;
}

.zbg-c2 {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zbg-c3 {
    flex: 0 0 80px;
    text-align: right;
}

.zbg-c4 {
    flex: 0 0 150px;
    display: flex;
    justify-content: flex-end;
}

/* Chapas */
.zbg-chapa {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: #eef0f3;
    color: #4b5563;
}

.zbg-chapa-ok {
    background: var(--zbg-verde-claro);
    color: #15803d;
}

.zbg-chapa-aviso {
    background: var(--zbg-ambar-claro);
    color: #b45309;
}

.zbg-chapa-info {
    background: var(--zbg-azul-claro);
    color: #1d4ed8;
}

.zbg-chapa-zb {
    background: var(--zbg-naranja-claro);
    color: #c2410c;
}

/* Panel de Z-Bombilla */
.zbg-zb {
    height: 100%;
    background: #f6f7f9;
}

.zbg-zb-barra {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 18px;
    background: var(--zbg-oscuro);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.zbg-zb-barra .zbg-marca span {
    color: var(--zbg-naranja);
}

.zbg-zb-seccion {
    color: #c9ccd6;
    font-weight: 500;
}

.zbg-zb-seccion::before {
    content: "·";
    margin-right: 8px;
}

.zbg-zb-main {
    padding: 18px 20px;
    position: relative;
}

.zbg-tarjeta {
    background: #fff;
    border: 1px solid var(--zbg-linea);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.zbg-tarjeta-tit {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.zbg-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--zbg-naranja-claro);
    color: var(--zbg-naranja);
    font-size: 20px;
    flex: 0 0 auto;
}

.zbg-muted {
    color: var(--zbg-gris);
    font-size: 13px;
}

/* Modal dentro de una ventana */
.zbg-velo {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .38);
}

.zbg-modal {
    position: absolute;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    padding: 16px 18px;
}

.zbg-modal-tit {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 12px;
}

.zbg-opcion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1.5px solid var(--zbg-linea);
    border-radius: 10px;
    font-size: 14px;
}

.zbg-opcion.zbg-elegida {
    border-color: var(--zbg-naranja);
    background: var(--zbg-naranja-claro);
}

.zbg-opcion b {
    margin-left: auto;
    font-size: 16px;
}

/* Fichero ZIP */
.zbg-zip {
    position: absolute;
    width: 92px;
    height: 112px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--zbg-linea);
    box-shadow: 0 10px 26px rgba(16, 24, 40, .18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.zbg-zip i {
    font-size: 40px;
    color: var(--zbg-naranja);
}

/* Zona de soltar */
.zbg-soltar {
    border: 2px dashed #b8c4cc;
    border-radius: 10px;
    background: #f8fafb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--zbg-gris);
    font-size: 14px;
}

.zbg-soltar.zbg-encima {
    border-color: var(--zbg-ps);
    background: #e9f8fb;
    color: #0e7490;
}

/* Barra de progreso */
.zbg-progreso {
    height: 8px;
    border-radius: 8px;
    background: #e5e7eb;
    overflow: hidden;
}

.zbg-progreso > div {
    height: 100%;
    width: 0;
    background: var(--zbg-ps);
    border-radius: 8px;
}

/* Aviso tipo "toast" */
.zbg-toast {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 10px;
    background: #fff;
    border-left: 4px solid var(--zbg-verde);
    box-shadow: 0 12px 30px rgba(16, 24, 40, .18);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.zbg-toast i {
    color: var(--zbg-verde);
    font-size: 20px;
}

/* Móvil */
.zbg-movil {
    position: absolute;
    width: 220px;
    height: 430px;
    border-radius: 34px;
    background: #111827;
    padding: 10px;
    box-shadow: 0 24px 50px rgba(16, 24, 40, .28);
}

.zbg-movil-pantalla {
    position: relative;
    height: 100%;
    border-radius: 26px;
    background: #fff;
    overflow: hidden;
}

.zbg-movil-isla {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 70px;
    height: 18px;
    margin-left: -35px;
    border-radius: 10px;
    background: #111827;
    z-index: 2;
}

/* Correo */
.zbg-correo {
    padding: 36px 14px 14px;
    font-size: 12px;
}

.zbg-correo-de {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
}

.zbg-correo-de span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--zbg-naranja);
    color: #fff;
    font-size: 13px;
}

/* Flecha entre dos cosas */
.zbg-flecha {
    position: absolute;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--zbg-naranja), #fdba74);
    transform-origin: 0 50%;
}

.zbg-flecha::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -6px;
    border-left: 12px solid #fdba74;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Burbuja con icono grande (para escenas de concepto) */
.zbg-burbuja {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 180px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.zbg-burbuja-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 26px;
    background: #fff;
    color: var(--zbg-naranja);
    font-size: 46px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .14);
}

.zbg-burbuja-icono.zbg-ps-color {
    color: var(--zbg-ps);
}

.zbg-burbuja small {
    display: block;
    font-weight: 400;
    font-size: 13px;
    color: var(--zbg-gris);
}

/* Campo de formulario */
.zbg-campo {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #cfd4da;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
}

.zbg-etiqueta {
    font-size: 12px;
    color: var(--zbg-gris);
    margin-bottom: 4px;
}

.zbg-escribiendo::after {
    content: "|";
    margin-left: 1px;
    color: var(--zbg-naranja);
}

/* Ficha de producto de la tienda */
.zbg-producto {
    display: flex;
    gap: 14px;
}

.zbg-foto {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #fde68a, #fdba74);
    color: #9a3412;
}

.zbg-precio {
    font-size: 26px;
    font-weight: 700;
}

.zbg-tachado {
    text-decoration: line-through;
    color: #9ca3af;
}

.zbg-grande {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.01em;
}

/* Ticket del TPV */
.zbg-ticket {
    background: #fff;
    border-radius: 6px;
    padding: 14px 16px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 13px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .18);
}

.zbg-ticket-linea {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

.zbg-ticket-total {
    border-top: 1px dashed #9ca3af;
    margin-top: 6px;
    padding-top: 8px;
    font-weight: 700;
    font-size: 16px;
}
