/* Rimuovi o commenta questo dal tuo CSS originale se presente globalmente */
/*
html {
  zoom: 100%;
}
*/

/* Stili globali e reset esistenti */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
	background: linear-gradient(120deg, #ffe0ec 0%, #e3f0ff 100%);
  margin: 0;
  padding: 0; /* Rimosso il padding: 24px originale */

  /* Impostazioni per il layout fisso 1080x1920 */
  width: 1080px;
  height: 1920px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centra i figli orizzontalmente se più stretti di 1080px */
  margin: auto; /* Centra il blocco 1080x1920 nella finestra del browser (utile per test) */
   overflow: hidden; 

  background-image: url(../img/bg.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* NUOVO: Stili per l'Header */
#page-header {
  width: 100%; /* Prende tutta la larghezza del body (1080px) */
  height: 150px;
  background-color: #FF585D; /* Esempio di colore di sfondo, cambialo come preferisci */
  background-image: url(../img/header.png);
  background-repeat: no-repeat;
	background-position: center;
  background-size: 50%;
  color: white; /* Esempio di colore testo */
  display: flex; /* Per allineare gli elementi interni all'header (es. logo) */
  align-items: center;
  /* justify-content: space-between; /* Se vuoi elementi a sx e dx */
  padding: 0 20px; /* Padding interno all'header */
  flex-shrink: 0; /* Impedisce all'header di restringersi */
}

  /* Modifica per #logoButton se lo sposti nell'header */
  #page-header #logoButton {
    position: static; /* Rimuove il position:fixed se era così */
    /* width: auto; /* Adatta la larghezza se necessario */
    /* height: 80%; /* Esempio: adatta l'altezza del logo all'header */
    /* max-height: 100px; /* Limita l'altezza del logo */
    margin-right: auto; /* Spinge altri elementi a destra, se ce ne sono */
  }
  #page-header #logoButton img {
    max-height: 100%; /* Assicura che l'immagine stia nell'altezza del bottone */
    width: auto; /* Mantiene le proporzioni */
    /* Se avevi width: 350px per il logo, potresti doverlo aggiustare */
  }


/* Stili per .main (modificati) */
.video-area {
  display: flex;
  flex-direction: column;
  /* gap: 24px; -- rimosso se non serve più specificamente qui, body gestisce spazi */
  /* background-image: url(../img/bg-verticale.jpg) !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat; */

  /* margin: 0; -- non più margin:auto */
  padding: 0;
  overflow: hidden;
  /* margin:auto; -- RIMOSSO */
  width: 1080px;
  height: 1080px;
  backdrop-filter: blur(1px);
  position: relative; /* Mantenuto per posizionamento assoluto interno */
  flex-shrink: 0; /* Impedisce al main di restringersi */
}

.main-area {
  /* background: linear-gradient(120deg, #ffe0ec 0%, #e3f0ff 100%); */
  width: 1080px;
  height: 640px;
  /* background: #000; */
  /* margin: 20px auto; */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

#page-footer {
  width: 100%; /* Prende tutta la larghezza del body (1080px) */
  height: 200px; /* Altezza precedentemente di #spazio-rimanente */
  flex-shrink: 0; /* Impedisce al footer di restringersi */
  display: flex; /* Per disporre i pulsanti */
  justify-content: center; /* Centra i pulsanti orizzontalmente */
  align-items: center; /* Centra i pulsanti verticalmente */
  gap: 20px; /* Spazio tra i pulsanti */
  box-sizing: border-box; /* Assicura che padding non aumenti le dimensioni */
  background-image: url(img/footer.png);
}

    /* Stili di esempio per i pulsanti nel footer */
    /*
    .footer-button {
      padding: 15px 30px;
      font-size: 18px;
      color: white;
      background-color: #007bff;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }

    .footer-button:hover {
      background-color: #0056b3;
    }
    */

/*
  ASSICURATI CHE GLI ELEMENTI CON position:fixed o position:absolute
  SIANO POSIZIONATI CORRETTAMENTE RISPETTO ALLA NUOVA STRUTTURA.
  Ad esempio, #logoButton se non è nell'header:
*/
/* Se #logoButton NON è nell'header ma nel .main o globale: */
/*
#logoButton {
    position: fixed; // o absolute se relativo a .main
    top: 160px; // Esempio: 150px (header) + 10px (margine)
    right: 10px;
    border: none;
    background-color: transparent;
    width: 350px;
    height: 55px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 888;
}
 #logoButton img {
  width: 350px;
 }
*/

/* IL RESTO DEL TUO CSS ESISTENTE */
/* ... (incolla qui il resto del tuo CSS originale) ... */

.actionRowsWrap {
  display: none; /* MOD */
/*  display: flex;*/
  position: absolute;
  left: 10px;
  bottom: 10px;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.actionRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.actionRow label {
  display: flex;
  align-items: center;
  gap: 8px;
}

button {
  display: inline-block;
/*  padding: 0 16px;*/
/*  border-radius: 8px;*/
  height: 40px;

/*  background-color: #0018a8; */
  border: none;
  background-color: transparent;
  color: #fff;
  text-align: center;
  font-size: 16px;

  cursor: pointer;
  transition-duration: 0.4s;
}

button:hover {
/*  background-color: #0018a8;*/
}

input {
/*  height: 40px;*/
/*  padding: 0 12px;*/
/*  font-size: 16px;*/
}

#repeatBtn {
  position: absolute;
  right: 0;
  top: 500px;
  width: 100px;
  height: 100px;
  background-color: #0ff;
}


#status {
  overflow: auto;

  background-color: #fff;
  padding: 10px 12px;

  border: 1px solid #ccc;
  border-radius: 8px;

  font-size: 14px;
  line-height: 1.6;

  z-index: 999;
  position: absolute;
  width: 520px;
  height: 300px;
  top: 0;
  right: 0;

}

.videoSectionWrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: normal;
  gap: 12px;
  height: 1080px; /* Potrebbe essere 100% del .main ora */
  width: 100%;
}

.actionRow.switchRow {
  width: 100%;

  justify-content: center;
}
.switchRow {
  flex-direction: column;
}
.switchRow > label {
  width: 100%;

  display: flex;
  justify-content: center;
}

.switchRow > label input {
  flex: 1;
  max-width: 500%; /* Questo sembra molto grande, verifica se è corretto */
}

.videoSectionWrap .videoWrap {
  display: flex;
/*  justify-content: center;*/
  align-items: center;
  height: 100%; /* Altezza relativa al contenitore .videoSectionWrap */
  clip-path: inset(20px round 50px);
	overflow: hidden;
}

.videoWrap .videoEle {
/*  width: 46%;*/
  /* width: 100%; */
  height: 100%; /* Altezza relativa al contenitore .videoWrap */
}

/*---------- Switch START ----------*/
.switchWrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: '';
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
/*---------- Switch END ----------*/

.videoSectionWrap .hide {
  display: none;
}

.videoSectionWrap .show {
  display: flex;
/*  margin-top: 500px;*/
  margin: auto auto 0 -440px; /* Verifica questo posizionamento, potrebbe cambiare */
}

.hide {
  display: none;
}
.show {
  display: flex;
}


.visuals-container {
    display: none;
    flex-direction: column;
    border-radius: 15px;
    width: 450px;
    max-height: calc(100vh - 170px); /* Esempio: 100vh - altezza header - un po' di margine */
    overflow-y: auto;
    position: fixed; /* Rispetto al viewport */
    left: 10px;
    top: 160px; /* Esempio: Sotto l'header */
    /* margin-top: 120px; -- Rimuovi o adatta se usi top */
    /* margin-left: 10px; -- Rimuovi o adatta se usi left */
}

.visuals-container.visible {
    display: flex;
}

.visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.visual img {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* width: 100%; -- duplicato */
  gap: 20px;
}

/* .visual img { -- già definito sopra
    width: 100%;
    height: auto;
} */



.message {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 32px;
  max-width: 600px;
  /* min-width: 180px; */
  border-radius: 16px;
  box-shadow: 0 2px 12px #00000014;
  padding: 0;
  background: none;
  border: none;
  position: relative;
  word-break: break-word;
  font-size: 22px;
}

.message.User {
  background: #007AFF;
  color: #fff;
  margin-left: auto;
  margin-right: 32px;
  justify-content: flex-end;
  border-radius: 16px;
  box-shadow: 0 2px 12px #007AFF22;
  padding: 18px 28px 18px 28px;
  position: relative;
}
.message.User::after {
  content: '';
  position: absolute;
  right: -16px;
  top: 18px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 16px solid #007AFF;
}

.message.Assistant {
  background: #fff;
  color: #222;
  margin-right: auto;
  margin-left: 32px;
  justify-content: flex-start;
  border-radius: 16px;
  box-shadow: 0 4px 24px #00000018;
  padding: 20px 30px 20px 30px;
  position: relative;
}

.message.Assistant::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 18px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 16px solid #fff;
}

.message.Assistant .avatar {
	position: absolute;
	left: -70px;
	top: 0px;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 2px 8px #0001;
	border: 2px solid #fff;
}

.message.Assistant .name {
  display: block;
  color: #007AFF;
  font-weight: bold;
  margin-bottom: 4px;
  font-size: 22px;
}

.message.Assistant .text {
  display: block;
  margin-left: 0;
}

/* Rimuovo titolo conversazione */
#conversationHistory-title-box {
  display: none;
}

/* Stile per il pulsante della chat */
#toggleChatButton {
    position: fixed;
    bottom: 10px; /* Relativo al viewport */
    right: 10px; /* Relativo al viewport */
    width: 100px;
    height: 119px;
    cursor: pointer;
    display: none; /* Era display: none; */
    align-items: center;
    justify-content: center;
    z-index: 888;
}

#toggleChatButton img {
    width: 100px;
    height: 119px;
}

.conversation-history {
  /* border-radius: 24px; */
  /* box-shadow: 0 4px 32px #00000018; */
  width: 1000px;
  height: 600px;
  /* max-width: 90vw; */
  /* max-height: 90vh; */
  padding: 40px;
  position: relative;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
}
  .conversation-history.visible {
      display: block;
  }

/** MOD **/
/* #startBtnFull e #startVideoFull sono a schermo intero, quindi le loro dimensioni
   relative al viewport (vw/vh) o al body (100%) sono OK.
   Se diventano figli di .main, allora width/height: 100% si riferirà a .main.
   Presumo siano overlay a schermo intero. */
#startBtnFull { /* Se questo è un overlay iniziale a schermo intero */
  position: fixed; /* O absolute se deve coprire solo il body 1080x1920 */
  top: 0;
  left: 0;
  width: 100vw; /* o 1080px se deve stare dentro il body */
  height: 100vh; /* o 1920px se deve stare dentro il body */
  z-index: 889;
  background-position: center center;
  background-repeat: no-repeat;
}
  #startVideoFull {
    position: fixed; /* O absolute se deve coprire solo il body 1080x1920 */
    top: 0;
    left: 0;
    width: 1080px; /* o 1080px */
    height: 1080px; /* o 1920px */
    z-index: 666;
    background-position: center center;
    background-repeat: no-repeat;
  }
  #backgroundVideo {
    position: absolute; /* Questo è figlio di #startVideoFull, quindi ok */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Adatta il video per coprire */
    clip-path: inset(20px round 50px);
    overflow: hidden;
    padding: 20px;
    /* top: 50%; left: 50%; transform: translate(-50%, -50%); non necessario con object-fit e w/h 100% */
}
#loading-avatar {
  display: none;
  position: fixed; /* O absolute per coprire il body */
  top: 0;
  left: 0;
  width: 100vw; /* o 1080px */
  height: 100vh; /* o 1920px */
  z-index: 889;
  background-image: url(../img/loading-avatar.webp);
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #000;
  opacity: .8;
}

#stop-refresh {
  cursor: pointer;
  background-image: url(../img/end-session.png);
  background-size: contain;
  background-position: right;
  background-repeat: no-repeat;
  width: 100px;
  height: 119px;
  position: fixed; /* Relativo al viewport */
  /* Se vuoi posizionarlo nell'header: */
  /* top: calc((150px - 119px) / 2); /* Centrato verticalmente nell'header */
  /* left: 20px; /* All'interno del padding dell'header */
  top: 10px; /* Adatta se necessario */
  left: 10px;
  z-index: 999;
  display: none;
}
#voice-input {
  position: fixed; /* O absolute se relativo a .main */
  bottom: 55px; /* Relativo al viewport o a .main se position:absolute e .main è relative */
  left: 50%;
  transform: translateX(-50%); /* Per centrare orizzontalmente */
  width: 1080px; /* O una larghezza minore se deve essere più stretto */
  display: none; /* Inizialmente nascosto - apparirà solo dopo il caricamento di HeyGen o in modalità test */
  align-items: center;
  /* justify-items: center; non è una prop valida, usa justify-content */
  text-align: center;
  justify-content: center;
  z-index: 889;
}
  #startVoiceBtn {
    cursor: pointer;
    z-index: 889;
  }
  #taskInput {
    
    height: 78px;
    border: 1px solid #BBBBBB;
    border-radius: 0 40px 40px 0;
    /* margin-bottom: 25px; */
    padding-left: 50px;
    padding-right: 70px;
    width: 710px;
    font-size: 30px;
    color: #4B4B4B;
    background: #fff url(img/keyboard-mini.png) 96% center no-repeat;
    background-size: 7%;
    white-space: nowrap;
    overflow: hidden;
    margin-left: -90px;
  }
  #taskInput::placeholder {
    opacity: 0.6;
    text-align: left;
    font-size: 30px;
  }
  #talkBtn {
    height: 119px;
    padding: 0;
    margin: 0 12px;
  }
  #button-share {
    width: 78px;
    height: 78px;
    background-image: url(../img/share-icon.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    left: 870px;
  }
  #button-options {
    width: 78px;
    height: 78px;
    background-image: url(../img/button-options.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    left: 960px;
  }

#backButton {
    position: fixed; /* Relativo al viewport */
    bottom: 10px;
    /* left: -30px; -- Potrebbe uscire dallo schermo, valuta */
    left: 20px; /* Esempio */
    border: none;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
  #backButton img {
    width: 60%; /* Potrebbe essere necessario un valore fisso (es. 150px) */
  }

#actionBtn_box {
  text-align: center;
  width: 122px;
  height: 122px;
  position: absolute;
  left: 40px;
}
#actionBtn {
  height: 122px;
}

.suggestions-area {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin-top: 30px;
  
}
  .suggestions-area h1 {
    margin-bottom: 30px;
    color: #000;
  }
  .show-suggestions .suggestions-area {
    display: flex;
  }
  #suggestions-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .suggestion-button {
    /* width: 633px;
    height: 91px;
    position: relative;
    background-color: #007aff;
    border-radius: 30px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    font-weight: bold;
    font-size: 22px; */
    width: 630px;
    height: 110px;
    background-color: #007AFF; /* Blu tipico di iOS */
    color: white;
    border: none;
    border-radius: 25px; /* Angoli molto arrotondati */
    padding: 15px 20px;
    font-weight: bold;
    font-size: 30px;
    text-align: left;
    cursor: pointer;
    
    /* Layout interno (icona + testo) */
    display: flex;
    align-items: center;
  }
  .suggestion-icon {
    margin-right: 12px;
    display: flex; /* Utile per centrare l'SVG se necessario */
    align-items: center;
  }
  .suggestion-icon svg {
    width: 50px;
    height: 50px;
    fill: white;
  }
  
/** POPUP PRESENZA **/
.popup {
  position: fixed; /* Relativo al viewport, ok */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.hidden {
  display: none;
}

.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
}
.popup-content p {
  margin: 10px 0;
}

.popup-button {
  border: none;
  padding: 10px 20px;
  margin: 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 24px;
  color: #000;
}
  #popup-yes {
    background-color: #000;
    color: #fff;
    float: left;
  }
  #popup-no {
    float: right;
    color: #000;
  }

#simulate-presence {
  position: fixed; /* Relativo al viewport */
  /* Se vuoi posizionarlo nell'header: */
  /* top: calc((150px - 40px) / 2); /* Centrato verticalmente nell'header */
  /* left: 150px; /* Esempio: dopo il logo o #stop-refresh */
  top: 35px;
  left: 0; /* Valuta se è la posizione corretta */
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 888;
	width: 320px;
	height: 80px;
	letter-spacing: 1px;
	background-color: rgba(255, 255, 255, 1);
	color: #3f3f3f;
	font-weight: bold;
	font-size: 28px;
}

/** TEST SPONSORED */
.sponsored-popup {
    display: none;
    position: fixed; /* Relativo al viewport */
    top: 180px; /* Esempio: Sotto l'header + un po' di spazio */
    left: 20px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    text-align: left;
    z-index: 1000;
    width: 280px;
    font-size: 14px;
    /* align-items: center; -- Rimosso, il contenuto interno gestirà l'allineamento */
}
  .sponsored-popup #sponsored-popup-title {
    font-size: 30px; /* Sembra grande per un popup da 280px, verifica */
  }

.sponsored-popup img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    border-radius: 5px;
    float: left; /* Per far sì che il testo scorra a destra */
}

.sponsored-popup .sponsored-popup-content {
    /* flex-grow: 1; -- non necessario se non usi flex qui */
    overflow: hidden; /* Per contenere il float */
}
  .sponsored-popup .sponsored-popup-content strong,
  .sponsored-popup .sponsored-popup-content a {
    display: block; /* Per farli andare a capo bene */
  }


.sponsored-popup button { /* Pulsante chiusura */
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    /* margin-left: 10px; -- non necessario se posizionato con position absolute */
    position: absolute;
    top: 5px;
    right: 10px;
}

/* Overlay trasparente per click fuori */
.sponsored-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.0);
    z-index: 999;
}

/* Scrollbar moderna */
.conversation-history::-webkit-scrollbar {
  width: 24px;
}
.conversation-history::-webkit-scrollbar-thumb {
  background: #666;
  border-radius: 12px;
}
.conversation-history::-webkit-scrollbar-track {
  background: transparent;
}

/* === MENU OPZIONI POPUP === */
.options-menu {
  position: absolute;
  left: 780px;
  bottom: 90px;
  width: 270px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px #0002;
  border: 2px solid #222;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  font-size: 20px;
  transition: opacity 0.2s;
}
.options-menu.hidden {
  display: none;
}
.option-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  width: 100%;
  padding: 14px 18px;
  font-size: 20px;
  color: #222;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid #ddd;
  transition: background 0.15s;
}
.option-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.option-item:last-child {
  border-bottom: none;
}
.option-item:hover .option-label {
  color: #007aff;
}
.option-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.option-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.option-item.reload .option-label {
  color: #d00;
  font-weight: bold;
}

/* === STILI PER MAIN-IDLE CON EFFETTO COMPARSA PULSANTI === */
.main-idle {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin-top: 30px;
}

.chat-title {
  margin-bottom: 30px;
  color: #000;
  font-size: 24px;
  font-weight: 500;
}

.button-options {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.chat-button {
  width: 630px;
  height: 110px;
  background-color: #007AFF;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 15px 20px;
  font-weight: bold;
  font-size: 30px;
  text-align: left;
  cursor: default;
  
  /* Layout interno (icona + testo) */
  display: flex;
  align-items: center;
  
  /* Animazione di comparsa */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.chat-button.visible {
  opacity: 1;
  transform: translateY(0);
}

.icon {
  margin-right: 12px;
  display: flex;
  align-items: center;
}

.icon svg {
  width: 50px;
  height: 50px;
  fill: white;
}

/* === INDICATORE MODALITÀ TEST === */
#test-mode-indicator {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 20px 30px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  text-align: center;
  font-family: Arial, sans-serif;
  z-index: 1000;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.test-mode-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.test-mode-icon {
  font-size: 32px;
  margin-bottom: 5px;
}

.test-mode-text {
  font-size: 24px;
  line-height: 1.4;
}

/* Stili per il popup di attesa assistente */
#waiting-assistant-popup {
  z-index: 1000;
}

#waiting-assistant-popup .popup-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

#waiting-assistant-popup h2 {
  color: white;
  margin-bottom: 10px;
  font-size: 28px;
}

#waiting-assistant-popup p {
  color: rgba(255,255,255,0.9) !important;
  line-height: 1.5;
}

/* Animazione dei punti di caricamento */
.loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.loading-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.8);
  animation: loadingDots 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes loadingDots {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Stili per l'icona di attesa */
.waiting-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}