﻿/*
==================================================
SEZIONE: STILI GENERALI
==================================================
*/
#ninjaibot-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99989;
  cursor: pointer;
}

.ninjaibot-fab-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ninjaibot-fab-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 64px;
}

.ninjaibot-fab-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.ninjaibot-fab-bubble-current {
  position: relative;
  width: 64px;
  height: 64px;
  background: inherit;
  box-shadow: 3px 3px 8px black;
  overflow: hidden;
}

.ninjaibot-fab-bubble-prev,
.ninjaibot-fab-bubble-next,
.ninjaibot-fab-switch {
  display: none;
}

#ninjaibot-fab-icon {
  width: 50px !important;
  height: 50px !important;
}

#ninjaibot-fab.fab-mode-multi {
  background: transparent !important;
  box-shadow: none !important;
}
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-shell {
  position: relative;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-track {
  position: relative;
  min-width: 98px;
  min-height: 58px;
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-current {
  position: relative;
  z-index: 3;
  width: 58px;
  height: 58px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-prev,
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-next {
  display: inline-flex;
  width: 40px;
  height: 40px;
  position: absolute;
  top: 50%;
  margin-top: -20px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
  overflow: hidden;
  z-index: 1;
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-prev.is-visible,
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-next.is-visible {
  opacity: 0.96;
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-prev {
  left: 6px;
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-next {
  right: 6px;
}
.ninjaibot-fab-bubble-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.96);
  color: #3b82f6;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.98;
  pointer-events: auto;
  position: absolute;
  bottom: -2px;
  z-index: 4;
  border-radius: 4px;
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-switch-prev {
  left: 2px;
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-switch-next {
  right: 2px;
}
/* FAB switcher — direction-aware enter animations */
@keyframes ninjaibotEnterFromRight {
  0%   { opacity: 0; transform: translateX(18px) scale(0.78); }
  65%  { opacity: 1; transform: translateX(-2px) scale(1.04); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes ninjaibotEnterFromLeft {
  0%   { opacity: 0; transform: translateX(-18px) scale(0.78); }
  65%  { opacity: 1; transform: translateX(2px) scale(1.04); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes ninjaibotBubblePop {
  0%   { opacity: 0; transform: translateY(0) scale(0.7); }
  100% { opacity: 0.96; transform: translateY(0) scale(1); }
}
#ninjaibot-fab.is-switching-next .ninjaibot-fab-bubble-current {
  animation: ninjaibotEnterFromRight 0.27s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
#ninjaibot-fab.is-switching-next .ninjaibot-fab-bubble-prev,
#ninjaibot-fab.is-switching-next .ninjaibot-fab-bubble-next {
  animation: ninjaibotBubblePop 0.22s ease both;
}
#ninjaibot-fab.is-switching-prev .ninjaibot-fab-bubble-current {
  animation: ninjaibotEnterFromLeft 0.27s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
#ninjaibot-fab.is-switching-prev .ninjaibot-fab-bubble-prev,
#ninjaibot-fab.is-switching-prev .ninjaibot-fab-bubble-next {
  animation: ninjaibotBubblePop 0.22s ease both;
}
/* Switcher role label — inside-overlay at the bottom of each bubble */
#ninjaibot-fab .ninjaibot-fab-role-label {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 5px;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 3px;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46px;
  pointer-events: none;
  z-index: 10;
}
/* Current bubble: always visible */
#ninjaibot-fab .ninjaibot-fab-bubble-current .ninjaibot-fab-role-label {
  opacity: 1;
}
/* Prev/next: hidden by default, revealed on hover/focus */
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-prev .ninjaibot-fab-role-label,
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-next .ninjaibot-fab-role-label {
  opacity: 0;
  transition: opacity 0.18s ease;
  font-size: 7px;
}
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-prev:hover .ninjaibot-fab-role-label,
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-prev:focus .ninjaibot-fab-role-label,
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-next:hover .ninjaibot-fab-role-label,
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-next:focus .ninjaibot-fab-role-label {
  opacity: 1;
}
/* Modal */
#ninjaibot-modal {
  right: 20px;
  bottom: 20px;
  width: min(400px, calc(100vw - 24px));
  height: 72vh;
  position: fixed;
  border: 1px solid #ccc;
  background-color: #fff;
  border-radius: 10px;
  z-index: 99990;
  display: none;
  flex-direction: column;
  transition: opacity 0.3s ease;
  box-shadow: 5px 5px 5px rgba(204, 204, 204, 0.4);
}
#ninjaibot-modal.show {
  opacity: 1;
}
#ninjaibot-modal.hide {
  opacity: 0;
}
#ninjaibot-modal.with-avatar {
  margin-left: 210px; /* Sposta il modal a destra per far spazio all'avatar */
}
#ninjaibot-side-avatar {
  position: absolute;
  bottom: 0;
  left: -210px;
  width: 200px;
  height: 350px;
}
#ninjaibot-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: #fff;
  border-radius: 10px 10px 0 0;
}
#ninjaibot-footer {
  border-radius: 0 0 10px 10px;
  text-align: center;
  padding: 8px;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
}
#ninjaibot-footer p {
  margin: 0;
  font-size: 11px;
  color: #777;
}
#ninjaibot-footer .ninjaibot-footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
#ninjaibot-footer .ninjaibot-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#ninjaibot-footer a {
  color: inherit;
  text-decoration: none;
}
#ninjaibot-footer .ninjaibot-footer-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
#ninjaibot-footer a:hover {
  text-decoration: none;
}
#ninjaibot-footer .ninjaibot-footer-link:hover {
  color: inherit;
}
#ninjaibot-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99992;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-sizing: border-box;
}
#ninjaibot-dialog-backdrop.is-visible {
  display: flex;
}
#ninjaibot-dialog {
  width: min(320px, calc(100vw - 40px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 18px;
  color: #0f172a;
}
#ninjaibot-dialog-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}
#ninjaibot-dialog-message {
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
}
#ninjaibot-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
#ninjaibot-dialog-actions button {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
#ninjaibot-dialog-cancel {
  background: #fff;
  color: #334155;
}
#ninjaibot-dialog-cancel:hover {
  background: #f8fafc;
}
#ninjaibot-dialog-confirm {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}
#ninjaibot-dialog-confirm:hover {
  background: #005f8d;
  border-color: #005f8d;
}
#ninjaibot-topbar-icon {
  width: 32px;
  height: 32px;
  margin-right: 0;
  display: block;
  flex: 0 0 32px;
  align-self: center;
  object-fit: contain;
}
#ninjaibot-title {
  flex-grow: 1;
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  min-height: 32px;
  display: flex;
  align-items: center;
}
#ninjaibot-close {
  cursor: pointer;
  font-size: 22px !important;
  margin-left: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#ninjaibot-close:hover {
  background: rgba(255,255,255,0.2);
}

#ninjaibot-reset {
  margin-left: auto;
  margin-right: 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  line-height: 1;
  cursor: pointer;
  font-size: 16px!important;
  padding: 0;
	display: flex;
  align-items: center;
  justify-content: center;
}
#ninjaibot-reset:hover {
  background: rgba(255, 255, 255, 0.2);
}
#ninjaibot-body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 50px); /* Altezza totale meno l'header */
}
#ninjaibot-chat-window {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
}
/* Send Button con SVG NinjaiBot ***** */
#ninjaibot-send-button {
  background: none;
  border: none; /* rimuove i bordi interni */
  outline: none;
  padding: 10px 20px;
  margin: 0;
  cursor: pointer;
  font-size: 16px;
}
#ninjaibot-send-button img {
  width: 31px; /* Regola la dimensione */
  height: 28px;
  transition: opacity 0.3s;
}
/* Effetto hover */
#ninjaibot-send-button:hover img {
  opacity: 0.8; /* Modifica l'opacita dell'icona */
}
/* Stato disabilitato */
#ninjaibot-send-button[disabled] {
  cursor: not-allowed;
}
#ninjaibot-send-button[disabled] img {
  opacity: 0.5; /* Opacita ridotta quando il bottone e disabilitato */
}
/* Facoltativo: Stile per il focus */
#ninjaibot-send-button:focus {
  outline: none;
}
#ninjaibot-send-button:focus-visible,
#ninjaibot-close:focus-visible,
#ninjaibot-reset:focus-visible,
#ninjaibot-fab:focus-visible {
  outline: 2px solid rgba(0, 115, 170, 0.55);
  outline-offset: 2px;
}
/*
==================================================
SEZIONE: Stili per il layout mobile
==================================================
*/
@media screen and (max-width: 768px) {
  #ninjaibot-side-avatar {
    display: none;
  }

  #ninjaibot-modal,
  #ninjaibot-modal.with-avatar,
  #ninjaibot-modal.mobile-fullscreen {
    left: 0 !important;
    right: 0 !important;
    bottom: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100%;
    border-radius: 0;
    transform: none !important;
    box-sizing: border-box;
  }
}
/*
==================================================
SEZIONE: ANIMAZIONI ICONA FLUTTUANTE (FAB - BUBBLE)
==================================================
*/
/* FAB Animazione continua */
#ninjaibot-fab.fab-animated.fab-animation-continuous {
  animation: pulse 2s infinite;
}
/* FAB Animazione intermittente */
#ninjaibot-fab.fab-animated.fab-animation-intermittent {
  animation: pulse 2s infinite;
  animation-delay: 3s;
  animation-iteration-count: infinite;
  animation-direction: normal;
  animation-fill-mode: forwards;
}
/* FAB Animazione di movimento */
#ninjaibot-fab.fab-animated.fab-animation-move {
  animation: move 2s infinite;
}
/* FAB Animazione bounce */
#ninjaibot-fab.fab-animated.fab-animation-bounce {
  animation: fabBounce 1.5s infinite;
}
/* FAB Animazione heartbeat */
#ninjaibot-fab.fab-animated.fab-animation-heartbeat {
  animation: fabHeartbeat 1.8s infinite;
}
/* FAB Animazione wobble */
#ninjaibot-fab.fab-animated.fab-animation-wobble {
  animation: fabWobble 2s infinite;
}
/* FAB Animazione swing */
#ninjaibot-fab.fab-animated.fab-animation-swing {
  transform-origin: top center;
  animation: fabSwing 2s infinite;
}
/* FAB Animazione flash */
#ninjaibot-fab.fab-animated.fab-animation-flash {
  animation: fabFlash 3s infinite;
}
/* FAB Animazione tada */
#ninjaibot-fab.fab-animated.fab-animation-tada {
  animation: fabTada 2s infinite;
}
/* FAB Definizione delle animazioni */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  }
  20% {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  }
  40% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  }
}
@keyframes intermittentPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  }
  20% {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  }
  40% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  }
}

@keyframes move {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes fabBounce {
  0%, 100% { transform: translateY(0); }
  40%       { transform: translateY(-10px); }
  60%       { transform: translateY(-5px); }
}
@keyframes fabHeartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.1); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.15); }
  70%       { transform: scale(1); }
}
@keyframes fabWobble {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-8deg); }
  40%       { transform: rotate(8deg); }
  60%       { transform: rotate(-5deg); }
  80%       { transform: rotate(5deg); }
}
@keyframes fabSwing {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(10deg); }
  75%       { transform: rotate(-10deg); }
}
@keyframes fabFlash {
  0%, 50%, 100% { opacity: 1; }
  25%, 75%       { opacity: 0.3; }
}
@keyframes fabTada {
  0%                  { transform: scale(1) rotate(0deg); }
  10%, 20%            { transform: scale(0.95) rotate(-5deg); }
  30%, 50%, 70%, 90%  { transform: scale(1.1) rotate(5deg); }
  40%, 60%, 80%       { transform: scale(1.1) rotate(-5deg); }
  100%                { transform: scale(1) rotate(0deg); }
}
/*
==================================================
SEZIONE: Messaggi della chat
==================================================
*/

#ninjaibot-chat-input {
  display: flex;
  margin: 10px;
  border: 1px solid #ccc; /* bordo grigio scuro */
  border-radius: 14px; /* angoli arrotondati */
}
#ninjaibot-user-input {
  flex-grow: 1;
  padding: 10px;
  font-size: 16px;
  border: none; /* rimuove i bordi interni */
  outline: none; /* rimuove il bordo di focus */
  padding: 10px;
  flex: 1;
  border-radius: 14px; /* angoli arrotondati */
}
/* Messaggi della chat */
.ninjaibot-chat-message {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}
.ninjaibot-message-header {
  display: flex;
  align-items: center;
}
.ninjaibot-message-header .ninjaibot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.ninjaibot-message-header .ninjaibot-message-name {
  font-weight: bold;
  margin-left: 10px;
}
.ninjaibot-user-message .ninjaibot-message-header {
  justify-content: flex-end;
}
.ninjaibot-user-message .ninjaibot-message-header .ninjaibot-message-name {
  order: 1;
  margin-left: 0;
  margin-right: 10px;
}
.ninjaibot-user-message .ninjaibot-message-header .ninjaibot-avatar {
  order: 2;
}
.ninjaibot-bot-message .ninjaibot-message-header {
  justify-content: flex-start;
}
.ninjaibot-bot-message .ninjaibot-message-header .ninjaibot-message-name {
  margin-left: 10px;
}

.ninjaibot-chat-message .ninjaibot-message-content > :first-child {
  margin-top: 0;
}

.ninjaibot-chat-message .ninjaibot-message-content > :last-child {
  margin-bottom: 0;
}
.ninjaibot-bot-message ul,
.ninjaibot-bot-message ol {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.ninjaibot-bot-message li, .ninjaibot-chat-message .ninjaibot-message-content, .ninjaibot-content-block {
  margin-top: 5px;
  padding: 10px;
  border-radius: 10px;
  max-width: 90%;
  overflow-wrap: anywhere;
}

.ninjaibot-bot-message li {
  position: relative;
  padding: 8px 10px 8px 30px;
  margin-top: 4px;
  line-height: 1.45;
}

.ninjaibot-bot-message li::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 1.05em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.45;
  transform: translateY(-50%);
}

.ninjaibot-content-block .ninjaibot-bot-message li, .ninjaibot-content-block .ninjaibot-chat-message .ninjaibot-message-content {
  margin-top: 0;
  padding: 0;
  max-width: 100%;
}
.ninjaibot-user-message .ninjaibot-message-content {
  color: #fff;
  align-self: flex-end;
}
.ninjaibot-bot-message .ninjaibot-message-content {
  align-self: flex-start;
}
.ninjaibot-bot-message a {
  text-decoration: underline;
}
/*
==================================================
SEZIONE: GDPR Notice
==================================================
*/
#ninjaibot-gdpr-notice {
  background-color: #fff9c4;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ffe082;
  border-radius: 5px;
}
#ninjaibot-gdpr-notice p {
  margin: 0;
  font-size: 12px;
}
#ninjaibot-gdpr-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
#ninjaibot-gdpr-actions a {
  color: #0073aa;
  text-decoration: none;
}
#ninjaibot-gdpr-consent-button, #ninjaibot-gdpr-decline-button {
  color: #fff;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 3px;
}
#ninjaibot-gdpr-consent-button {
  background-color: #28a745;
}
#ninjaibot-gdpr-consent-button:hover {
  background-color: #218838;
}
#ninjaibot-gdpr-decline-button {
  background-color: #dc3545;
  margin-left: 10px;
}
#ninjaibot-gdpr-decline-button:hover {
  background-color: #c82333;
}
/*
==================================================
SEZIONE: Animazione dei puntini di sospensione
==================================================
*/
.ninjaibot-typing-dots {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 2px;
  background-color: #ccc;
  border-radius: 50%;
  animation: typing 1s infinite;
}
.ninjaibot-writing-bot {
  margin-left: 10px;
}
#ninjaibot-typing-indicator {
  padding: 0 10px 10px;
  box-sizing: border-box;
}
#ninjaibot-typing-indicator .ninjaibot-message-header.ninjaibot-writing-bot {
  margin-left: 0;
}
#ninjaibot-typing-indicator .ninjaibot-message-content.ninjaibot-writing-bot {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 18px;
  width: fit-content;
}
#ninjaibot-typing-indicator .ninjaibot-typing-dots {
  margin: 0;
}
@keyframes typing {
  0% {
    background-color: #ccc;
  }
  50% {
    background-color: #888;
  }
  100% {
    background-color: #ccc;
  }
}
.ninjaibot-typing-dots:nth-child(1) {
  animation-delay: 0s;
}
.ninjaibot-typing-dots:nth-child(2) {
  animation-delay: 0.2s;
}
.ninjaibot-typing-dots:nth-child(3) {
  animation-delay: 0.4s;
}
/*
==================================================
SEZIONE: Barra Quick Questions
==================================================
*/
#ninjaibot-quick-questions-bar {
  background-color: #f1f1f1;
  border-top: 1px solid #ccc;
  cursor: pointer;
}
#ninjaibot-quick-questions-label {
  padding: 10px;
  text-align: center;
  font-weight: bold;
}
#ninjaibot-quick-questions-list {
  display: none;
  max-height: 200px;
  overflow-y: auto;
  background-color: #fff;
  border-top: 1px solid #ccc;
}
#ninjaibot-quick-questions-list .ninjaibot-quick-question {
  padding: 10px;
  border-bottom: 1px solid #eee;
  transition: background-color .18s ease;
}
#ninjaibot-quick-questions-list .ninjaibot-quick-question:hover {
  background-color: #f9f9f9 !important;
  cursor: pointer;
}
/* Stili per il focus */
#ninjaibot-quick-questions-bar:focus {
  outline: 2px solid #005a9c;
}
.ninjaibot-quick-question:focus {
  background-color: #e0e0e0;
  outline: none;
}
/* Nascondi le Quick Questions se l'attributo data-gdpr e attivo */
#ninjaibot-quick-questions-bar[data-gdpr="enabled"] {
  display: none;
}
/*
==================================================
SEZIONE: Content Blocks
==================================================
*/
/* Banner in chat */
.ninjaibot-banner img {
    max-width: 100%;
    height: auto;
  }
/* Responsive Video Content Blocks */
.ninjaibot-youtube,
.ninjaibot-vimeo {
  position: relative;
  /*padding-bottom: 56.25%; /* 16:9 aspect ratio */
  padding-bottom: 78%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 0 auto; 
}

.ninjaibot-youtube iframe,
.ninjaibot-vimeo iframe {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ninjaibot-vimeo iframe {
  top: 0;
}
/* Lead collector form */
.ninjaibot-lead-collector,
.ninjaibot-lead-collect {
  max-width: 100%;
}

.ninjaibot-lead-collector h3,
.ninjaibot-lead-collect h3 {
  margin: 0 0 8px;
  padding: 0;
}

.ninjaibot-lead-collector > p,
.ninjaibot-lead-collect > p {
  margin: 0 0 10px;
  padding: 0;
  max-width: 100%;
}

.ninjaibot-lead-collector form p,
.ninjaibot-lead-collect form p {
  margin: 0 0 8px;
  padding: 0;
  max-width: 100%;
}

.ninjaibot-lead-collector form label,
.ninjaibot-lead-collect form label {
  display: block;
  margin: 0 0 4px;
  font-weight: 600;
}

.ninjaibot-lead-collector form input[type="text"],
.ninjaibot-lead-collector form input[type="email"],
.ninjaibot-lead-collector form input[type="tel"],
.ninjaibot-lead-collect form input[type="text"],
.ninjaibot-lead-collect form input[type="email"],
.ninjaibot-lead-collect form input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 10px;
}

.ninjaibot-lead-collector form br,
.ninjaibot-lead-collect form br {
  display: none;
}

.ninjaibot-lead-collector form p label + input,
.ninjaibot-lead-collect form p label + input {
  margin-top: 4px;
}


.ninjaibot-lead-collector form p.gdpr-row,
.ninjaibot-lead-collect form p.gdpr-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ninjaibot-lead-collector form p.gdpr-row input[type="checkbox"],
.ninjaibot-lead-collect form p.gdpr-row input[type="checkbox"] {
  margin-top: 2px;
}

.ninjaibot-teaser,
.ninjaibot-instance .ninjaibot-teaser {
  position: fixed;
  right: 104px;
  bottom: 28px;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.80);
  color: #222;
  border: 1px solid #d0d7de;
  border-radius: 14px;
  padding: 10px 34px 10px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 99991;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
}

.ninjaibot-instance.has-multi-switcher .ninjaibot-teaser {
  right: 124px;
  bottom: 34px;
}

.ninjaibot-teaser:before,
.ninjaibot-teaser:after,
.ninjaibot-instance .ninjaibot-teaser:before,
.ninjaibot-instance .ninjaibot-teaser:after {
  content: none;
}

.ninjaibot-teaser .ninjaibot-teaser-close,
.ninjaibot-instance .ninjaibot-teaser .ninjaibot-teaser-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  color: #667;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ninjaibot-teaser .ninjaibot-teaser-close:hover,
.ninjaibot-instance .ninjaibot-teaser .ninjaibot-teaser-close:hover {
  color: #222;
}

@media screen and (max-width: 768px) {
  .ninjaibot-teaser,
.ninjaibot-instance .ninjaibot-teaser {
  position: fixed;
  right: 104px;
  bottom: 28px;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.80);
  color: #222;
  border: 1px solid #d0d7de;
  border-radius: 14px;
  padding: 10px 34px 10px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 99991;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
}
}
/* Bottone lead form */
.lead-btn-invia,
.ninjaibot-lead-collector form button[type="submit"],
.ninjaibot-lead-collect form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.lead-btn-invia:hover,
.ninjaibot-lead-collector form button[type="submit"]:hover,
.ninjaibot-lead-collect form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  filter: brightness(1.03);
}

.lead-btn-invia:active,
.ninjaibot-lead-collector form button[type="submit"]:active,
.ninjaibot-lead-collect form button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}





/* Lead form UX polish */
.ninjaibot-lead-collector,
.ninjaibot-lead-collect {
  border: 1px solid #e6ebf0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.ninjaibot-lead-collector form input[type="text"],
.ninjaibot-lead-collector form input[type="email"],
.ninjaibot-lead-collector form input[type="tel"],
.ninjaibot-lead-collect form input[type="text"],
.ninjaibot-lead-collect form input[type="email"],
.ninjaibot-lead-collect form input[type="tel"] {
  border: 1px solid #ccd6e0;
  border-radius: 8px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.ninjaibot-lead-collector form input:focus,
.ninjaibot-lead-collect form input:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.14);
  outline: none;
}

.lead-btn-invia,
.ninjaibot-lead-collector form button[type="submit"],
.ninjaibot-lead-collect form button[type="submit"] {
  border-radius: 999px;
}

.lead-btn-invia[disabled],
.ninjaibot-lead-collector form button[type="submit"][disabled],
.ninjaibot-lead-collect form button[type="submit"][disabled] {
  opacity: 0.75;
  cursor: wait;
}

.ninjaibot-lead-collector .thankyou,
.ninjaibot-lead-collect .thankyou {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbe7d6;
  background: #f1fbf5;
  color: #1f6b3b;
  font-weight: 600;
}

.ninjaibot-lead-collector .gdpr-row a,
.ninjaibot-lead-collect .gdpr-row a {
  text-decoration: underline;
}

.ninjaibot-lead-feedback {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
}

.ninjaibot-lead-feedback.error {
  border: 1px solid #efc9c9;
  background: #fff4f4;
  color: #8b2c2c;
}

.ninjaibot-lead-feedback.success {
  border: 1px solid #cbe7d6;
  background: #f1fbf5;
  color: #1f6b3b;
}



.ninjaibot-switcher {
  position: fixed;
  right: 12px;
  bottom: 92px;
  z-index: 99988;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ninjaibot-switcher-track {
  position: relative;
  width: 152px;
  height: 72px;
}
.ninjaibot-switcher-bubble {
  position: absolute;
  top: 50%;
  width: 56px;
  height: 56px;
  margin-top: -28px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #fff;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.ninjaibot-switcher-bubble img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.ninjaibot-switcher-bubble.is-current {
  left: 50%;
  width: 72px;
  height: 72px;
  margin-top: -36px;
  margin-left: -36px;
  z-index: 3;
}
.ninjaibot-switcher-bubble.is-prev {
  left: 6px;
  z-index: 2;
  opacity: 0.9;
}
.ninjaibot-switcher-bubble.is-next {
  right: 6px;
  z-index: 2;
  opacity: 0.9;
}
.ninjaibot-switcher-bubble.is-empty {
  opacity: 0;
  pointer-events: auto;
}
.ninjaibot-switcher-arrow {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #e11d48;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.ninjaibot-switcher-arrow:hover {
  transform: scale(1.08);
}
.ninjaibot-switcher.is-rotating-left .ninjaibot-switcher-bubble,
.ninjaibot-switcher.is-rotating-right .ninjaibot-switcher-bubble {
  transition-duration: 0.18s;
}
@media screen and (max-width: 768px) {
  .ninjaibot-switcher {
    right: 6px;
    bottom: 84px;
    gap: 4px;
  }
  .ninjaibot-switcher-track {
    width: 132px;
    height: 64px;
  }
  .ninjaibot-switcher-bubble {
    width: 48px;
    height: 48px;
    margin-top: -24px;
  }
  .ninjaibot-switcher-bubble.is-current {
    width: 64px;
    height: 64px;
    margin-top: -32px;
    margin-left: -32px;
  }
}

/* FAB polish: circular shell with topbar-colored ring */
#ninjaibot-fab {
  --ninjaibot-fab-accent: #0073aa;
}

#ninjaibot-fab .ninjaibot-fab-bubble {
  border-radius: 999px;
  border: 3px solid var(--ninjaibot-fab-accent);
  background: #ffffff;
  overflow: hidden;
}

#ninjaibot-fab .ninjaibot-fab-bubble-current {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

#ninjaibot-fab.fab-mode-single .ninjaibot-fab-bubble-current {
  width: 64px;
  height: 64px;
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-current {
  border-width: 3px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.20);
}

#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-prev,
#ninjaibot-fab.fab-mode-multi .ninjaibot-fab-bubble-next {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid var(--ninjaibot-fab-accent);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

#ninjaibot-fab-icon,
#ninjaibot-fab .ninjaibot-fab-bubble-image,
.ninjaibot-switcher-bubble img {
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.ninjaibot-switcher-bubble {
  border: 3px solid var(--ninjaibot-fab-accent, #0073aa);
  background: #ffffff;
}


/*
==================================================
SEZIONE: HUMAN HANDOFF
==================================================
*/
/* Handoff button inside the ninjaibot-quick-questions dropdown */
.ninjaibot-quick-question.ninjaibot-quick-question-handoff {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--ninjaibot-topbar-color, #0073aa);
  font-weight: 600;
  margin-top: 2px;
}

.ninjaibot-quick-question.ninjaibot-quick-question-handoff:hover {
  opacity: 0.8;
}

.ninjaibot-quick-question.ninjaibot-quick-question-handoff.is-requested {
  opacity: 0.45;
  pointer-events: none;
}

.ninjaibot-handoff-icon {
  font-size: 14px;
  line-height: 1;
}

/* Operator message bubbles — same layout as ninjaibot-bot-message, warm accent colour */
.ninjaibot-chat-message.ninjaibot-operator-message .ninjaibot-message-header {
  justify-content: flex-start;
}

.ninjaibot-chat-message.ninjaibot-operator-message .ninjaibot-message-content {
  background-color: #fff3e0;
  align-self: flex-start;
}

/* Guided-flow button bar */
.ninjaibot-flow-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px 4px;
}

.ninjaibot-flow-btn {
  padding: 6px 14px;
  border: 2px solid var(--ninjaibot-primary, #0073aa);
  border-radius: 20px;
  background: transparent;
  color: var(--ninjaibot-primary, #0073aa);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.ninjaibot-flow-btn:hover,
.ninjaibot-flow-btn:focus {
  background: var(--ninjaibot-primary, #0073aa);
  color: #fff;
  outline: none;
}
