/*
 * pedi2 — registro, asistente de bienvenida y pantallas de la prueba
 * (autoservicio, sep-2026). Una sola hoja para las tres: son el mismo recorrido
 * y tienen que verse como tal.
 *
 * ⚠️ `[hidden]` NO oculta un elemento con `display` de autor (CLAUDE.md §6): cada
 * clase que declara display lleva su `[hidden]{display:none}` al lado.
 * ⚠️ Las rejillas van con minmax(0,1fr) y los hijos con min-width:0.
 */
:root {
    --p2o-naranja: #FF5743;
    --p2o-naranja-2: #FF8A3D;
    --p2o-tinta: #15151A;
    --p2o-gris: #6b6f80;
    --p2o-linea: #ece6e1;
    --p2o-fondo: #fff5f0;
    --p2o-ok: #12a150;
    --p2o-radio: 14px;
}

.p2o-body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe9dd 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--p2o-tinta);
    -webkit-font-smoothing: antialiased;
}
.p2o-body *, .p2o-body *::before, .p2o-body *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* ── Registro: dos columnas (marca | formulario) ───────────────────────── */
.p2o-reg {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    min-height: 100vh;
}
.p2o-reg__marca {
    min-width: 0;
    padding: 56px 48px;
    background: linear-gradient(160deg, var(--p2o-naranja) 0%, var(--p2o-naranja-2) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}
/* El logo original sobre su placa blanca: sobre el degradado, que arranca en el
   mismo naranja del «2», el «2» desaparecía. `align-self` para que la placa
   se ajuste al logo y no se estire a todo el ancho de la columna. */
.p2o-reg__logo {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
    padding: 10px 16px;
    background: #fff;
    border-radius: var(--p2o-radio);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}
.p2o-reg__titulo { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; margin: 0; letter-spacing: -.5px; }
.p2o-reg__sub { font-size: 17px; line-height: 1.5; margin: 0; opacity: .95; max-width: 34em; }
.p2o-reg__puntos { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.p2o-reg__puntos li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; font-weight: 600; }
.p2o-reg__puntos i { margin-top: 3px; width: 18px; text-align: center; }
.p2o-reg__panel {
    min-width: 0;
    padding: 28px 24px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.p2o-idiomas { align-self: flex-end; display: flex; gap: 4px; }
.p2o-idiomas a {
    font-size: 12px; font-weight: 700; color: var(--p2o-gris); text-decoration: none;
    padding: 5px 9px; border-radius: 8px;
}
.p2o-idiomas a.is-activo, .p2o-idiomas a:hover { background: #fff; color: var(--p2o-naranja); }

.p2o-tarjeta {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 20px;
    padding: 30px 28px;
    box-shadow: 0 10px 40px rgba(255, 87, 67, .12), 0 2px 6px rgba(0, 0, 0, .04);
    min-width: 0;
}
.p2o-h2 { font-size: 23px; margin: 0 0 6px; letter-spacing: -.3px; }
.p2o-sub { color: var(--p2o-gris); margin: 0 0 20px; font-size: 14.5px; line-height: 1.5; }
.p2o-quien { font-size: 13px; color: var(--p2o-gris); margin: -8px 0 18px; overflow-wrap: anywhere; }

.p2o-google { min-height: 44px; display: flex; justify-content: center; }
.p2o-separador { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--p2o-gris); font-size: 12.5px; }
.p2o-separador::before, .p2o-separador::after { content: ""; flex: 1; height: 1px; background: var(--p2o-linea); }

.p2o-form { display: grid; gap: 10px; }
.p2o-form[hidden] { display: none; }
.p2o-label { font-size: 13px; font-weight: 700; color: #3a3d4c; margin-top: 6px; display: block; }
.p2o-input {
    width: 100%;
    min-width: 0;
    border: 1.5px solid var(--p2o-linea);
    border-radius: 11px;
    padding: 12px 13px;
    font-size: 15.5px;
    background: #fff;
    color: var(--p2o-tinta);
    transition: border-color .15s, box-shadow .15s;
}
.p2o-input:focus { outline: none; border-color: var(--p2o-naranja); box-shadow: 0 0 0 3px rgba(255, 87, 67, .15); }
.p2o-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 10px; }
.p2o-col { min-width: 0; }
.p2o-col[hidden] { display: none; }
.p2o-movil { display: flex; align-items: stretch; gap: 8px; }
.p2o-movil__prefijo {
    display: flex; align-items: center; padding: 0 12px; border-radius: 11px;
    background: #f7f3f0; font-weight: 700; color: #3a3d4c; white-space: nowrap;
}
.p2o-ayuda { font-size: 12.5px; color: var(--p2o-gris); margin: 0; line-height: 1.45; }
.p2o-ayuda .fa-whatsapp { color: #25D366; }

.p2o-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.p2o-chip { position: relative; cursor: pointer; }
.p2o-chip input { position: absolute; opacity: 0; pointer-events: none; }
.p2o-chip span {
    display: inline-block; padding: 8px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    border: 1.5px solid var(--p2o-linea); background: #fff; color: #3a3d4c; transition: all .15s;
}
.p2o-chip input:checked + span { background: var(--p2o-naranja); border-color: var(--p2o-naranja); color: #fff; }
.p2o-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255, 87, 67, .25); }

.p2o-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #3a3d4c; margin-top: 8px; line-height: 1.45; }
.p2o-check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--p2o-naranja); flex: none; }
.p2o-check a, .p2o-legal a, .p2o-pie a { color: var(--p2o-naranja); font-weight: 600; }

.p2o-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    width: 100%; border: 0; border-radius: 12px; padding: 14px 18px;
    background: var(--p2o-naranja); color: #fff; font-size: 16px; font-weight: 800; cursor: pointer;
    transition: transform .08s, filter .15s; text-decoration: none; margin-top: 8px;
}
.p2o-btn:hover { filter: brightness(1.05); }
.p2o-btn:active { transform: translateY(1px); }
.p2o-btn:disabled { opacity: .6; cursor: wait; }
.p2o-btn[hidden] { display: none; }
.p2o-btn--sec { background: var(--p2o-tinta); }
.p2o-btn--suave { background: #f7f3f0; color: var(--p2o-tinta); }
.p2o-btn--wa { background: #25D366; }
.p2o-btn--linea { background: transparent; color: var(--p2o-gris); font-weight: 600; font-size: 14px; }

.p2o-legal { font-size: 12px; color: var(--p2o-gris); margin: 16px 0 0; line-height: 1.5; }
.p2o-pie { font-size: 13.5px; text-align: center; margin: 18px 0 0; color: var(--p2o-gris); }

.p2o-aviso {
    display: block; border-radius: 11px; padding: 11px 13px; font-size: 13.5px; line-height: 1.45;
    background: #fff7e6; color: #7a5200; margin-bottom: 14px;
}
.p2o-aviso[hidden] { display: none; }
.p2o-aviso--error { background: #ffecea; color: #9b1c12; }
.p2o-aviso--ok { background: #e8f8ee; color: #0d6b36; }

.p2o-cargando {
    position: fixed; inset: 0; background: rgba(255, 245, 240, .88); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.p2o-cargando[hidden] { display: none; }
.p2o-cargando__caja { text-align: center; font-weight: 700; }
.p2o-spinner {
    width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%;
    border: 4px solid rgba(255, 87, 67, .2); border-top-color: var(--p2o-naranja);
    animation: p2o-giro .8s linear infinite;
}
@keyframes p2o-giro { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
    .p2o-reg { grid-template-columns: minmax(0, 1fr); }
    .p2o-reg__marca { padding: 28px 22px 26px; gap: 10px; }
    .p2o-reg__sub { font-size: 15px; }
    .p2o-reg__puntos { gap: 8px; }
    .p2o-reg__puntos li { font-size: 14px; }
    .p2o-reg__panel { padding: 18px 14px 34px; }
    .p2o-tarjeta { padding: 24px 18px; }
}

/* ── Asistente de bienvenida (/restaurante/bienvenida) ─────────────────── */
.p2o-asi { max-width: 760px; margin: 0 auto; padding: 22px 16px 60px; }
.p2o-asi__cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.p2o-asi__cab .p2o-btn--linea { width: auto; margin: 0; }
.p2o-progreso { height: 6px; border-radius: 99px; background: #f3dcd3; overflow: hidden; margin-bottom: 20px; }
.p2o-progreso__barra { height: 100%; background: var(--p2o-naranja); border-radius: 99px; transition: width .3s; }
.p2o-paso-num { font-size: 12.5px; font-weight: 800; color: var(--p2o-naranja); text-transform: uppercase; letter-spacing: .6px; }
.p2o-asi .p2o-tarjeta { max-width: none; }
.p2o-paso { display: block; }
.p2o-paso[hidden] { display: none; }
.p2o-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 12px; margin: 6px 0 4px; }
.p2o-opcion {
    min-width: 0; position: relative; border: 2px solid var(--p2o-linea); border-radius: 16px; padding: 16px;
    background: #fff; cursor: pointer; display: grid; gap: 6px; align-content: start; transition: border-color .15s, box-shadow .15s;
}
.p2o-opcion[hidden] { display: none; }
.p2o-opcion:hover { border-color: #ffc2b6; }
.p2o-opcion.is-on { border-color: var(--p2o-naranja); box-shadow: 0 0 0 3px rgba(255, 87, 67, .12); }
.p2o-opcion.is-bloq { background: #fbf9f7; }
.p2o-opcion__ico { font-size: 22px; color: var(--p2o-naranja); }
.p2o-opcion__t { font-weight: 800; font-size: 15.5px; overflow-wrap: anywhere; }
.p2o-opcion__d { font-size: 13px; color: var(--p2o-gris); line-height: 1.45; }
.p2o-opcion__pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.p2o-sello {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; border-radius: 999px;
    padding: 4px 9px; background: #e8f8ee; color: #0d6b36; white-space: nowrap;
}
.p2o-sello--pro { background: #1d1f2b; color: #fff; }
.p2o-interes { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #3a3d4c; }
.p2o-interes input { width: 17px; height: 17px; accent-color: var(--p2o-naranja); }
.p2o-mesas { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.p2o-mesas[hidden] { display: none; }
.p2o-mesas input { width: 90px; }
.p2o-nota { font-size: 12.5px; color: var(--p2o-gris); margin: 6px 0 0; }

.p2o-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.p2o-dias { display: flex; flex-wrap: wrap; gap: 6px; }
.p2o-dias .p2o-chip span { min-width: 46px; text-align: center; }
.p2o-horas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; margin-top: 10px; }
.p2o-horas[hidden] { display: none; }

.p2o-carta-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.p2o-subida { display: grid; gap: 10px; margin-top: 14px; }
.p2o-subida[hidden] { display: none; }
.p2o-archivo {
    border: 2px dashed #f0c2b6; border-radius: 14px; padding: 20px; text-align: center; background: #fffaf8; cursor: pointer;
    display: block; font-size: 14px; color: #3a3d4c;
}
.p2o-archivo input { display: none; }
.p2o-estado { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.p2o-estado[hidden] { display: none; }
.p2o-estado .p2o-spinner { width: 20px; height: 20px; border-width: 3px; margin: 0; }

.p2o-wa { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 20px; align-items: start; }
.p2o-wa__pasos { margin: 0; padding-left: 20px; display: grid; gap: 9px; font-size: 14.5px; line-height: 1.45; }
.p2o-wa__qr { background: #fff; border: 1px solid var(--p2o-linea); border-radius: 14px; padding: 10px; text-align: center; font-size: 11.5px; color: var(--p2o-gris); }
.p2o-wa__qr canvas, .p2o-wa__qr img { width: 100%; height: auto; display: block; }
.p2o-codigo {
    display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; font-size: 15px;
    background: #f7f3f0; border-radius: 9px; padding: 7px 11px; letter-spacing: .5px; overflow-wrap: anywhere;
}
.p2o-semaforo { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-top: 14px; }
.p2o-semaforo i { font-size: 18px; }
.p2o-semaforo--ok { color: var(--p2o-ok); }
.p2o-acciones { display: flex; gap: 10px; margin-top: 22px; }
.p2o-acciones .p2o-btn { margin-top: 0; }
.p2o-acciones .p2o-btn--linea { width: auto; }

@media (max-width: 640px) {
    .p2o-wa { grid-template-columns: minmax(0, 1fr); }
    .p2o-wa__qr { display: none; }
}

/* ── Prueba terminada (equipo) ─────────────────────────────────────────── */
.p2o-fin { max-width: 480px; margin: 12vh auto 0; padding: 0 16px; text-align: center; }
.p2o-fin .p2o-tarjeta { margin: 18px auto 0; }

/* ── Aviso de protección de datos (RGPD) y sus enlaces (sep-28-2026) ────── */
.p2o-check a.p2o-aviso-link, .p2o-legal a.p2o-aviso-link { text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.p2o-check--error { color: #b42318; }
.p2o-check--error input { outline: 2px solid #f04438; outline-offset: 2px; }
.p2o-modal {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(21, 21, 26, .55);
}
.p2o-modal[hidden] { display: none; }
.p2o-modal__caja {
    position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto;
    background: #fff; border-radius: 20px; padding: 26px 26px 20px; box-shadow: 0 24px 60px rgba(21, 21, 26, .3);
}
.p2o-modal__x {
    position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%;
    background: #f5f1ee; color: var(--p2o-tinta); font-size: 20px; line-height: 1; cursor: pointer;
}
.p2o-modal__caja .p2o-h2 { padding-right: 36px; }
.p2o-modal__caja .p2o-h2 i { color: var(--p2o-naranja); }
.p2o-pol { margin: 12px 0 0; display: grid; gap: 0; border: 1px solid var(--p2o-linea); border-radius: 14px; overflow: hidden; }
.p2o-pol__fila { display: grid; grid-template-columns: 130px minmax(0, 1fr); border-top: 1px solid var(--p2o-linea); }
.p2o-pol__fila:first-child { border-top: 0; }
.p2o-pol dt { margin: 0; padding: 10px 12px; background: var(--p2o-fondo); font-size: 12.5px; font-weight: 800; color: var(--p2o-tinta); }
.p2o-pol dd { margin: 0; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: #3a3d4c; overflow-wrap: anywhere; }
.p2o-pol dd a { color: var(--p2o-naranja); font-weight: 600; }
.p2o-pol__avisos { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: #eefaf2; border: 1px solid #c8ecd5; }
.p2o-pol__avisos b { font-size: 13.5px; color: #0e7a3d; }
.p2o-pol__avisos p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: #3a3d4c; }
.p2o-pol__avisos.is-foco { box-shadow: 0 0 0 3px rgba(18, 161, 80, .25); }
.p2o-pol__mas { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 0; font-size: 13px; }
.p2o-pol__mas:empty { display: none; }
.p2o-pol__mas a { color: var(--p2o-naranja); font-weight: 700; }
.p2o-modal__acc { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
@media (max-width: 560px) {
    .p2o-pol__fila { grid-template-columns: minmax(0, 1fr); }
    .p2o-pol dt { padding-bottom: 4px; }
    .p2o-modal { align-items: flex-end; padding: 8px; }
}
