.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.virtual-assistant {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transition: transform .2s ease, filter .2s ease;
}

.virtual-assistant:hover,
.virtual-assistant[aria-expanded="true"] {
  transform: translateY(-4px) scale(1.035);
  filter: contrast(1.4) brightness(1.08) drop-shadow(0 16px 26px rgba(0, 102, 255, .38));
}

.virtual-assistant:focus-visible {
  outline: 3px solid #BFF3D0;
  outline-offset: 5px;
}

.assistant-panel {
  position: fixed;
  top: 0;
  right: clamp(12px, 2vw, 28px);
  bottom: 218px;
  width: min(450px, calc(100vw - 32px));
  height: auto;
  padding: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #F7FAFF;
  background:
    linear-gradient(145deg, rgba(18, 39, 78, .98), rgba(8, 22, 49, .98)),
    #0B1730;
  border: 1px solid rgba(129, 166, 255, .3);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 8, 28, .46), inset 0 1px 0 rgba(255, 255, 255, .06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.assistant-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.assistant-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 20px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(90deg, rgba(42, 87, 190, .18), rgba(191, 243, 208, .05));
}

.assistant-panel-head > div {
  display: grid;
  gap: 5px;
}

.assistant-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #BFF3D0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.assistant-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4DE68A;
  box-shadow: 0 0 10px rgba(77, 230, 138, .8);
}

.assistant-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: #DCE7FF;
  background: rgba(255, 255, 255, .05);
  font: 400 24px/1 Arial, sans-serif;
  cursor: pointer;
}

.assistant-close:hover,
.assistant-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .11);
  outline: none;
}

.assistant-messages {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow-y: auto;
  padding: 18px 18px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 151, 242, .55) transparent;
}

.assistant-message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 15px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.assistant-message--bot {
  width: 100%;
  max-width: 100%;
  align-self: flex-start;
  text-align: left;
  color: #E8F0FF;
  background: rgba(70, 108, 196, .17);
  border: 1px solid rgba(128, 165, 248, .18);
  border-bottom-left-radius: 5px;
}

.assistant-message--user {
  align-self: flex-end;
  text-align: center;
  color: #071630;
  background: #BFF3D0;
  border-bottom-right-radius: 5px;
}

.assistant-message.is-typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -.12em;
  background: #BFF3D0;
  animation: assistant-caret .72s infinite step-end;
}

@keyframes assistant-caret {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

.assistant-message-action {
  align-self: flex-start;
  margin: -3px 0 2px 3px;
  padding: 8px 11px;
  border: 1px solid rgba(191, 243, 208, .38);
  border-radius: 10px;
  color: #BFF3D0;
  background: rgba(191, 243, 208, .07);
  font: 700 11px/1.2 'Figtree', sans-serif;
  cursor: pointer;
}

.assistant-message-action[data-section="contacto"] {
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  color: #071630;
  background: #BFF3D0;
  text-align: center;
}

.assistant-message-action[data-section="contacto"]:hover,
.assistant-message-action[data-section="contacto"]:focus-visible {
  background: #D8F9E3;
}

.assistant-message-action:hover,
.assistant-message-action:focus-visible {
  color: #071630;
  background: #BFF3D0;
  outline: none;
}

.assistant-inline-contact {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(191, 243, 208, .3);
  border-radius: 15px;
  background: rgba(3, 13, 34, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.assistant-inline-contact-head {
  display: grid;
  gap: 3px;
  margin-bottom: 2px;
}

.assistant-inline-contact-head strong {
  color: #F7FAFF;
  font-size: 13px;
}

.assistant-inline-contact-head span {
  color: #93A6CC;
  font-size: 10.5px;
  line-height: 1.4;
}

.assistant-inline-contact label {
  display: grid;
  gap: 5px;
  color: #B8C6E3;
  font-size: 10.5px;
  font-weight: 700;
}

.assistant-inline-contact input,
.assistant-inline-contact textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(135, 169, 247, .28);
  border-radius: 10px;
  color: #fff;
  background: rgba(2, 10, 27, .78);
  font: 500 12px/1.4 'Figtree', sans-serif;
  outline: none;
}

.assistant-inline-contact textarea {
  resize: vertical;
  min-height: 84px;
}

.assistant-inline-contact input:focus,
.assistant-inline-contact textarea:focus {
  border-color: #86A7F8;
  box-shadow: 0 0 0 3px rgba(87, 128, 224, .13);
}

.assistant-inline-contact > button {
  min-height: 40px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  color: #071630;
  background: #BFF3D0;
  font: 800 11px 'Figtree', sans-serif;
  cursor: pointer;
}

.assistant-inline-contact > button:disabled {
  cursor: wait;
  opacity: .65;
}

.assistant-inline-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.assistant-inline-status {
  min-height: 0;
  margin: 0;
  color: #AAB8D5;
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
}

.assistant-inline-status:empty { display: none; }
.assistant-inline-status.is-success { color: #BFF3D0; }
.assistant-inline-status.is-error { color: #FF9B94; }

.assistant-inline-contact > .assistant-inline-fallback {
  display: none;
  color: #BFF3D0;
  border: 1px solid rgba(191, 243, 208, .35);
  background: transparent;
}

.assistant-inline-contact > .assistant-inline-fallback.is-visible {
  display: block;
}

.assistant-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 58px;
}

.assistant-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8FB2FF;
  animation: assistant-dot 1s infinite ease-in-out;
}

.assistant-typing span:nth-child(2) { animation-delay: .14s; }
.assistant-typing span:nth-child(3) { animation-delay: .28s; }

@keyframes assistant-dot {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.assistant-form {
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: auto;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  background: rgba(5, 16, 38, .96);
}

.assistant-form input {
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(135, 169, 247, .28);
  border-radius: 12px;
  color: #fff;
  background: rgba(3, 13, 34, .58);
  font: 500 13px 'Figtree', sans-serif;
  outline: none;
}

.assistant-form input:focus {
  border-color: #86A7F8;
  box-shadow: 0 0 0 3px rgba(87, 128, 224, .13);
}

.assistant-form input::placeholder { color: #7F90B5; }

.assistant-form button {
  height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 12px;
  color: #071630;
  background: #BFF3D0;
  font: 800 12px 'Figtree', sans-serif;
  cursor: pointer;
}

.assistant-form button:disabled,
.assistant-form input:disabled {
  cursor: wait;
  opacity: .62;
}

@media(max-width:600px) {
  .assistant-panel {
    top: 0;
    right: 8px;
    bottom: 138px;
    left: 8px;
    width: auto;
    height: auto;
    border-radius: 18px;
    transform-origin: bottom center;
  }

  .assistant-panel-head { padding: 17px 16px 14px; }
  .assistant-messages { padding: 15px 14px 7px; }
  .assistant-form { padding: 10px 14px 13px; }
  .assistant-form input,
  .assistant-inline-contact input,
  .assistant-inline-contact textarea { font-size: 16px; }
}

@media(max-height:700px) and (min-width:601px) {
  .assistant-panel {
    bottom: 190px;
    height: auto;
  }
}

@media(prefers-reduced-motion:reduce) {
  .virtual-assistant,
  .assistant-panel { transition: none !important; }
  .assistant-typing span { animation: none !important; opacity: .7; }
  .assistant-message.is-typing::after { animation: none !important; opacity: 1; }
}
