/* Pulsanti fissi (assistente e WhatsApp) e pannello dell'assistente, nella variante C. */
.tm-dock {
  position: fixed; z-index: 9990;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px;
}
.tm-dock__chat {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px;
  border: 1px solid var(--tm-champagne); border-radius: 0; cursor: pointer;
  background: var(--tm-blu); color: var(--tm-beige);
  font: 500 0.74rem/1 var(--tm-font-testo); letter-spacing: 0.16em; text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(10, 25, 45, 0.28);
}
.tm-dock__chat:hover, .tm-dock__chat[aria-expanded="true"] { background: var(--tm-blu-2); color: var(--tm-beige); }
.tm-dock__wa {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: #0F7A3F; color: #fff; box-shadow: 0 10px 28px rgba(10, 25, 45, 0.28);
}
.tm-dock__wa:hover { background: #0B6634; color: #fff; }
@media (max-width: 600px) {
  .tm-dock__label { display: none; }
  .tm-dock__chat { width: 52px; padding: 0; justify-content: center; }
}

.tm-assistant {
  position: fixed; z-index: 9995;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  width: 360px; max-height: min(560px, calc(100dvh - 140px));
  display: flex; flex-direction: column;
  background: var(--tm-superficie); color: var(--tm-testo);
  border: 1px solid var(--tm-linea); overflow: hidden; box-shadow: 0 24px 60px rgba(10, 25, 45, 0.3);
}
.tm-assistant[hidden] { display: none; }
.tm-assistant__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 16px 16px 14px 18px; background: var(--tm-blu-scuro); color: var(--tm-beige);
  border-bottom: 1px solid var(--tm-champagne);
}
.tm-assistant__head strong { display: block; font-family: var(--tm-font-titoli); font-weight: 400; font-size: 1.3rem; }
.tm-assistant__head span { display: block; font-size: 0.8rem; color: rgba(246, 241, 233, 0.74); margin-top: 2px; }
.tm-assistant__close { background: none !important; border: 0; color: inherit !important; font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 0 4px; min-height: 0; }
.tm-assistant__body { padding: 16px; overflow-y: auto; display: grid; gap: 12px; align-content: start; }
.tm-bubble { background: var(--tm-beige); padding: 12px 14px; font-size: 0.93rem; margin: 0; border-left: 1px solid var(--tm-champagne); }
.tm-crumb { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tm-bronzo-testo); margin: 0; }
.tm-choices { display: grid; gap: 8px; }
.tm-assistant .tm-choice {
  display: block; width: 100%; text-align: left; padding: 11px 14px; min-height: 0;
  border: 1px solid var(--tm-linea); border-radius: 0; background: var(--tm-superficie); color: var(--tm-testo);
  font: 500 0.9rem/1.3 var(--tm-font-testo); letter-spacing: 0; text-transform: none; text-decoration: none; cursor: pointer;
}
.tm-assistant .tm-choice:hover { border-color: var(--tm-blu-2); }
.tm-assistant .tm-choice--primary { background: var(--tm-blu); border-color: var(--tm-blu); color: var(--tm-beige); }
.tm-assistant .tm-choice--primary:hover { background: var(--tm-blu-2); color: var(--tm-beige); }
.tm-assistant .tm-choice--wa { background: #0F7A3F; border-color: #0F7A3F; color: #fff; }
.tm-assistant .tm-choice--back { border-style: dashed; color: var(--tm-testo-2); }
@media (max-width: 600px) {
  .tm-assistant {
    left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
    width: auto; bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}
