/*
 * Archivo: wf-agregar-al-pedido.css
 * Creado: 2026-02-02 12:31:39
 * Modificado: 2026-03-05 - Resumen financiero (impuestos, envío, total)
 * Modificado: 2026-03-11 - Fila informativa "Impuestos Incluidos en los Precios"
 * Modificado: 2026-03-12 - Cabeceras de grupo por etiquetas, formulario mesa, toggle comensales
 * Modificado: 2026-03-27 - Overlay de éxito post-WhatsApp
 */

/* ── MODO SOLO PRECIO (SIN PEDIDOS) ─────────────────────────────────────── */
.wf-precio-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 10px 0;
}

.wf-precio-unico {
    color: #ffffff;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    border: solid 1px;
    border-radius: 5px;
    padding: .1em .5em;
}

.wf-precios-multiples {
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: .7em 1em;
}

.wf-precio-item {
    text-align: center;
    color: #ffffff;
    font-size: 18px;
    border: solid 1px;
    border-radius: 5px;
    padding: .1em .5em;
}

.wf-precio-label {
    font-weight: bold;
    margin-right: 8px;
}

.wf-precio-valor {
    font-weight: bold;
}

/* ── MODO ACTIVO (CON PEDIDOS) ───────────────────────────────────────────── */
.selector-precios-pedido {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: .5em;
}

.selector-precios-pedido.modo-activo .opciones-precio {
    margin-bottom: 10px;
    border-radius: 5px;
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    gap: 6px 10px;
}

.selector-precios-pedido.modo-activo .opcion-precio {
    margin: 0;
    border-radius: 3px;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* ── "Chip" de precio moderno ─────────────────────────────────────────────
   El <label> completo actúa como botón seleccionable tipo chip/pill: borde,
   sombra suave, hover con leve elevación, y al seleccionarse un fondo blanco
   translúcido — sombras limpias, sin blur ni resplandor tipo neón (a
   propósito, se probó y no quedaba bien). Layout en fila forzado con
   display:flex + !important + prefijo "body": algunos temas como Divi lo
   rompían, causando que el texto se viera apilado. */
body .selector-precios-pedido.modo-activo .opcion-precio label {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 18px;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

body .selector-precios-pedido.modo-activo .opcion-precio label:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
}

body .selector-precios-pedido.modo-activo .opcion-precio label:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* Seleccionado: fondo blanco translúcido + borde blanco — sin JS, vía :has() */
body .selector-precios-pedido.modo-activo .opcion-precio label:has(input:checked) {
    background: rgba(255, 255, 255, 0.16);
    border-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Radio 100% custom (appearance:none + ::after): algunos temas (ej. Divi)
   resetean el radio nativo sin dejar visual de "seleccionado" — con esto el
   estado :checked SIEMPRE se ve, sin depender del estilo nativo del navegador
   ni de reglas del tema. Prefijado con "body" + !important en cada propiedad
   visual a propósito: es el mismo truco que ya usa este archivo para
   .carrito-pedidos-flotante, necesario para ganarle a CSS del tema (Divi)
   que a veces se carga después y con su propio !important. */
body .selector-precios-pedido.modo-activo .opcion-precio input[type="radio"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    margin: 0 8px 0 0 !important;
    padding: 0 !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.15) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    outline: none !important;
    cursor: pointer !important;
    position: relative !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease !important;
    vertical-align: middle !important;
}

body .selector-precios-pedido.modo-activo .opcion-precio input[type="radio"]:hover {
    border-color: #ffffff !important;
}

body .selector-precios-pedido.modo-activo .opcion-precio input[type="radio"]:checked {
    border-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    transform: scale(1.05) !important;
}

body .selector-precios-pedido.modo-activo .opcion-precio input[type="radio"]:checked::before,
body .selector-precios-pedido.modo-activo .opcion-precio input[type="radio"]:checked::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 10px !important;
    height: 10px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.selector-precios-pedido.modo-activo .label-precio {
    font-weight: bold;
    margin-right: 4px;
    color: #ffffff;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selector-precios-pedido.modo-activo .separador {
    margin: 0 3px;
    opacity: .65;
    white-space: nowrap;
}

.selector-precios-pedido.modo-activo .valor-precio {
    color: #ffffff;
    font-weight: bold;
    white-space: nowrap;
}

/* Mobile: una opción de precio por fila — elimina cualquier posibilidad de
   desbordamiento horizontal entre radios (la causa del corte visual), y
   texto más pequeño y pegado al radio para que quepa todo en una sola línea. */
@media (max-width: 480px) {
    .selector-precios-pedido.modo-activo .opciones-precio {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .selector-precios-pedido.modo-activo .opcion-precio {
        width: 100%;
    }
    body .selector-precios-pedido.modo-activo .opcion-precio label {
        justify-content: flex-start !important;
        font-size: 14px !important;
        padding: 7px 12px;
    }
    body .selector-precios-pedido.modo-activo .opcion-precio input[type="radio"] {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
        margin: 0 6px 0 0 !important;
    }
    body .selector-precios-pedido.modo-activo .opcion-precio input[type="radio"]:checked::before,
    body .selector-precios-pedido.modo-activo .opcion-precio input[type="radio"]:checked::after {
        width: 9px !important;
        height: 9px !important;
    }
    .selector-precios-pedido.modo-activo .label-precio {
        font-size: 13px;
        margin-right: 3px;
        max-width: 50%;
    }
    .selector-precios-pedido.modo-activo .separador {
        margin: 0 2px;
    }
    .selector-precios-pedido.modo-activo .valor-precio {
        font-size: 13px;
    }
}

.selector-precios-pedido.modo-activo .btn-agregar-pedido {
    background: #0a6680;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 60%;
    font-size: 18px;
    font-family: "Josefin Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: none !important;
    display: block;
}

@media (max-width: 667px) {
    .selector-precios-pedido.modo-activo .btn-agregar-pedido {
        width: 90%;
        margin-top: .5em;
    }
}

.selector-precios-pedido.modo-activo .btn-agregar-pedido:hover {
    background: #0d7a99;
    transform: translateY(-2px);
}

.selector-precios-pedido.modo-activo .btn-agregar-pedido.agregado {
    background: #4CAF50;
}

/* ── BOTÓN FLOTANTE Y MODAL PEDIDOS ─────────────────────────────────────── */
body .carrito-pedidos-flotante {
    /* Selector prefijado con "body" a propósito: más específico que el
       `.carrito-pedidos-flotante` plano, así gana incluso contra reglas con
       !important del propio tema (ej. Divi con su CSS combinado/cacheado
       "et-core-unified") que pudieran estar ocultándolo. */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    bottom: 6em;
    right: .5em;
    /* Por debajo del modal del carrito (z-index: 9999999) a propósito —
       si no, el botón queda flotando ENCIMA del modal abierto. */
    z-index: 999998 !important;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

body .carrito-pedidos-flotante.wf-dragging {
    cursor: grabbing;
    opacity: 0.88;
}

body .carrito-pedidos-flotante.wf-dragging .btn-lista-pedidos {
    transform: scale(1.08);
}

body .btn-lista-pedidos {
    background: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.btn-lista-pedidos:hover {
    background: #0a6680;
    transform: scale(1.1);
}

.carrito-contador {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3838;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:focus {
    outline: none;
    background-color: #0a6680;
}

.modal-pedidos {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-contenido {
    background: #333;
    width: 100%;
    max-width: 800px;
    height: auto;
    max-height: 90vh;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin: 0 auto;
}
body .modal-comanda{
    z-index: 99999991 !important;
}
.comanda-logo-text
 {
    line-height: 1.2em !important;
}
@media (min-width: 769px) {
    .modal-contenido {
        width: 60%;
        max-height: 95vh;
    }
}

@media (max-width: 768px) {
    .modal-pedidos {
        padding: 0;
        align-items: stretch;
    }
    .modal-contenido {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
}

.modal-header {
    background: #333;
    color: white;
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0px 12px 18px -6px rgba(0, 0, 0, 0.3);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
    color: white;
    padding: 0 !important;
}

.cerrar-modal {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: .1;
    padding: 0;
    width: 30px;
    /* Sin height fijo a propósito: con flex + align/justify-content centrado
       basta, y un height fijo competía con line-height del tema y descentraba
       la X dentro del círculo. */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
}

.cerrar-modal:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    background: rgba(0, 48, 59, 0.95);
}

.lista-pedidos-vacia {
    text-align: center;
    color: #666;
    padding: 40px 0;
    display: block;
}

.lista-pedidos {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}

/* ── Cabecera de grupo por etiqueta ──────────────────────────────────────── */
.lista-pedidos li.grupo-tag-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0 6px;
    border-bottom: none;
    border-top: 1px solid rgba(201, 168, 76, 0.25);
    margin-top: 6px;
}

.lista-pedidos li.grupo-tag-header:first-child {
    margin-top: 0;
    border-top: none;
}

.grupo-tag-icono {
    font-size: 16px;
    line-height: 1;
}

.grupo-tag-nombre {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #c9a84c;
}
/* ─────────────────────────────────────────────────────────────────────────── */

.lista-pedidos li {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed grey;
}

/* Los ítems de cabecera no tienen separador inferior de producto */
.lista-pedidos li.grupo-tag-header + li {
    border-top: none;
}

.item-media {
    margin-right: 15px;
    position: relative;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 5px;
}

.item-media video,
.item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    z-index: 2;
}

.item-container {
    display: flex;
    width: 100%;
}

.item-contenido {
    flex-grow: 1;
    min-width: 0;
}

.item-inferior {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.item-controles {
    display: flex;
}

.item-titulo {
    font-weight: bold;
    margin-bottom: 5px;
    word-break: break-word;
    font-size: 14px;
    color: #fff;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.2em;
}

.item-precio-info {
    font-size: 12px;
    color: #fff;
    margin-bottom: 3px;
    min-width: 30%;
}

.item-precio {
    color: #00303b;
    font-weight: bold;
    font-size: 14px;
}

.item-cantidad {
    display: flex;
    align-items: center;
    margin: 0 15px;
    flex-shrink: 0;
}

.btn-cantidad {
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.btn-cantidad:hover {
    background: #e0e0e0;
}

.cantidad-numero {
    margin: 0 10px;
    min-width: 30px;
    text-align: center;
    color: #fff;
    font-weight: bold;
}

.btn-eliminar {
    background: #ff6b6b;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.btn-eliminar:hover {
    background: #ff5252;
}

/* ── SUGERENCIAS INTELIGENTES (modules/recommendations) ─────────────────────
   Tira horizontal scrolleable de tarjetas compactas — mismos colores/
   tipografía que el resto del modal (coherencia visual), pero ocupando el
   mínimo espacio vertical posible para no tapar el carrito real. Mínimo 2
   tarjetas visibles en móvil, ~3 en pantallas más anchas; el resto se
   descubre haciendo scroll en X. */
#wfRecoBox {
    padding: 10px;
    border-top: 1px dashed rgba(201, 168, 76, 0.3);
    margin-top: 4px;
}

#wfRecoBox .wf-reco-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c9a84c;
    padding: 0;
}

#wfRecoBox.wf-reco-fading {
    transition: opacity 0.2s;
    opacity: 0;
}

.wf-reco-cards-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
}

.wf-reco-card {
    position: relative;
    scroll-snap-align: start;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 8px;
    padding: 6px;
    box-sizing: border-box;
    display: flex;
    transition: opacity 0.3s, border-color 0.3s;
    width: calc((100% - (var(--wf-reco-n-movil, 2) - 1) * 8px) / var(--wf-reco-n-movil, 2));
}

@media (min-width: 481px) {
    .wf-reco-card {
        width: calc((100% - (var(--wf-reco-n-pc, 3) - 1) * 8px) / var(--wf-reco-n-pc, 3));
    }
}

.wf-reco-card--added {
    border-color: #10b981;
}

/* ── Badges de categoría (Postres/Bebidas/…) ─────────────────────────────── */
.wf-reco-cat-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.wf-reco-cat-badge {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.wf-reco-cat-badge:hover { border-color: rgba(255, 255, 255, 0.6); }
.wf-reco-cat-badge.active {
    background: #ffffff;
    border-color: #ffffff;
    color: #1a1a1a;
}

/* ── Contador de unidades ya en el carrito ───────────────────────────────── */
.wf-reco-card-qty {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #10b981;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

@keyframes wf-reco-pulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.3); background: #10b981; }
    100% { transform: scale(1); }
}
.wf-reco-add-btn.wf-reco-added-pulse {
    animation: wf-reco-pulse 0.4s ease;
}

/* Layout "imagen a la izquierda" (default): tarjeta baja, ocupa poco alto —
   miniatura pequeña, título+precio+botón a la derecha en una sola fila. */
.wf-reco-pos-izquierda .wf-reco-card {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.wf-reco-pos-izquierda .wf-reco-card .item-media,
.wf-reco-pos-izquierda .wf-reco-card .item-media-placeholder,
.wf-reco-pos-izquierda .wf-reco-card .item-media-loading {
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    flex-shrink: 0;
}
.wf-reco-pos-izquierda .wf-reco-card-titulo {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 1;
    min-height: 0;
}

/* Layout "imagen arriba": tarjeta más alta, imagen más grande */
.wf-reco-pos-arriba .wf-reco-card {
    flex-direction: column;
}
.wf-reco-pos-arriba .wf-reco-card .item-media,
.wf-reco-pos-arriba .wf-reco-card .item-media-placeholder,
.wf-reco-pos-arriba .wf-reco-card .item-media-loading {
    width: 100% !important;
    height: 56px !important;
    margin-right: 0 !important;
    margin-bottom: 6px;
}

.wf-reco-card-media {
    flex-shrink: 0;
}

.wf-reco-sin-imagen .wf-reco-card-media {
    display: none;
}

.wf-reco-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.wf-reco-card-titulo {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: 2.5em;
}

.wf-reco-card-footer {
    margin-top: auto;
    padding-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.wf-reco-card-precio {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.wf-reco-add-btn {
    /* Reutiliza .btn-cantidad.mas: mismo círculo con "+" que ya se usa para
       incrementar cantidad — coherencia total con el resto del carrito. */
    flex-shrink: 0;
    width: 26px !important;
    height: 26px !important;
    transition: background 0.2s, transform 0.2s;
}

.wf-reco-add-btn.wf-reco-added {
    background: #10b981 !important;
    color: #fff !important;
    transform: scale(1.1);
    cursor: default;
}

/* ── RESUMEN FINANCIERO ──────────────────────────────────────────────────── */
.resumen-pedido {
    padding: 0 20px;
    background: #022830;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    display: none;
    box-shadow: 0px -12px 18px -6px rgba(0, 0, 0, 0.3);
}

.resumen-linea {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    color: rgba(255,255,255,0.75);
    font-size: 14px;
}

.resumen-linea + .resumen-linea {
    border-top: 1px dashed rgba(255,255,255,0.1);
}

.resumen-linea {
    padding: .3em 0;
}

.resumen-total-linea {
    border-top: 1px solid rgba(255,255,255,0.3) !important;
    color: #fff !important;
    font-size: 17px;
    font-weight: bold;
}

.resumen-concepto {
    letter-spacing: 0.02em;
}

.resumen-monto {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.resumen-total-linea .resumen-monto {
    font-size: 18px;
    color: #c9a84c;
}

/* Fila impuestos incluidos */
.resumen-imp-inc-linea {
    justify-content: center;
}

.resumen-imp-inc-texto {
    font-size: 12px;
    font-style: italic;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.03em;
    text-align: center;
}

/* ── FOOTER DEL MODAL ───────────────────────────────────────────────────── */
.modal-footer {
    padding: 20px;
    display: flex;
    justify-content: center;
    background: #03313b;
    border-top: 1px solid grey;
    flex-shrink: 0;
}

/* Aviso pedido mínimo — aparece justo debajo del footer */
body .pedido-min-aviso {
    background: #ff6b6b !important;
    border-top: 1px solid rgba(201, 168, 76, 0.3);
    color: #fff !important;
    font-size: 14px !important;
    text-align: center;
    padding: 10px 16px;
    line-height: 1.5;
    flex-shrink: 0;
    display: none;
}

body .pedido-min-aviso strong {
    font-weight: bold !important;
    color: #333!important;
    padding: .1em .3em;
    border-radius: 100px;
    background: #f0f0f0;
    border: #000 dashed 1px;
}

/* Botón generar pedido deshabilitado */
.generar-pedido:disabled,
.generar-pedido[disabled] {
    background: #2a2a2a !important;
    color: #555 !important;
    border-color: #444 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.vaciar-pedido {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: .1em;
}

.vaciar-pedido:hover {
    background: #ff5252;
}

@media (max-width: 480px) {
    .modal-header {
        padding: 5px 15px !important;
        box-shadow: 0px 12px 18px -6px rgba(0, 0, 0, 0.3);
    }
    .modal-header h3 {
        font-size: 1.1em;
        padding: 0 !important;
    }
    .modal-body {
        padding: 15px;
    }
    .lista-pedidos li {
        flex-wrap: nowrap !important;
        padding: 12px 0;
    }
    .modal-footer {
        padding: 10px 0px;
        justify-content: space-evenly;
    }
    .vaciar-pedido {
        padding: 0px 15px;
        font-size: 13px;
    }
    .resumen-pedido {
        padding: 0px 15px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .modal-contenido {
        margin: 20px;
        max-height: 90vh;
        border-radius: 10px;
    }
    .modal-pedidos {
        align-items: center;
    }
}

/* ── WF COMANDA ─────────────────────────────────────────────────────────── */
.comanda-linea-decorativa {
    font-size: 18px;
    color: #c9a84c;
    margin: 10px 0;
    letter-spacing: 6px;
    text-align: center;
}

.comanda-gracias {
    font-size: 16px;
    font-style: italic;
    color: #7a6a50;
    margin-top: 12px;
    letter-spacing: 1px;
    text-align: center;
}

/* ════════════════════════════════════════════════════════════════════════════
 * NUEVOS ESTILOS: MODO MESA, TOGGLE, AVISO, RGPD
 * ════════════════════════════════════════════════════════════════════════════ */

/* ── Número de mesa ─────────────────────────────────────────────────────── */
.comanda-mesa-numero-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fdfaf4;
    border: 1.5px solid #c9a84c;
    border-radius: 8px;
}

.mesa-icono {
    font-size: 22px;
}

.mesa-texto {
    font-size: 18px;
    font-family: "Georgia", serif;
    color: #1a1a1a;
}

.mesa-texto strong {
    color: #c9a84c;
    font-size: 20px;
}

/* ── Toggle pedido individual (Materialize switch — padding wrap) ─────────── */
.comanda-mesa-toggle-wrap { padding: 4px 0; }

/* ── Modo simple: acordeón invisible, body siempre expandido ─────────────── */
.comanda-acordeon.sin-formulario {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}
.comanda-acordeon.sin-formulario .comanda-acordeon-trigger {
    display: none !important;
}
.comanda-acordeon.sin-formulario .comanda-acordeon-body {
    max-height: none !important;
    padding: 0 !important;
    border-top: 0 !important;
    overflow: visible !important;
}

/* ── Input comensales ────────────────────────────────────────────────────── */
.comanda-mesa-comensales {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Aviso único pedido por mesa ─────────────────────────────────────────── */
.comanda-mesa-aviso {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    background: #fff8e1;
    border: 1.5px solid #c9a84c;
    border-radius: 8px;
    font-family: "Georgia", serif;
}

.comanda-mesa-aviso span {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.4;
}

.comanda-mesa-aviso p {
    font-size: 13px;
    color: #7a6a50;
    margin: 0;
    line-height: 1.5;
}

/* ── Texto RGPD (solo informativo) ───────────────────────────────────────── */
.comanda-rgpd-texto {
    font-size: 11px;
    color: #aaa;
    font-style: italic;
    text-align: center;
    margin: 0;
    line-height: 1.5;
    font-family: sans-serif;
    padding: 0 4px;
}

/* ── Sección mesa completa ───────────────────────────────────────────────── */
.comanda-mesa-section {
    margin-top: 24px;
    padding: 16px;
    background: #fff;
    border: 2px solid #c9a84c;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

/* Reutilizamos estilos de domicilio para input comensales (misma clase) */
.comanda-mesa-section .comanda-wa-input-cambio {
    max-width: 180px;
}

/* ── Responsive: mesa ────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .comanda-mesa-section {
        padding: 12px;
        gap: 12px;
    }

    .mesa-texto {
        font-size: 16px;
    }

    .mesa-texto strong {
        font-size: 18px;
    }

    .comanda-mesa-aviso p {
        font-size: 12px;
    }

    .mesa-toggle-texto {
        font-size: 13px;
    }
}

/* ════════════════════════════════════════════════════════════════════════════
 * TOGGLE "ESTOY EN EL RESTAURANTE"
 * Solo visible cuando domicilio está activo y modo mesa NO lo está.
 * ════════════════════════════════════════════════════════════════════════════ */
.wf-toggle-restaurante {
    padding: 5px;
    border-top: 1px dashed rgba(201, 168, 76, 0.35);
    background: #022830;
    flex-shrink: 0;
}

.wf-toggle-restaurante .switch label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #e4655a;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    margin: 0;
}

.wf-toggle-restaurante .switch label #wfToggleTexto {
    flex: 1;
}
/* icon is now an inline SVG sibling element (.wf-toggle-icon) */
.wf-toggle-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
/* ── Aviso guardar número (marketing) ───────────────────────────────────── */
.comanda-guardar-numero {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fff8e1;
    border: 1.5px dashed #c9a84c;
    border-radius: 8px;
    font-family: "Georgia", serif;
    font-size: 13px;
    color: #7a6a50;
    line-height: 1.5;
    margin: 0;
    text-align: left;
}