/* Bubble */
.do-ai-support-bubble{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #1A2BC3;
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  z-index: 999999;
  user-select: none;
}
.do-ai-support-bubble:focus{ outline: 3px solid rgba(17,17,17,.25); outline-offset: 3px; }
.do-ai-support-bubble__icon{ font-size: 22px; line-height: 1; }

/* Chat window */
.do-ai-support-chat{
  position: fixed;
  right: 18px;
  bottom: 84px;
  width: 340px;
  max-width: calc(100vw - 36px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
  z-index: 999999;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);

  /* FIX layout */
  box-sizing: border-box;
  display: none;
  flex-direction: column;
  font-size: 13px;
}
.do-ai-support-chat.is-open{ display:flex; }

.do-ai-support-chat__header{
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.do-ai-support-chat__headings{
  min-width: 0;
  flex: 1;
}
.do-ai-support-chat__title{ font-weight: 700; font-size: 13px; line-height: 1.35; }
.do-ai-support-chat__subtitle{ font-size: 13px; line-height: 1.35; opacity:.7; margin-top: 2px; }
.do-ai-support-chat__actions{
  display:flex;
  align-items:center;
  gap: 6px;
  flex-shrink: 0;
}
.do-ai-support-chat__iconBtn{
  appearance: none;
  -webkit-appearance: none;
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #111;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding: 0 !important;
  line-height: 1 !important;
  flex: 0 0 28px;
  box-shadow: none !important;
  transition: opacity .18s ease, transform .18s ease;
}
.do-ai-support-chat__iconBtn:hover{
  opacity: .65;
}
.do-ai-support-chat__iconBtn:active{
  transform: translateY(1px);
}
.do-ai-support-chat__iconBtn:focus{
  outline: 2px solid rgba(26,43,195,.24);
  outline-offset: 2px;
}
.do-ai-support-chat__iconGlyph{
  font-size: 14px;
  line-height: 1;
}
.do-ai-support-chat__iconBtn--close{
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  flex: 0 0 32px;
}
.do-ai-support-chat__iconBtn--close .do-ai-support-chat__iconGlyph{
  font-size: 17px;
}

.do-ai-support-chat__messages{
  padding: 12px;
  flex: 1;
  overflow-y: auto;
  display:flex;
  flex-direction:column;
  gap: 10px;
  min-height: 0; /* IMPORTANTISSIMO per flex+scroll */
}
.do-ai-support-chat__messages.is-gated{
  display:none;
}

.do-ai-support-lead{
  display:none;
  padding: 14px;
  flex: 1;
  overflow-y:auto;
  min-height:0;
}
.do-ai-support-lead.is-visible{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.do-ai-support-lead__title{
  font-weight:700;
  font-size:14px;
  line-height:1.35;
}
.do-ai-support-lead__text,
.do-ai-support-lead__field span,
.do-ai-support-lead__consent,
.do-ai-support-lead__error{
  font-size:13px;
  line-height:1.35;
}
.do-ai-support-lead__text{
  opacity:.75;
}
.do-ai-support-lead__field{
  display:flex;
  flex-direction:column;
  gap:5px;
}
.do-ai-support-lead__field.is-hidden{
  display:none;
}
.do-ai-support-lead__input{
  width:100%;
  border:1px solid rgba(0,0,0,.15);
  border-radius:10px;
  padding:9px 10px;
  font-size:13px;
  box-sizing:border-box;
}
.do-ai-support-lead__consent{
  display:flex;
  align-items:flex-start;
  gap:8px;
}
.do-ai-support-lead__consent input{
  margin-top:2px;
  flex:0 0 auto;
}
.do-ai-support-lead__consent a{
  text-decoration:underline;
}
.do-ai-support-lead__error{
  min-height:18px;
  color:#b32d2e;
  font-weight:600;
}
.do-ai-support-lead__submit{
  border:none;
  border-radius:12px;
  background:#1A2BC3;
  color:#fff;
  cursor:pointer;
  font-size:13px;
  padding:10px 12px;
}


/* Bubbles */
.do-ai-support-msg{
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.do-ai-support-msg.user{
  align-self: flex-end;
  background: #111;
  color: #fff;
  border-bottom-right-radius: 6px;
}
.do-ai-support-msg.assistant{
  align-self: flex-start;
  background: rgba(0,0,0,.06);
  color: #111;
  border-bottom-left-radius: 6px;
}

.do-ai-support-blocks{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.do-ai-support-block{
  font-size: 13px;
  line-height: 1.35;
}
.do-ai-support-block__title{
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}
.do-ai-support-block__text,
.do-ai-support-block__list,
.do-ai-support-block__links,
.do-ai-support-block__link{
  font-size: 13px;
  line-height: 1.35;
}
.do-ai-support-block__list{
  margin: 0;
  padding-left: 18px;
}
.do-ai-support-block__links{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.do-ai-support-block__link{
  text-decoration: underline;
}

/* Cards */
.do-ai-support-cards{
  display:flex;
  flex-direction:column;
  gap: 8px;
  text-align: center;
}
.do-ai-support-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}
.do-ai-support-card__title{ font-weight: 700; font-size: 13px; }
.do-ai-support-card__subtitle{ font-size: 13px; line-height: 1.35; opacity: .7; margin-top: 2px; }
.do-ai-support-card__why{ font-size: 13px; line-height: 1.35; margin-top: 6px; opacity: .9; }
.do-ai-support-card__link{
  display:inline-block;
  margin-top: 8px;
  font-size: 13px;
  text-decoration: underline;
}

.do-ai-support-card__imageWrap{
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f3f4f6;
}

.do-ai-support-card__image{
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}


/* Footer */
.do-ai-support-chat__footer{
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 10px 12px 12px 12px;
  background: #fff;
}
.do-ai-support-chat__footer.is-gated{
  display:none;
}
.do-ai-support-chat__disclaimer{
  font-size: 13px;
  line-height: 1.35;
  opacity: .7;
  margin-bottom: 0;
}
.do-ai-support-chat__status{
  min-height: 18px;
  margin: 6px 0 8px 0;
  font-size: 13px;
  line-height: 1.35;
  color: #1A2BC3;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.do-ai-support-chat__status.is-visible{
  opacity: 1;
  transform: translateY(0);
}
.do-ai-support-chat__composer{
  position: relative;
}
.do-ai-support-chat__input{
  display:block;
  width: 100%;
  padding: 10px 52px 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.15);
  font-size: 13px;
  resize: none;
  min-height: 48px;
  max-height: 120px;
  line-height: 1.35;
  box-sizing: border-box;
}
.do-ai-support-chat__send{
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  right: 8px;
  top: 50%;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 999px;
  background: #1A2BC3;
  color: #fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1 !important;
  box-shadow: 0 8px 20px rgba(26,43,195,.22);
  transform: translateY(-50%);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.do-ai-support-chat__send:hover{
  transform: translateY(calc(-50% - 1px));
  box-shadow: 0 10px 24px rgba(26,43,195,.28);
}
.do-ai-support-chat__send:active{
  transform: translateY(-50%);
}
.do-ai-support-chat__sendGlyph{
  display:inline-flex;
  transform: translateX(1px);
}
.do-ai-support-chat__send:disabled{ opacity: .6; cursor:not-allowed; }

@media (max-width: 420px){
  .do-ai-support-chat{ width: calc(100vw - 36px); height: 70vh; }
  .do-ai-support-chat__header{
    padding: 12px 12px 10px 12px;
  }
}


