/* TuWebLocal — generador de carta de alérgenos (a1 · 2026-10-05). Complementa twl-gen.a1.css */
/* Insignia numerada de alérgeno */
.twl-al-b{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;font-size:.72rem;font-weight:800;line-height:1;flex:none;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.55)}
.twl-al-b--s{width:20px;height:20px;font-size:.64rem}
.twl-al-bs{display:inline-flex;flex-wrap:wrap;gap:4px;align-items:center;justify-content:flex-end}
.twl-al-bs em{font-style:normal;font-size:.76rem;font-weight:700;color:#7a8b96}

/* Platos */
.twl-al-platos{display:grid;gap:.7rem;margin:0 0 .7rem}
.twl-al-plato{border:1px solid #dbe8f1;background:#f8fbfd;border-radius:14px;padding:.75rem .8rem .85rem}
.twl-al-plato__top{display:flex;justify-content:space-between;align-items:center;margin:0 0 .5rem;min-height:28px;gap:.5rem}
.twl-al-plato__n{font-size:.8rem;font-weight:800;color:#0d4ba0;letter-spacing:.04em;text-transform:uppercase}
.twl-al-plato__acts{display:flex;gap:.2rem}
.twl-al-plato__ok,.twl-al-plato__x{border:0;background:none;font:inherit;font-size:.82rem;font-weight:700;cursor:pointer;padding:.3rem .5rem;border-radius:8px}
.twl-al-plato__ok{color:#0d4ba0}
.twl-al-plato__ok:hover{background:#e6f0fc}
.twl-al-plato__x{color:#8a1f12}
.twl-al-plato__x:hover{background:#fdecea}
.twl-al-plato__x[hidden]{display:none}
.twl-al-plato__campos{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:0 .6rem}
.twl-al-plato .twl-gen__f{margin-bottom:.7rem}
.twl-al-plato .twl-gen__f>span{font-size:.8rem}
.twl-al-plato input[type=text]{background:#fff}
.twl-al-plato.is-plegado{padding-bottom:.75rem}
.twl-al-plato.is-plegado .twl-al-plato__campos,.twl-al-plato.is-plegado .twl-al-chips,.twl-al-plato.is-plegado .twl-al-sin{display:none}
.twl-al-plato__res{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .6rem;margin:0;cursor:pointer;background:#fff;border:1px solid #e3edf4;border-radius:10px;padding:.55rem .7rem}
.twl-al-plato__res[hidden]{display:none}
.twl-al-plato__res strong{color:#102a43;font-size:.95rem;min-width:0;overflow-wrap:anywhere}
.twl-al-plato__res small{font-size:.75rem;font-weight:700;color:#5c6f7b;background:#eef6fb;border-radius:999px;padding:.12rem .55rem}
.twl-al-plato__res .twl-al-bs{margin-left:auto}

/* Chips de alérgenos */
.twl-al-chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(138px,1fr));gap:.4rem;margin:0 0 .55rem}
.twl-al-chip{position:relative;display:block;cursor:pointer}
.twl-al-chip input,.twl-al-sin input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.twl-al-chip span{display:flex;align-items:center;gap:.45rem;min-height:40px;box-sizing:border-box;padding:.35rem .55rem .35rem .4rem;border:1.5px solid #dbe8f1;background:#fff;border-radius:999px;font-size:.84rem;font-weight:700;color:#41545f;line-height:1.15;transition:border-color .15s,background .15s,color .15s}
.twl-al-chip span i{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;font-style:normal;font-size:.7rem;font-weight:800;flex:none;opacity:.4;filter:grayscale(.6);transition:opacity .15s,filter .15s}
.twl-al-chip:hover span{border-color:#9cc3ea}
.twl-al-chip input:checked+span{border-color:#176be0;background:#e6f0fc;color:#102a43}
.twl-al-chip input:checked+span i{opacity:1;filter:none}
.twl-al-chip input:focus-visible+span,.twl-al-sin input:focus-visible+span{outline:3px solid #9cc3ea;outline-offset:2px}
.twl-al-sin{position:relative;display:block;cursor:pointer}
.twl-al-sin span{display:flex;align-items:center;justify-content:center;min-height:40px;box-sizing:border-box;padding:.35rem .8rem;border:1.5px dashed #b8d8c6;background:#fff;border-radius:999px;font-size:.84rem;font-weight:700;color:#41545f;text-align:center}
.twl-al-sin:hover span{border-color:#2f9e44}
.twl-al-sin input:checked+span{border-style:solid;border-color:#1f7a4d;background:#e8f6ee;color:#14532d}

.twl-al-add{width:100%;border:1.5px dashed #9cc3ea;background:#fff;color:#0d4ba0;border-radius:12px;min-height:46px;font:inherit;font-weight:800;font-size:.92rem;cursor:pointer;margin:0 0 .6rem}
.twl-al-add:hover{border-color:#176be0;background:#eef6fe}
.twl-al-add[disabled]{opacity:.55;cursor:not-allowed}
.twl-al-mini{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 .6rem}
.twl-al-mini button{border:1px solid #dbe8f1;background:#fff;color:#41545f;border-radius:999px;font:inherit;font-size:.82rem;font-weight:700;padding:.4rem .85rem;cursor:pointer;min-height:36px}
.twl-al-mini button:hover{border-color:#9cc3ea;color:#0d4ba0}
.twl-al-check{display:flex;gap:.55rem;align-items:flex-start;font-size:.9rem;font-weight:700;color:#102a43;margin:0 0 .9rem;cursor:pointer;line-height:1.4}
.twl-al-check input{width:20px;height:20px;margin:.05rem 0 0;flex:none;accent-color:#176be0}
.twl-al-check small{display:block;font-weight:500;color:#5c6f7b;font-size:.8rem}

/* Vista previa */
.twl-al-tabs{align-self:stretch;display:grid;grid-template-columns:1fr 1fr;gap:4px;background:#dbe8f1;border-radius:12px;padding:4px;margin:0 0 .8rem}
.twl-al-tabs button{border:0;background:none;border-radius:9px;font:inherit;font-size:.85rem;font-weight:800;color:#41545f;padding:.5rem;cursor:pointer;min-height:38px}
.twl-al-tabs button[aria-selected=true]{background:#fff;color:#0d4ba0;box-shadow:0 1px 3px rgba(16,42,67,.12)}
.twl-al-doc{align-self:stretch;background:#fff;border-radius:12px;box-shadow:0 10px 30px rgba(16,42,67,.12);padding:1.1rem 1rem 1rem;min-width:0;color:#102a43;max-height:640px;overflow:auto}
.twl-al-doc__head{text-align:center;border-bottom:2px solid #176be0;padding:0 0 .6rem;margin:0 0 .7rem}
.twl-al-doc__head strong{display:block;font-size:1.15rem;line-height:1.2;overflow-wrap:anywhere}
.twl-al-doc__head span{display:block;font-size:.74rem;color:#5c6f7b;margin:.2rem 0 0}
.twl-al-doc__vacio{text-align:center;font-size:.88rem;color:#7a8b96;margin:1.4rem .5rem}
.twl-al-doc__sec{font-size:.74rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:#176be0;margin:.75rem 0 .25rem;text-align:center}
.twl-al-doc__l{list-style:none;margin:0;padding:0}
.twl-al-doc__l li{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.42rem 0;border-bottom:1px dotted #cfdde8;font-size:.88rem}
.twl-al-doc__l li:last-child{border-bottom:0}
.twl-al-doc__l .n{font-weight:700;min-width:0;overflow-wrap:anywhere}
.twl-al-doc__l em.ok{color:#1f7a4d}
.twl-al-doc__l em.pend{color:#b42318}
.twl-al-doc__ley{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.3rem .6rem;background:#f4f9fc;border-radius:10px;padding:.65rem .7rem;margin:.9rem 0 0}
.twl-al-doc__ley span{display:flex;align-items:center;gap:.4rem;font-size:.74rem;color:#41545f;min-width:0}
.twl-al-doc__trazas{font-size:.74rem;line-height:1.45;color:#8a1f12;margin:.6rem 0 0;font-weight:600}
.twl-al-tw{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -.2rem}
.twl-al-t{border-collapse:collapse;font-size:.78rem;width:100%;min-width:430px}
.twl-al-t th,.twl-al-t td{border:1px solid #e3edf4;padding:.3rem .15rem;text-align:center}
.twl-al-t th.p,.twl-al-t td.p{text-align:left;padding:.3rem .45rem;font-weight:700;min-width:110px;position:sticky;left:0;background:#fff}
.twl-al-t thead th{background:#eef6fb}
.twl-al-t thead th.p{background:#eef6fb}
.twl-al-t__sec td{background:#176be0!important;color:#fff;font-size:.7rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;text-align:left;padding:.25rem .45rem}
.twl-al-prevnota{font-size:.8rem;line-height:1.45;color:#5c6f7b;margin:.9rem 0 0;text-align:center}
.twl-al-prevnota strong{color:#102a43}

/* Rejilla de los 14 alérgenos */
.twl-al-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:.7rem;margin:1.3rem 0 0;padding:0;list-style:none}
.twl-al-grid li{display:flex;gap:.7rem;align-items:flex-start;background:#fff;border:1px solid #dbe8f1;border-radius:14px;padding:.8rem .85rem}
.twl-al-grid .twl-al-b{width:34px;height:34px;font-size:.92rem}
.twl-al-grid strong{display:block;color:#102a43;font-size:.95rem;margin:0 0 .15rem}
.twl-al-grid p{margin:0;font-size:.84rem;line-height:1.45;color:#5c6f7b}

/* Maqueta de móvil en la oferta */
.twl-al-movil{width:118px;height:206px;border-radius:22px;background:#102a43;padding:7px;box-sizing:border-box;box-shadow:0 14px 30px rgba(16,42,67,.25);position:relative}
.twl-al-movil>div{height:100%;border-radius:16px;background:#fff;overflow:hidden;display:flex;flex-direction:column;gap:6px;padding:12px 9px 9px;box-sizing:border-box}
.twl-oferta .twl-al-movil b{line-height:1.3;font-size:.62rem;color:#102a43;text-align:center;letter-spacing:.04em}
.twl-oferta .twl-al-movil p{display:flex;align-items:center;justify-content:space-between;gap:4px;margin:0;font-size:.55rem!important;line-height:1.3!important;font-weight:700;color:#41545f;border-bottom:1px dotted #cfdde8;padding:0 0 4px;max-width:none}
.twl-al-movil p span{display:inline-flex;gap:2px}
.twl-al-movil p i{width:9px;height:9px;border-radius:50%;display:block}
.twl-al-movil .qr{margin-top:auto;align-self:center;width:34px;height:34px;border-radius:4px;background:conic-gradient(#102a43 25%,#fff 0 50%,#102a43 0 75%,#fff 0) 0 0/8px 8px;border:3px solid #102a43}
.twl-al-movil .nfc{position:absolute;right:-22px;bottom:18px;width:46px;height:46px;border-radius:12px;background:#176be0;color:#fff;font-size:.6rem;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 18px rgba(23,107,224,.35);transform:rotate(-8deg)}
#al-form .twl-gen__acts{grid-template-columns:repeat(3,minmax(0,1fr))}
#al-form .twl-gen__acts .twl-gen__btn:not(.twl-gen__btn--main){white-space:nowrap;padding-left:.4rem;padding-right:.4rem}
@media (max-width:700px){#al-form .twl-gen__acts{grid-template-columns:repeat(3,minmax(0,1fr))}#al-form .twl-gen__acts .twl-gen__btn:not(.twl-gen__btn--main){flex-direction:column;gap:.15rem;font-size:.82rem;min-height:58px}}

@media (max-width:640px){
  .twl-al-plato__campos{grid-template-columns:1fr}
  .twl-al-chips{grid-template-columns:repeat(2,minmax(0,1fr))}
  .twl-al-chip span{font-size:.8rem;padding-right:.4rem}
  .twl-al-doc{max-height:none}
}
@media (max-width:360px){
  .twl-al-chips{grid-template-columns:1fr 1fr;gap:.3rem}
  .twl-al-chip span{gap:.3rem;font-size:.76rem}
  .twl-al-doc__ley{grid-template-columns:1fr}
}
