/* tekchat 0.2.0: linguetta delle promozioni e pannello. Tutto dentro #tekpromo per non toccare il tema.
   21/11/2026: tutto sotto il banner dei cookie (LegalBlink, 1000000000). La linguetta sta sotto la finestra della chat (999999950), che aperta la copre; il pannello aperto sta sopra il pulsante della chat (999999960). */
#tekpromo { --tekpromo-bg:#ff6600; --tekpromo-fg:#fff; --tekpromo-top:40%; font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color:#1d2733; }
#tekpromo *, #tekpromo *::before, #tekpromo *::after { box-sizing:border-box; }

#tekpromo .tekpromo-linguetta {
  position:fixed; right:0; top:var(--tekpromo-top); transform:translateY(-50%); z-index:999999900;
  display:flex; align-items:center; gap:8px; writing-mode:vertical-rl; padding:14px 9px; margin:0;
  background:var(--tekpromo-bg); color:var(--tekpromo-fg); border:0; border-radius:10px 0 0 10px; cursor:pointer;
  font:700 14px/1 system-ui,-apple-system,"Segoe UI",sans-serif; letter-spacing:.4px; box-shadow:-3px 2px 10px rgba(0,0,0,.2);
}
#tekpromo .tekpromo-linguetta:hover { padding-right:12px; }
#tekpromo .tekpromo-linguetta:focus-visible { outline:3px solid #1d4ed8; outline-offset:2px; }
#tekpromo [hidden] { display:none !important; }
#tekpromo .tekpromo-numero {
  writing-mode:horizontal-tb; background:var(--tekpromo-fg); color:var(--tekpromo-bg); border-radius:50%;
  width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700;
}
#tekpromo.tekpromo--movimento .tekpromo-linguetta { animation:tekpromo-movimento 1.2s ease-in-out 2; }
@keyframes tekpromo-movimento { 0%,100% { transform:translateY(-50%) translateX(0); } 50% { transform:translateY(-50%) translateX(-7px); } }
@media (prefers-reduced-motion: reduce) { #tekpromo.tekpromo--movimento .tekpromo-linguetta { animation:none; } }

#tekpromo .tekpromo-velo { position:fixed; inset:0; z-index:999999970; background:rgba(16,24,32,.32); }
#tekpromo .tekpromo-pannello {
  position:fixed; top:var(--tekpromo-pannello-top, 130px); right:0; z-index:999999980; width:380px; max-width:90vw;
  max-height:calc(100vh - var(--tekpromo-pannello-top, 130px) - 90px); min-height:0; background:#fff;
  display:flex; flex-direction:column; overflow:hidden; border-radius:12px 0 0 12px;
  box-shadow:-8px 0 30px rgba(0,0,0,.18); animation:tekpromo-entra-destra .25s ease;
}
@keyframes tekpromo-entra-destra { from { transform:translateX(100%); } to { transform:none; } }
#tekpromo .tekpromo-testata { display:flex; align-items:center; gap:10px; padding:14px 16px; position:relative;
  background:var(--tekpromo-head-bg, #3e5c76); color:var(--tekpromo-head-fg, #fff); }
#tekpromo .tekpromo-testata h2 { margin:0; flex:1; font-size:17px; line-height:1.25; color:inherit; }
#tekpromo .tekpromo-chiudi { border:0; background:none; font-size:28px; line-height:1; cursor:pointer; color:inherit; opacity:.85; padding:0 4px; }
#tekpromo .tekpromo-chiudi:hover { opacity:1; }
#tekpromo .tekpromo-elenco { padding:4px 16px; overflow-y:auto; flex:0 1 auto; min-height:0; -webkit-overflow-scrolling:touch; }
#tekpromo .tekpromo-voce { padding:16px 0; margin:0; border-bottom:1px solid #e4e7ec; }
#tekpromo .tekpromo-voce:last-child { border-bottom:0; }
#tekpromo .tekpromo-immagine { display:block; width:100%; height:auto; border-radius:8px; margin:0 0 10px; }
#tekpromo .tekpromo-voce h3 { margin:0 0 6px; font-size:16px; line-height:1.3; color:#1d2733; }
#tekpromo .tekpromo-testo { font-size:14px; color:#44505c; }
#tekpromo .tekpromo-testo p { margin:0 0 6px; }
#tekpromo .tekpromo-testo img { max-width:100%; height:auto; }
#tekpromo .tekpromo-codice { display:flex; gap:8px; align-items:center; margin-top:10px; }
#tekpromo .tekpromo-codice code { border:1px dashed #0b4f8a; color:#0b4f8a; background:#f5f8fc; padding:5px 10px; border-radius:6px; font:600 14px ui-monospace,Consolas,monospace; }
#tekpromo .tekpromo-codice button { border:1px solid #cfd6de; background:#fff; border-radius:6px; padding:5px 10px; cursor:pointer; font:13px system-ui,sans-serif; }
#tekpromo .tekpromo-link { display:inline-block; margin-top:10px; color:#0b4f8a; font-weight:600; text-decoration:none; }
#tekpromo .tekpromo-link:hover { text-decoration:underline; }
#tekpromo .tekpromo-fine { margin:8px 0 0; font-size:12px; color:#6b7785; }
#tekpromo .tekpromo-fine.tekpromo-fine--vicina { color:#b42318; font-weight:600; }
#tekpromo .tekpromo-immagine-link { display:block; }
#tekpromo .tekpromo-nota { padding:12px 16px; border-top:1px solid #e4e7ec; font-size:12px; color:#6b7785; }

/* dispositivi */
@media (max-width: 767px) {
  #tekpromo.tekpromo--desktop { display:none; }
  #tekpromo .tekpromo-linguetta { padding:10px 7px; font-size:12px; gap:6px; }
  #tekpromo .tekpromo-numero { width:19px; height:19px; font-size:11px; }
  /* sul telefono il pannello sale dal basso */
  #tekpromo .tekpromo-pannello { top:auto; bottom:0; left:0; width:100%; max-width:100%; height:auto; max-height:75vh; border-radius:16px 16px 0 0; animation:tekpromo-entra-basso .25s ease; }
  #tekpromo .tekpromo-testata::before { content:""; position:absolute; left:50%; top:7px; width:40px; height:4px; border-radius:2px; background:rgba(255,255,255,.55); transform:translateX(-50%); }
}
@media (min-width: 768px) { #tekpromo.tekpromo--mobile { display:none; } }
@keyframes tekpromo-entra-basso { from { transform:translateY(100%); } to { transform:none; } }
html.tekpromo-bloccato, html.tekpromo-bloccato body { overflow:hidden; }
