/* ═════════════════════════════════════════════════
   GPT-CHAT.CSS — UNICO foglio della chat IA, tema scuro. 12/10/2026.
   Sostituisce gpt-home / gpt-pagina-base / gpt-codelyze / gpt-brainlyze (e le rispettive -light).
   Usato da: home, pagine materia, pagina-default, contatti, ai-futureschool, Codelyze, Brainlyze.
   --cn-nuovo: 1 attiva le novita' di layout in ai/gpt.php (vedi cpNewAttivo).
   .cn-sempre-aperta (messa da gpt.php in Codelyze/Brainlyze): chat sempre aperta, niente "Esci dalla chat".
   ═════════════════════════════════════════════════*/

/* ============================================================================
   GPT-HOME1.CSS — copia di gpt-home-new.css per la home di prova (index1.php)
   ----------------------------------------------------------------------------
   La carica solo index1.php. gpt-home-new.css resta com'era e non va toccato.
   Differenze rispetto all'originale (05/10/2026):
     - tolti i tag <style> / </style>: in un file .css collegato con <link>
       non vanno, e il primo blocco di regole veniva scartato
     - chat aperta a tutto schermo: top 75px invece di 150px, perche'
       sotto il menu non c'e' piu' la barra dell'assistente (85px)
     - chat chiusa senza testata (regola [GPT1])
     - chat aperta: larghezza max 1333px (apertura/chiusura animata in gpt.php)
   ============================================================================ */
/* ===== FONT ===== */
@import url('fonts/fonts.css');

/* GPT HOME — sfondo nero pieno (niente immagine), bolle utente blu,
   bolle IA grafite, input chiaro. Larghezza max 1440px aperta e chiusa.
   Da chiusa: titolo, pin, cronologia, 2 messaggi, input.
   Nessuna variabile CSS: colori scritti direttamente, cosi' funzionano
   sia se il file e' incluso con PHP sia se e' collegato con <link>. */

/* ===== GLOBAL ===== */
.chatPrincipale_copy-btn {
  min-width: 100px;
  border: none;
  color: #fff;
  cursor: pointer;
  background-color: #222;
  -webkit-transition: background-color 0.3s ease, opacity 0.3s ease;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.chatPrincipale_copy-btn.success {
  background-color: green;
  opacity: 0.8;
}

/* ===== CHAT WRAPPER ===== */
.chatPrincipale_wrapper {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;

  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;

  z-index: 952;
  overflow-x: hidden;
  border-radius: 18px;
  background: transparent !important;
}

/* ===== CHAT CONTAINER ===== */
.chatPrincipale_chat-container {
  width: 100%;
  max-width: 1440px;

  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;

  margin-bottom: 30px;
  border-radius: 18px;
  overflow: hidden;

  -webkit-transition: max-height 0.5s ease;
  transition: max-height 0.5s ease;

  min-height: 390px;
  z-index: 952;

  /* Sfondo nero pieno al posto dell'immagine */
  background: #333 !important;
  background-color: #333 !important;
  background-image: none !important;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
}

@media only screen and (max-width:1024px) {
  .chatPrincipale_chat-container { min-height: 400px; }
  .chatPrincipale_wrapper { width: 95%; }
}

/* ===== ACTIVE (APERTA) ===== */
.chatPrincipale_chat-container.active {
  position: fixed !important;
  top: 67px;
  bottom: 35px;
  left: calc(50% + 125px);
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);

  width: calc(100% - 249px);
  max-width: 1333px;
  height: auto;
  border-radius: 0px;

  z-index: 952 !important;
  margin-bottom: 0;

  background: #333 !important;
  background-color: #333 !important;
  background-image: none !important;
}

/* Desktop: gpt.php limita la larghezza con "body .chatPrincipale_..." alla
   variabile --pag-larghezza. "html body" ha una precedenza in piu' e porta
   il limite a 1440px, sia da chiusa che da aperta. La posizione (menu a
   sinistra, centratura) resta quella decisa da gpt.php. */
@media (min-width: 1025px) {
  html body .chatPrincipale_wrapper {
    max-width: 1440px;
  }
  html body .chatPrincipale_chat-container {
    max-width: 1440px;
  }
  /* Chat APERTA: occupa tutto lo spazio disponibile (fra menu a sinistra e
     margine a destra) fino a un massimo di 1333px; oltre, resta centrata.
     Stessa logica e stessi valori di riserva di gpt.php, cosi' non cambia
     dove sta ma solo quanto puo' allargarsi. */
  html body .chatPrincipale_chat-container.active {
    left: var(--pag-menu, 269px);
    right: var(--pag-margine, 20px);
    width: auto;
    max-width: 1333px;
    margin-left: auto;
    margin-right: auto;
    -webkit-transform: none;
            transform: none;
  }
}

@-webkit-keyframes fadeInChat {
  from { opacity: 0; -webkit-transform: scale(0.98); transform: scale(0.98); }
  to   { opacity: 1; -webkit-transform: scale(1);    transform: scale(1); }
}
@keyframes fadeInChat {
  from { opacity: 0; -webkit-transform: scale(0.98); transform: scale(0.98); }
  to   { opacity: 1; -webkit-transform: scale(1);    transform: scale(1); }
}

@media only screen and (max-width:1024px) {
  .chatPrincipale_chat-container.active {
    top: 64px;
    bottom: 31px;
    left: 50%;
    -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 100%;
    height: auto;
    -webkit-animation: fadeInChat 0s ease-in-out;
            animation: fadeInChat 0s ease-in-out;
    z-index: 952;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* ===== HEADER ===== */
.chatPrincipale_header {
  background-color: #0f0f0f !important;
  background-image: none !important;
  color: #f3f5f8;
  padding: 4px 20px;
  border-radius: 0px;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.10) !important;

  max-width: 100%;
  margin: 0;

  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  gap: 12px;

  height: 50px;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  z-index: 99999;
}

@media only screen and (max-width:1024px) {
  .chatPrincipale_chat-container.active .chatPrincipale_header {
    border-radius: 0;
  }
}

.chatPrincipale_icons-left,
.chatPrincipale_icons-right {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 8px;
  min-width: 0;
}

@media only screen and (max-width:1024px) {
  .chatPrincipale_icons-left,
  .chatPrincipale_icons-right {
    gap: 4px;
  }
}

#chatPrincipale_chat-title {
  font-size: 16px;
  font-weight: 600;
  color: #f3f5f8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== CONTENITORE MESSAGGI ===== */
.chatPrincipale_contenitore_messaggi {
  margin-top: 0;
  overflow-y: auto;

  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;

  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  min-height: 200px;

  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
}

/* ===== MESSAGES ===== */
.chatPrincipale_chat-messages {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  padding: 20px 25px;

  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;

  gap: 12px;
  overflow-y: auto;

  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.22) transparent;
  background: transparent;
}

.chatPrincipale_chat-messages::-webkit-scrollbar { width: 8px; }
.chatPrincipale_chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.22);
  border-radius: 4px;
}

/* ===== SINGLE MESSAGE ===== */
.chatPrincipale_message {
  padding: 10px 15px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.6;
  font-size: 15px;
  white-space: pre-wrap;
  position: relative;
  text-align: left;
  color: #f3f5f8;
  text-shadow: none;

  -webkit-transition: all 0.3s ease, -webkit-transform 0.2s ease;
  transition: all 0.3s ease, transform 0.2s ease;
  -webkit-animation: popMessage 0.35s ease;
          animation: popMessage 0.35s ease;
}

@-webkit-keyframes popMessage {
  from { opacity: 0; -webkit-transform: translateY(12px); transform: translateY(12px); }
  to   { opacity: 1; -webkit-transform: translateY(0);    transform: translateY(0); }
}
@keyframes popMessage {
  from { opacity: 0; -webkit-transform: translateY(12px); transform: translateY(12px); }
  to   { opacity: 1; -webkit-transform: translateY(0);    transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .chatPrincipale_message { -webkit-animation: none; animation: none; }
}

@media only screen and (max-width:1024px) {
  .chatPrincipale_message {
    padding: 8px 10px;
    border-radius: 15px;
  }
}

/* ===== USER MESSAGE (BLU) ===== */
.chatPrincipale_message.chatPrincipale_user {
  background-color: #1f5ad6;
  color: #ffffff;
  border: 1px solid rgba(120,165,255,0.35);
  border-bottom-right-radius: 6px;
  -webkit-box-shadow: 0 6px 16px rgba(31,90,214,0.28);
          box-shadow: 0 6px 16px rgba(31,90,214,0.28);

  -ms-flex-item-align: end;
      align-self: flex-end;
  font-size: 14px;
  font-weight: 500;
}

/* ===== BOT MESSAGE (GRAFITE CHIARO) ===== */
.chatPrincipale_message.chatPrincipale_bot {
  background-color: #2f3644;
  color: #f3f5f8;
  border: 1px solid rgba(255,255,255,0.14);
  border-bottom-left-radius: 6px;
  -webkit-box-shadow: 0 6px 14px rgba(0,0,0,0.35);
          box-shadow: 0 6px 14px rgba(0,0,0,0.35);

  -ms-flex-item-align: start;
      align-self: flex-start;
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
}

.chatPrincipale_message.chatPrincipale_bot a { color: #93c5fd; }
.chatPrincipale_message.chatPrincipale_user a { color: #ffffff; text-decoration: underline; }

.chatPrincipale_typing {
  font-style: italic;
  color: #e5e7eb;
}

/* ===== INPUT AREA ===== */
.chatPrincipale_chat-input {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 0;
  background: transparent;
  position: relative;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.10);
}

/* Textarea chiara, come la versione originale */
.chatPrincipale_chat-input textarea {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid #bdbdbd;
  outline: none;

  background-color: #DADADA !important;
  color: #000000 !important;

  font-size: 15px;
  line-height: 1.5;
  resize: none;
  overflow: hidden;

  -webkit-transition: border-color 0.2s, box-shadow 0.3s;
  transition: border-color 0.2s, box-shadow 0.3s;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

.chatPrincipale_chat-input textarea::-webkit-input-placeholder { color: #555555; }
.chatPrincipale_chat-input textarea::-moz-placeholder          { color: #555555; opacity: 1; }
.chatPrincipale_chat-input textarea:-ms-input-placeholder      { color: #555555; }
.chatPrincipale_chat-input textarea::placeholder               { color: #555555; }

.chatPrincipale_chat-input textarea:focus {
  border-color: #3b82f6;
  -webkit-box-shadow: 0 0 0 3px rgba(59,130,246,0.30);
          box-shadow: 0 0 0 3px rgba(59,130,246,0.30);
}

/* ===== BUTTONS ===== */
.chatPrincipale_upload-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  cursor: pointer;
  -webkit-transition: all 0.3s ease, -webkit-transform 0.2s ease;
  transition: all 0.3s ease, transform 0.2s ease;
}

.chatPrincipale_upload-btn:hover {
  background: rgba(255,255,255,0.12);
  -webkit-transform: scale(1.05);
          transform: scale(1.05);
}

.chatPrincipale_send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #2563eb;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  cursor: pointer;
  -webkit-transition: all 0.3s ease, -webkit-transform 0.2s ease;
  transition: all 0.3s ease, transform 0.2s ease;
}

.chatPrincipale_send-btn:hover {
  background: #1d4ed8;
  -webkit-transform: scale(1.05);
          transform: scale(1.05);
}

.chatPrincipale_clear-btn,
.chatPrincipale_toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  cursor: pointer;
  -webkit-transition: -webkit-transform 0.2s ease;
  transition: transform 0.2s ease;
}

.chatPrincipale_clear-btn:hover,
.chatPrincipale_toggle-btn:hover {
  -webkit-transform: scale(1.1);
          transform: scale(1.1);
}

.chatPrincipale_header button:focus-visible,
.chatPrincipale_chat-footer button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ===== FOOTER ===== */
.chatPrincipale_chat-footer {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: start;
      -ms-flex-pack: start;
          justify-content: flex-start;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 10px 20px;
  gap: 12px;
  background: transparent;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.10);
  border-radius: 0 0 18px 18px;
}

/* ===== FONT FAMILY CONSISTENTE ===== */
.chatPrincipale_wrapper,
.chatPrincipale_chat-container,
.chatPrincipale_header,
.chatPrincipale_contenitore_messaggi,
.chatPrincipale_chat-input,
.chatPrincipale_chat-footer,
.chatPrincipale_message {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}


/* ════════════════════════════════════════════════════════════
   CHAT CHIUSA (non .active)
   Restano visibili: i due messaggi di benvenuto e il campo di input.
   La testata (titolo, pinnati, cronologia) si vede solo a chat espansa.
   Tutto il resto si nasconde e torna da solo quando la chat si apre.
   ════════════════════════════════════════════════════════════ */

.chatPrincipale_chat-container:not(.active) {
  min-height: 0;
}

/* Header: via "+ nuova chat" e matita rinomina (la X e' gia' nascosta da gpt.php) */
.chatPrincipale_chat-container:not(.active) #chatPrincipale_clear-btn,
.chatPrincipale_chat-container:not(.active) #chatPrincipale_inline-rename-btn {
  display: none !important;
}

/* [GPT1] Testata (titolo della chat, pinnati, cronologia): solo a chat
   espansa. Da chiusa resta nascosta; con :not(.active) torna da sola
   quando la chat si apre. */
.chatPrincipale_chat-container:not(.active) .chatPrincipale_header {
  display: none !important;
}

/* Elementi accessori dell'area messaggi e dell'input */
.chatPrincipale_chat-container:not(.active) #cpShare_tempBanner,
.chatPrincipale_chat-container:not(.active) #chatPrincipale_search-panel,
.chatPrincipale_chat-container:not(.active) #chatPrincipale_credit-badge,
.chatPrincipale_chat-container:not(.active) #cpScrollToBottom,
.chatPrincipale_chat-container:not(.active) #cpTypingFloating,
.chatPrincipale_chat-container:not(.active) #chatPrincipale_quote-preview,
.chatPrincipale_chat-container:not(.active) #cpEnterSwitch,
.chatPrincipale_chat-container:not(.active) #chatPrincipale_stop-btn {
  display: none !important;
}

/* Footer (preferenze IA, allega, rigenera, esporta, ...) */
.chatPrincipale_chat-container:not(.active) .chatPrincipale_chat-footer {
  display: none !important;
}

/* Area messaggi compatta: niente scroll, altezza data dai due messaggi */
.chatPrincipale_chat-container:not(.active) .chatPrincipale_contenitore_messaggi {
  min-height: 150px;
  overflow: hidden;
  cursor: pointer;
}
.chatPrincipale_chat-container:not(.active) .chatPrincipale_chat-messages {
  overflow: hidden;
  padding: 18px 25px 14px;
}

/* Solo gli ultimi due messaggi: all'avvio sono i due di benvenuto;
   se arriva un avviso (es. cookie) resta comunque leggibile */
.chatPrincipale_chat-container:not(.active) .chatPrincipale_chat-messages > .chatPrincipale_message:nth-last-child(n+3) {
  display: none !important;
}

/* Bolle pulite: senza riga ora/reazioni/copia */
.chatPrincipale_chat-container:not(.active) .chatPrincipale_message .cp-msg-footer {
  display: none !important;
}

/* Input chiuso: chiude la scheda in basso con gli angoli arrotondati */
.chatPrincipale_chat-container:not(.active) .chatPrincipale_chat-input {
  padding: 14px 20px 18px;
  border-radius: 0 0 18px 18px;
}

@media only screen and (max-width:1024px) {
  .chatPrincipale_chat-container:not(.active) {
    min-height: 0;
  }
  .chatPrincipale_chat-container:not(.active) .chatPrincipale_chat-messages {
    padding: 14px 14px 10px;
  }
  .chatPrincipale_chat-container:not(.active) .chatPrincipale_chat-input {
    padding: 12px 14px 14px;
  }
}


/* ════════════════════════════════════════════════════════════════════
   [NEW] 12/10/2026 — SCHEDA "CHAT ATTIVA" LAYOUT C (solo desktop >= 1025px)
   - La scheda occupa TUTTO lo spazio disponibile: a filo col menu sinistro,
     col menu in alto, con la barra in basso e col bordo destro. Niente
     larghezza massima, niente angoli arrotondati, niente bordo.
   - Griglia a 2 colonne: a sinistra testata + messaggi + campo di scrittura,
     a destra il pannello delle opzioni (il footer), a schede 2 colonne.
   - "Nuova chat", "Messaggi salvati" e "Cronologia" arrivano nel pannello
     dalla testata (le sposta lo script in ai/gpt-new.php).
   - Le etichette delle schede sono gli attributi title dei pulsanti
     (gia' tradotti nelle 9 lingue): niente testi nuovi.
   Misure: top 65px = menu in alto, bottom 34px = barra in basso,
   left = menu sinistro (--pag-menu meno --pag-margine = 249px).
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {

  html body .chatPrincipale_chat-container.active {
    --cn-pannello: rgba(0,0,0,.14);
    --cn-scheda:   rgba(0,0,0,.30);
    --cn-bordo:    rgba(255,255,255,.07);
    --cn-testo:    #c3c8d2;
    --cn-hover:    rgba(255,255,255,.09);

    position: fixed !important;
    top: 65px;
    bottom: 34px;
    left: calc(var(--pag-menu, 269px) - var(--pag-margine, 20px));
    right: 0;
    width: auto;
    max-width: none;
    height: auto;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    -webkit-transform: none;
            transform: none;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  }

  /* tutto quello che non e' testata o pannello sta nella colonna di sinistra */
  html body .chatPrincipale_chat-container.active > * { grid-column: 1; min-width: 0; }
  html body .chatPrincipale_chat-container.active > .chatPrincipale_header { grid-column: 1 / -1; grid-row: 1; }
  html body .chatPrincipale_chat-container.active > #cpShare_tempBanner { grid-row: 2; }
  html body .chatPrincipale_chat-container.active > #chatPrincipale_search-panel { grid-row: 3; }
  html body .chatPrincipale_chat-container.active > .chatPrincipale_contenitore_messaggi { grid-row: 4; min-height: 0; }
  html body .chatPrincipale_chat-container.active > .chatPrincipale_chat-input { grid-row: 5; }

  /* ---- il pannello di destra ---- */
  html body .chatPrincipale_chat-container.active > .chatPrincipale_chat-footer {
    grid-column: 2;
    grid-row: 2 / 6;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: min-content;
    align-content: start;
    gap: 8px;
    padding: 14px 12px;
    border-top: none;
    border-left: 1px solid var(--cn-bordo);
    border-radius: 0;
    background: var(--cn-pannello);
    overflow: visible;
  }
  /* riga di separazione fra "Chat" e "Strumenti" */
  html body .chatPrincipale_chat-container.active > .chatPrincipale_chat-footer::before {
    content: "";
    order: 5;
    grid-column: 1 / -1;
    height: 1px;
    margin: 4px 6px;
    background: var(--cn-bordo);
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > * { order: 6; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_clear-btn  { order: 1; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_pinnati-toggle { order: 4; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_storico-toggle { order: 3; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > .chatPrincipale_personality-dropdown { order: 4; display: contents; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn { order: 2; background: var(--cn-scheda) !important; border: 1px solid var(--cn-bordo) !important; box-shadow: none !important; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_more_btn { display: none !important; }

  /* ---- le schede (pulsante + etichetta) ---- */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn {
    box-sizing: border-box;
    width: auto;
    height: auto;
    min-height: 82px;
    margin: 0;
    padding: 12px 4px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 12px;
    background: var(--cn-scheda);
    border: 1px solid var(--cn-bordo);
    color: var(--cn-testo) !important;
    cursor: pointer;
    text-align: center;
    -webkit-transform: none;
            transform: none;
    -webkit-transition: background .15s ease, border-color .15s ease;
    transition: background .15s ease, border-color .15s ease;
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button:hover,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn:hover,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn:hover {
    background: var(--cn-hover);
    -webkit-transform: none;
            transform: none;
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button > svg,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn > svg,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn > svg {
    width: 24px;
    height: 24px;
    opacity: 1;
    -ms-flex-negative: 0;
        flex-shrink: 0;
  }
  /* etichetta = title del pulsante */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button::after,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn::after {
    content: attr(title);
    display: block;
    max-width: 100%;
    padding: 0 4px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--cn-testo);
    word-break: break-word;
  }
  /* etichetta corta (data-cn) al posto del title lungo */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button[data-cn]::after { content: attr(data-cn); }
  /* "Preferenze IA": l'etichetta e' gia' nel pulsante */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn span {
    font-size: 11.5px !important;
    font-weight: 500 !important;
    line-height: 1.2;
    color: var(--cn-testo) !important;
    white-space: normal !important;
    opacity: 1 !important;
    padding: 0 4px;
  }
  /* il badge della cronologia resta sull'angolo della scheda */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_storico-toggle,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_pinnati-toggle,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn { position: relative; }

  /* menu del modello IA: si apre verso l'alto, allineato a destra della scheda */
  html body .chatPrincipale_chat-container.active #cp_modello_menu { right: 0; left: auto; text-align: left; }

  /* schermi bassi: schede piu' compatte, il pannello resta tutto visibile */
  @media (max-height: 760px) {
    html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer { gap: 6px; padding: 10px 10px; }
    html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button,
    html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn,
    html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn {
      min-height: 66px; padding: 8px 3px; gap: 4px;
    }
    html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button > svg,
    html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn > svg,
    html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn > svg { width: 21px; height: 21px; }
  }
}


/* ════════════════════════════════════════════════════════════════════
   [NEW] 12/10/2026 (2) — "Nuova Chat" in evidenza, schede piu' strette,
   pannello comprimibile (barra di sole icone). Aperto di default; la scelta
   si ricorda (localStorage). Solo desktop >= 1025px.
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
  html body .chatPrincipale_chat-container.active { grid-template-columns: minmax(0, 1fr) 252px; }
  html body .chatPrincipale_chat-container.active.cn-compact { grid-template-columns: minmax(0, 1fr) 64px; }

  /* niente riga di separazione: le schede scorrono 2 per riga */
  html body .chatPrincipale_chat-container.active > .chatPrincipale_chat-footer::before { display: none; }
  html body .chatPrincipale_chat-container.active > .chatPrincipale_chat-footer { gap: 6px; padding: 10px 10px 14px; }

  /* schede piu' strette */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn {
    min-height: 62px; padding: 8px 3px; gap: 5px; border-radius: 11px;
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button > svg,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn > svg,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn > svg { width: 22px; height: 22px; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button::after,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn::after { font-size: 11px; }

  /* ordine: [comprimi] [Nuova Chat] [Preferenze][Cronologia] [Salvati] [strumenti...] */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cpNew_toggle { order: 0; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_clear-btn { order: 1; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn { order: 2; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_storico-toggle { order: 3; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_pinnati-toggle { order: 4; }

  /* "Nuova Chat": pulsante largo in evidenza */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_clear-btn {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    min-height: 36px;
    gap: 10px;
    padding: 0 10px;
    border-radius: 8px;
    background: -webkit-linear-gradient(top, #3b82f6, #2563eb);
    background: linear-gradient(#3b82f6, #2563eb);
    border-color: #2563eb;
    color: #ffffff !important;
    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
    margin-bottom: 6px;
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_clear-btn:hover { background: linear-gradient(#5b9bff, #3b78f0); }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_clear-btn > svg { width: 18px; height: 18px; stroke: #ffffff; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_clear-btn::after { font-size: 12.5px; font-weight: 600; padding: 0; color: #ffffff; }

  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn > svg { stroke: var(--cn-testo) !important; opacity: 1 !important; }
  /* pulsante comprimi / espandi */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cpNew_toggle {
    display: flex !important;
    grid-column: 1 / -1;
    justify-self: end;
    flex-direction: row;
    width: 30px; height: 28px; min-height: 0; padding: 0; margin: 0 0 2px;
    border: none; background: transparent; border-radius: 8px;
    align-items: center; justify-content: center;
    color: var(--cn-testo) !important; cursor: pointer;
  }
  /* 13/10/2026: la scritta "Comprimi il menu" (title del pulsante) resta visibile; da compresso la nasconde la regola generica di .cn-compact */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cpNew_toggle::after { font-size: 12px; font-weight: 500; padding: 0; color: var(--cn-testo); }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cpNew_toggle:hover { background: var(--cn-hover); }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cpNew_toggle > svg { width: 18px; height: 18px; -webkit-transition: transform .2s; transition: transform .2s; }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #cpNew_toggle > svg { transform: rotate(180deg); }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #cpNew_toggle { justify-self: center; }

  /* ---- pannello compresso: barra di sole icone (nome = title, al passaggio del mouse) ---- */
  html body .chatPrincipale_chat-container.active.cn-compact > .chatPrincipale_chat-footer {
    grid-template-columns: 1fr; justify-items: center; padding: 10px 6px 14px; gap: 5px;
  }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > button,
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #cp_modello_btn,
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer .chatPrincipale_model-btn {
    width: 44px; min-height: 42px; height: 42px; padding: 0; border-radius: 11px; justify-content: center;
  }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > button::after,
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #cp_modello_btn::after,
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > button[data-cn]::after { display: none; }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer .chatPrincipale_model-btn span { display: none !important; }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #chatPrincipale_clear-btn {
    grid-column: 1; margin-bottom: 2px; min-height: 42px; justify-content: center; padding: 0;
  }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #cpNew_toggle { width: 30px; height: 26px; }
}


/* ════════════════════════════════════════════════════════════════════
   [NEW] 12/10/2026 (3) — Voce nel pannello: scheda "Voce" (altoparlante) e
   barra "Voce oggi x / y min" (le sposta lo script in ai/gpt-new.php).
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button.aifsv-hdr {
    margin: 0; border-radius: 11px;
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button.aifsv-hdr.is-on { color: var(--cn-testo) !important; border-color: rgba(59, 130, 246, .6); background: rgba(59, 130, 246, .16); }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button.aifsv-hdr > svg { width: 22px; height: 22px; }
  /* barra "Voce oggi": riga a tutta larghezza in fondo al pannello */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button.aifsv-barra {
    order: 20;
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: auto; min-height: 0; height: auto;
    margin: 8px 2px 0; padding: 6px 4px; gap: 8px;
    background: none; border: none; border-radius: 8px;
    text-align: left;
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button.aifsv-barra:not(.is-vis) { display: none !important; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button.aifsv-barra::after { display: none; }
  /* pannello compresso: la barra non c'e', resta la scheda Voce */
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > button.aifsv-barra { display: none !important; }
}


/* ════════════════════════════════════════════════════════════════════
   [NEW] 12/10/2026 (4)
   - "Chiudi Chat": la X in testata diventa un pulsante con il testo (computer e telefono)
   - "Comprimi menu" in fondo al pannello
   - telefono/tablet (<=1024px): footer = Preferenze IA, Nuova chat, Allega file, Cronologia, "..."
   ════════════════════════════════════════════════════════════════════ */
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn {
  width: auto; height: 34px; min-width: 0;
  padding: 0 14px 0 10px; margin: 0 0 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.45);
  gap: 6px;
  color: #ffffff !important;
}
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn:hover { background: rgba(255,255,255,.18); -webkit-transform: none; transform: none; }
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn svg { width: 18px; height: 18px; filter: none; }
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn .cpx-bg { display: none !important; }
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn::after {
  content: attr(data-cn);
  font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
}

@media (min-width: 1025px) {
  /* "Comprimi menu": in basso nel pannello */
  html body .chatPrincipale_chat-container.active > .chatPrincipale_chat-footer { position: relative; padding-bottom: 48px; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cpNew_toggle {
    position: absolute; left: 10px; right: 10px; bottom: 10px; width: auto; margin: 0; order: 30; justify-self: stretch;
    justify-content: flex-start; gap: 8px; padding: 0 8px;
  }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #cpNew_toggle {
    right: auto; left: 50%; margin-left: -15px; width: 30px; padding: 0; justify-content: center;
  }
}

@media (max-width: 1024px) {
  /* footer del telefono: 5 elementi, ben distribuiti */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer { gap: 6px; padding: 8px 12px; justify-content: space-between; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_clear-btn {
    width: 45px; height: 45px; border-radius: 50%; margin: 0;
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_clear-btn svg { width: 24px; height: 24px; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cpNew_toggle { display: none !important; }
}
@media (max-width: 480px) {
  /* schermi molto stretti: "Preferenze IA" solo icona */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn span { display: none; }
}


/* ════════════════════════════════════════════════════════════════════
   [NEW] 12/10/2026 (5)
   - "Chiudi Chat": X e testo nel colore del tema (bianco scuro / nero chiaro)
   - ordine pannello: Nuova Chat, Cronologia, Messaggi salvati, Allega file, Preferenze IA, ...
   - pulsante "Allega" accanto al microfono (stesso stile, solo desktop)
   - altoparlante "Voce" animato (onde) quando la voce e' attiva
   ════════════════════════════════════════════════════════════════════ */
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn svg,
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn svg * { stroke: currentColor !important; }

@media (min-width: 1025px) {
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_storico-toggle { order: 2; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_pinnati-toggle { order: 3; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_upload-btn { order: 4; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer .chatPrincipale_model-btn { order: 5; }
}

/* "Allega" accanto al microfono: stesso stile del microfono (classe aifsv-mic), solo desktop */
html body #cpNew_attach { display: none; }
@media (min-width: 1025px) {
  html body #cpNew_attach { display: flex; }
}

/* altoparlante animato: le onde "escono" una dopo l'altra */
@-webkit-keyframes cnOnda { 0%, 100% { opacity: .15; } 35%, 70% { opacity: 1; } }
@keyframes cnOnda { 0%, 100% { opacity: .15; } 35%, 70% { opacity: 1; } }
@-webkit-keyframes cnOndaSp { 0%, 100% { -webkit-transform: translateX(0); transform: translateX(0); } 50% { -webkit-transform: translateX(1.2px); transform: translateX(1.2px); } }
@keyframes cnOndaSp { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.2px); } }
.aifsv-hdr.is-on .aifsv-onda path { -webkit-animation: cnOnda 1.3s ease-in-out infinite; animation: cnOnda 1.3s ease-in-out infinite; }
.aifsv-hdr.is-on .aifsv-onda path:nth-child(2) { -webkit-animation-delay: .25s; animation-delay: .25s; }
@media (prefers-reduced-motion: reduce) {
  .aifsv-hdr.is-on .aifsv-onda path { -webkit-animation: none; animation: none; }
}


/* ════════════════════════════════════════════════════════════════════
   [NEW] 12/10/2026 (6) — "Esci dalla chat": freccia indietro + testo, fondo pieno
   (bianco nel tema scuro, nero nel tema chiaro). Sostituisce la X.
   ════════════════════════════════════════════════════════════════════ */
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn {
  height: 36px; padding: 0 16px 0 10px; margin: 0 0 0 10px; gap: 6px;
  border-radius: 10px; border: none;
  background: #d9dce2 !important; color: #2b2f36 !important;
}
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn:hover { background: #c9cdd5 !important; }
/* 13/10/2026: "Esci dalla chat" a 11px dal bordo destro (computer, tablet e telefono) */
html body .chatPrincipale_chat-container.active .chatPrincipale_header { padding-right: 11px !important; }
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn { margin-right: 0 !important; }
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn svg { display: none !important; }
html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn::before {
  content: ""; width: 18px; height: 18px; display: block; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* [NEW] marcatore: dice ad ai/gpt.php che questa pagina ha il pannello a destra (layout C) */
:root { --cn-nuovo: 1; }

/* il generatore immagini non c'e' piu' nella home (resta nelle altre pagine) */
#chatPrincipale_openImageCreator, #cp_more_img { display: none !important; }

/* ════════════════════════════════════════════════════════════════════
   [NEW] 12/10/2026 (7) — telefono (<=600px): "Esci" corto, a 11px dal bordo destro
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  html body .chatPrincipale_chat-container.active .chatPrincipale_header { padding-right: 11px !important; }
  html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn { margin-right: 0 !important; padding: 0 14px 0 8px; }
  html body .chatPrincipale_chat-container.active #chatPrincipale_toggle-btn::after { content: attr(data-cn-s); }
}

/* ════════════════════════════════════════════════════════════════════
   Codelyze / Brainlyze: chat sempre aperta, senza "Esci dalla chat" (classe messa da gpt.php)
   ════════════════════════════════════════════════════════════════════ */
html body .chatPrincipale_chat-container.cn-sempre-aperta.active #chatPrincipale_toggle-btn { display: none !important; }
#preferenze_btn { display: none !important; }

/* ════════════════════════════════════════════════════════════════════
   [NEW] 13/10/2026 — Pannello destro, versione B: tessere scure e piatte, larghe 252px,
   testo e icone bianchi (tema scuro), striscia azzurrina in basso che al passaggio
   del mouse sfuma in bianco. Vale anche per "Preferenze IA" e "Modello IA". Solo desktop.
   Badge numerici di Cronologia e Pinnati: solo il numero, senza sfondo.
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
  html body .chatPrincipale_chat-container.active { --cn-testo: #f4f6f9; --cn-ico: #f4f6f9; }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button:not(#chatPrincipale_clear-btn):not(#cpNew_toggle):not(.aifsv-barra),
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer #chatPrincipale_model-btn.chatPrincipale_selected-option,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn {
    position: relative;
    padding-bottom: 10px;
    border-radius: 10px;
    box-shadow: none !important;
    background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.08)) !important;
    border-color: rgba(255,255,255,.16) !important;
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button:not(#chatPrincipale_clear-btn):not(#cpNew_toggle):not(.aifsv-barra)::before,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer #chatPrincipale_model-btn.chatPrincipale_selected-option::before,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn::before {
    content: "";
    display: block !important;
    position: absolute;
    left: 16px; right: 16px; bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: -webkit-linear-gradient(left, transparent, #60a5fa, transparent);
    background: linear-gradient(90deg, transparent, #60a5fa, transparent);
    -webkit-transition: -webkit-filter .35s ease;
    transition: filter .35s ease;
    pointer-events: none;
  }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button:not(#chatPrincipale_clear-btn):not(#cpNew_toggle):not(.aifsv-barra):hover::before,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer #chatPrincipale_model-btn.chatPrincipale_selected-option:hover::before,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn:hover::before { -webkit-filter: saturate(0) brightness(3); filter: saturate(0) brightness(3); }
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button:not(#chatPrincipale_clear-btn):not(#cpNew_toggle):not(.aifsv-barra) > svg, html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > button:not(#chatPrincipale_clear-btn):not(#cpNew_toggle):not(.aifsv-barra) > svg *,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer #chatPrincipale_model-btn.chatPrincipale_selected-option > svg, html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer #chatPrincipale_model-btn.chatPrincipale_selected-option > svg *,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn > svg, html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #cp_modello_btn > svg * { stroke: var(--cn-ico) !important; }
  /* badge numerici: solo il numero, senza sfondo */
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_storico-toggle .cp-storico-badge,
  html body .chatPrincipale_chat-container.active .chatPrincipale_chat-footer > #chatPrincipale_pinnati-toggle .cp-pin-badge {
    top: 6px; right: 9px; min-width: 0; height: auto; padding: 0;
    background: transparent !important; border: none !important; box-shadow: none !important;
    color: var(--cn-ico); font-size: 11px; font-weight: 600;
  }
  /* pannello compresso: solo icona, niente striscia ne' numeri */
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > button:not(#chatPrincipale_clear-btn):not(#cpNew_toggle):not(.aifsv-barra), html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer #chatPrincipale_model-btn.chatPrincipale_selected-option, html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #cp_modello_btn { padding-bottom: 0; }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > button:not(#chatPrincipale_clear-btn):not(#cpNew_toggle):not(.aifsv-barra)::before, html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer #chatPrincipale_model-btn.chatPrincipale_selected-option::before, html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #cp_modello_btn::before { display: none !important; }
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #chatPrincipale_storico-toggle .cp-storico-badge,
  html body .chatPrincipale_chat-container.active.cn-compact .chatPrincipale_chat-footer > #chatPrincipale_pinnati-toggle .cp-pin-badge { display: none; }
}
