/* Asistente de Dreamtic: burbuja abajo a la derecha y panel de chat */
.dtc, .dtc *{ box-sizing: border-box; }
.dtc{ position: fixed; right: 20px; bottom: 20px; z-index: 90; font-family: var(--font, 'Inter', system-ui, sans-serif); font-size: 15px; font-weight: 400; line-height: 1.45; color: #fff; }

.dtc__btn{
  width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--signal, #1a5cf0); display: grid; place-items: center; position: relative;
  box-shadow: 0 10px 30px -8px rgba(26,92,240,.65);
  transition: transform .2s ease, box-shadow .2s ease;
}
.dtc__btn:hover{ transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(26,92,240,.8); }
.dtc__btn:focus-visible, .dtc__x:focus-visible, .dtc__chip:focus-visible, .dtc__send:focus-visible, .dtc__lead-btn:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }
.dtc__btn img{ width: 34px; height: auto; display: block; }
.dtc__btn .dtc__ico-x{ display: none; width: 22px; height: 22px; }
.dtc.is-open .dtc__btn img{ display: none; }
.dtc.is-open .dtc__btn .dtc__ico-x{ display: block; }
.dtc__ping{ position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #ffb648; border: 2px solid #04163a; }
.dtc.is-open .dtc__ping, .dtc.is-seen .dtc__ping{ display: none; }

.dtc__panel{
  position: absolute; right: 0; bottom: 76px; width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 120px);
  background: #0b1834; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; overflow: hidden;
  display: none; flex-direction: column;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.7);
}
.dtc.is-open .dtc__panel{ display: flex; animation: dtc-in .22s ease; }
@keyframes dtc-in{ from{ opacity: 0; transform: translateY(10px) scale(.98); } to{ opacity: 1; transform: none; } }

.dtc__head{ display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #04163a; border-bottom: 1px solid rgba(255,255,255,.1); }
.dtc__avatar{ width: 38px; height: 38px; border-radius: 50%; background: var(--signal, #1a5cf0); display: grid; place-items: center; flex: none; }
.dtc__avatar img{ width: 22px; height: auto; }
.dtc__title{ font-weight: 600; font-size: 15px; margin: 0; }
.dtc__sub{ margin: 0; font-size: 12px; color: #9fb4e6; }
.dtc__x{ margin-left: auto; background: transparent; border: 0; color: #fff; cursor: pointer; padding: 6px; border-radius: 8px; line-height: 0; }
.dtc__x:hover{ background: rgba(255,255,255,.1); }

.dtc__msgs{ flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.dtc__m{ max-width: 86%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.dtc__m a{ color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.dtc__m--bot{ white-space: normal; }
.dtc__m p{ margin: 0; }
.dtc__m p + p, .dtc__m p + ul, .dtc__m ul + p{ margin-top: 8px; }
.dtc__m ul{ margin: 0; padding-left: 18px; }
.dtc__m li{ margin: 3px 0; font-weight: 400; color: inherit; }
.dtc__m strong{ font-weight: 600; }
.dtc__m--bot{ align-self: flex-start; background: rgba(255,255,255,.09); border-bottom-left-radius: 4px; }
.dtc__m--me{ align-self: flex-end; background: var(--signal, #1a5cf0); border-bottom-right-radius: 4px; }
.dtc__typing{ display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.dtc__typing i{ width: 6px; height: 6px; border-radius: 50%; background: #9fb4e6; animation: dtc-b 1s infinite ease-in-out; }
.dtc__typing i:nth-child(2){ animation-delay: .15s; }
.dtc__typing i:nth-child(3){ animation-delay: .3s; }
@keyframes dtc-b{ 0%,80%,100%{ opacity: .3; transform: translateY(0); } 40%{ opacity: 1; transform: translateY(-3px); } }

.dtc__chips{ display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.dtc__chip{ background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.dtc__chip:hover{ border-color: #fff; background: rgba(255,255,255,.08); }

/* formulario de contacto: tarjeta al lado del chat */
.dtc__lead{
  position: absolute; right: 392px; bottom: 76px; width: 320px; max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); overflow-y: auto;
  margin: 0; padding: 18px; background: #0b1834; border: 1px solid rgba(255,255,255,.14); border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.7); display: none;
}
.dtc.is-open .dtc__lead.is-on{ display: block; animation: dtc-in .22s ease; }
.dtc__lead h3{ margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.dtc__lead p{ margin: 0 0 10px; font-size: 12.5px; color: #b9c7ec; }
.dtc__lead label{ display: block; font-size: 12px; color: #b9c7ec; margin-bottom: 8px; }
.dtc__lead input[type=text], .dtc__lead input[type=email], .dtc__lead textarea{
  display: block; width: 100%; margin-top: 3px; padding: 9px 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,.22);
  background: #04163a; color: #fff; font: inherit; font-size: 14px;
}
.dtc__lead textarea{ resize: vertical; min-height: 56px; max-height: 120px; }
.dtc__lead input:focus, .dtc__lead textarea:focus, .dtc__in:focus{ outline: 2px solid var(--signal-soft, #4d7dff); outline-offset: 1px; }
.dtc__lead .dtc__ok{ display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #b9c7ec; margin: 4px 0 10px; }
.dtc__lead .dtc__ok input{ margin-top: 2px; flex: none; }
.dtc__lead .dtc__ok a{ color: #fff; text-decoration: underline; }
.dtc__lead-row{ display: flex; gap: 8px; align-items: center; }
.dtc__lead-btn{ background: var(--signal, #1a5cf0); color: #fff; border: 0; border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.dtc__lead-btn[disabled]{ opacity: .6; cursor: default; }
.dtc__lead-cancel{ background: transparent; border: 0; color: #b9c7ec; font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.dtc__err{ color: #ffb4b4; font-size: 12px; margin: 0 0 8px; min-height: 0; }
.dtc__bot-hp{ position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.dtc__form{ display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); background: #04163a; }
.dtc__in{ flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.22); background: #0b1834; color: #fff; font: inherit; font-size: 15px; }
.dtc__in::placeholder{ color: #7f93c4; }
.dtc__send{ flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--signal, #1a5cf0); color: #fff; cursor: pointer; display: grid; place-items: center; }
.dtc__send[disabled]{ opacity: .5; cursor: default; }
.dtc__mic{ flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: transparent; cursor: pointer; display: grid; place-items: center; }
.dtc__mic:hover{ background: rgba(255,255,255,.1); }
.dtc__mic:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }
.dtc__mic.is-rec{ background: #d93a3a; border-color: #d93a3a; animation: dtc-rec 1.2s infinite; }
@keyframes dtc-rec{ 0%{ box-shadow: 0 0 0 0 rgba(217,58,58,.6); } 100%{ box-shadow: 0 0 0 12px rgba(217,58,58,0); } }
.dtc__team{ background: none; border: 0; color: #9fb4e6; font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; padding: 6px 12px 10px; text-align: center; background: #04163a; }

@media (max-width: 860px){
  /* sin sitio al lado: el formulario se superpone al chat */
  .dtc__lead{ position: fixed; left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; max-height: 85vh; z-index: 2; }
}
@media (max-width: 520px){
  .dtc{ right: 12px; bottom: 12px; }
  .dtc__panel{ position: fixed; right: 0; left: 0; bottom: 0; width: 100%; max-width: none; height: min(86vh, 640px); max-height: none; border-radius: 18px 18px 0 0; }
  .dtc.is-open .dtc__btn{ display: none; }
}
@media (prefers-reduced-motion: reduce){
  .dtc__btn, .dtc.is-open .dtc__panel{ transition: none; animation: none; }
  .dtc__typing i{ animation: none; opacity: .7; }
  .dtc__mic.is-rec{ animation: none; }
  .dtc__msgs{ scroll-behavior: auto; }
}
