#bvtai-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147482000;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bvtai-launcher {
  position: relative;
  border: 0;
  background: linear-gradient(135deg, #1668e3, #4f46e5);
  color: #fff;
  padding: 13px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  box-shadow: 0 18px 44px rgba(22, 104, 227, 0.35);
  cursor: pointer;
  overflow: hidden;
}

.bvtai-launcher-glow {
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-45%);
  animation: bvtaiShine 3.8s ease-in-out infinite;
}

@keyframes bvtaiShine {
  0%, 55% {
    transform: translateX(-55%);
  }
  100% {
    transform: translateX(55%);
  }
}

.bvtai-launcher-icon {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bvtai-launcher-text {
  position: relative;
  white-space: nowrap;
}

.bvtai-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: 430px;
  max-width: calc(100vw - 24px);
  height: 680px;
  max-height: calc(100vh - 110px);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 30px 90px rgba(15,23,42,.28);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  display: none;
  flex-direction: column;
}

.bvtai-panel.is-open {
  display: flex;
}

.bvtai-header {
  padding: 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.22), transparent 32%),
    linear-gradient(135deg, #0f172a, #1668e3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bvtai-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bvtai-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}

.bvtai-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.bvtai-title {
  font-size: 15px;
  line-height: 1.1;
  font-weight: 900;
}

.bvtai-subtitle {
  margin-top: 3px;
  font-size: 12px;
  opacity: .82;
}

.bvtai-header-actions {
  display: flex;
  gap: 8px;
}

.bvtai-icon-btn {
  border: 0;
  width: 35px;
  height: 35px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bvtai-icon-btn:hover {
  background: rgba(255,255,255,.22);
}

.bvtai-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 0%, rgba(22,104,227,.08), transparent 30%),
    linear-gradient(180deg, #f8fafc, #ffffff);
}

.bvtai-message {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.bvtai-message-user {
  justify-content: flex-end;
}

.bvtai-message-assistant {
  justify-content: flex-start;
}

.bvtai-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #1668e3;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  margin-top: 3px;
}

.bvtai-message-user .bvtai-avatar {
  display: none;
}

.bvtai-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.bvtai-message-assistant .bvtai-bubble {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 6px;
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
}

.bvtai-message-user .bvtai-bubble {
  background: #1668e3;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.bvtai-bubble strong {
  font-weight: 900;
}

.bvtai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px 36px;
}

.bvtai-suggestions button {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.bvtai-suggestions button:hover {
  background: #dbeafe;
}

.bvtai-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 13px 14px;
}

.bvtai-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #94a3b8;
  animation: bvtaiTyping 1s infinite ease-in-out;
}

.bvtai-dot:nth-child(2) {
  animation-delay: .15s;
}

.bvtai-dot:nth-child(3) {
  animation-delay: .3s;
}

@keyframes bvtaiTyping {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: .45;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.bvtai-cards {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px 36px;
}

.bvtai-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
}

.bvtai-card-img {
  height: 142px;
  background:
    radial-gradient(circle at 30% 20%, rgba(22,104,227,.23), transparent 35%),
    linear-gradient(135deg, #e0f2fe, #eef2ff);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.bvtai-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bvtai-card-placeholder {
  color: #1d4ed8;
  font-weight: 950;
  letter-spacing: -.03em;
}

.bvtai-card-body {
  padding: 13px;
}

.bvtai-card-title {
  font-size: 14px;
  font-weight: 950;
  color: #111827;
  line-height: 1.25;
  margin-bottom: 8px;
}

.bvtai-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.bvtai-pill {
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 5px 8px;
}

.bvtai-card-price {
  font-size: 20px;
  font-weight: 950;
  color: #0f172a;
  letter-spacing: -.04em;
}

.bvtai-card-note {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}

.bvtai-card-btn {
  width: 100%;
  margin-top: 12px;
  border: 0;
  background: #1668e3;
  color: #fff;
  font-weight: 900;
  padding: 11px 12px;
  border-radius: 14px;
  cursor: pointer;
}

.bvtai-card-btn:hover {
  filter: brightness(.96);
}

.bvtai-action-card {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 14px;
  margin: 12px 0 18px 36px;
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
}

.bvtai-action-title {
  font-size: 15px;
  font-weight: 950;
  color: #111827;
  margin-bottom: 5px;
}

.bvtai-action-text {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 12px;
}

.bvtai-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bvtai-action-primary,
.bvtai-action-secondary {
  text-decoration: none;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bvtai-action-primary {
  background: #1668e3;
  color: #fff;
}

.bvtai-action-secondary {
  background: #eff6ff;
  color: #1d4ed8;
}

.bvtai-form {
  border-top: 1px solid #e5e7eb;
  padding: 12px;
  background: #fff;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.bvtai-input {
  flex: 1;
  resize: none;
  max-height: 120px;
  min-height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.35;
  outline: none;
}

.bvtai-input:focus {
  border-color: #1668e3;
  box-shadow: 0 0 0 4px rgba(22,104,227,.12);
}

.bvtai-send {
  width: 46px;
  height: 44px;
  border: 0;
  border-radius: 15px;
  background: #1668e3;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bvtai-send:disabled,
.bvtai-input:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 575.98px) {
  #bvtai-root {
    right: 12px;
    bottom: 12px;
  }

  .bvtai-launcher {
    width: 58px;
    height: 58px;
    padding: 0;
    justify-content: center;
  }

  .bvtai-launcher-icon {
    width: 36px;
    height: 36px;
  }

  .bvtai-launcher-text {
    display: none;
  }

  .bvtai-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 78px;
    width: auto;
    height: min(700px, calc(100vh - 96px));
    max-height: calc(100vh - 96px);
    border-radius: 24px;
  }

  .bvtai-bubble {
    max-width: 92%;
  }

  .bvtai-cards,
  .bvtai-action-card {
    margin-left: 0;
  }

  .bvtai-suggestions {
    margin-left: 0;
  }
}




/* =========================================================
   BVT AI - MOBILE MODAL FIX
   Desktop: widget flotante normal
   Mobile: modal tipo WhatsApp
========================================================= */

:root{
  --bvtai-mobile-z: 2147483200;
  --bvtai-mobile-vh: 100dvh;
}

/* Evita que la página se mueva detrás del chat */
body.bvtai-modal-open{
  overflow: hidden !important;
  touch-action: none;
}

/* Cuando el chat está abierto en móvil, ocultamos el botón */
.bvtai-launcher.is-hidden{
  opacity: 0;
  pointer-events: none;
  transform: scale(.92);
}

/* Estado abierto compatible con JS */
.bvtai-panel.is-open,
.bvtai-panel[aria-hidden="false"]{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 767.98px){

  #bvtai-root{
    position: relative;
    z-index: var(--bvtai-mobile-z);
  }

  .bvtai-launcher{
    position: fixed !important;
    right: 14px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: calc(var(--bvtai-mobile-z) - 1);
  }

  .bvtai-panel{
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    max-width: none !important;

    height: var(--bvtai-mobile-vh) !important;
    max-height: var(--bvtai-mobile-vh) !important;

    margin: 0 !important;
    padding: 0 !important;

    border-radius: 0 !important;
    border: none !important;

    z-index: var(--bvtai-mobile-z) !important;

    display: flex !important;
    flex-direction: column;

    background: #f8fafc;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(100%);
    transition:
      transform .22s cubic-bezier(.4,0,.2,1),
      opacity .16s ease,
      visibility .16s ease;

    overflow: hidden !important;
  }

  .bvtai-panel.is-open,
  .bvtai-panel[aria-hidden="false"]{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

.bvtai-header{
  flex: 0 0 auto;

  min-height: 76px;
  padding:
    calc(14px + env(safe-area-inset-top))
    16px
    14px
    16px;

  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.22), transparent 32%),
    linear-gradient(135deg, #0f172a, #1668e3);

  color: #fff;

  display: flex;
  align-items: center;
  justify-content: space-between;

  position: relative;
  z-index: 5;

  border-bottom: 1px solid rgba(255,255,255,.14);

  box-shadow:
    0 14px 34px rgba(15,23,42,.22),
    inset 0 1px 0 rgba(255,255,255,.14);
}

.bvtai-title{
  font-size: 15px;
  line-height: 1.1;
  font-weight: 900;
  color: #fff;
}

.bvtai-subtitle{
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.2;
  opacity: .82;
  color: rgba(255,255,255,.88);
}

.bvtai-logo{
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}

.bvtai-logo img{
  width: 32px;
  height: 32px;
  object-fit: contain;
}

  .bvtai-header-actions{
    gap: 6px;
  }

.bvtai-icon-btn{
  border: 0;
  width: 35px;
  height: 35px;
  min-width: 35px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bvtai-icon-btn:hover,
.bvtai-icon-btn:focus{
  background: rgba(255,255,255,.22);
  color: #fff;
  outline: none;
}

  .bvtai-messages{
    flex: 1 1 auto;

    min-height: 0;
    height: auto;

    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;

    padding: 14px 12px 12px;
    background:
      radial-gradient(circle at top left, rgba(37,99,235,.08), transparent 32%),
      linear-gradient(180deg, #f8fafc, #eef4ff);
  }

  .bvtai-message{
    max-width: 100%;
  }

  .bvtai-bubble{
    max-width: 82vw;
    font-size: .95rem;
    line-height: 1.35;
  }

  .bvtai-suggestions{
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 2px;
    -webkit-overflow-scrolling: touch;
  }

  .bvtai-suggestions button{
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .bvtai-form{
    flex: 0 0 auto;

    position: relative;
    z-index: 4;

    padding:
      10px
      10px
      calc(10px + env(safe-area-inset-bottom))
      10px;

    background: rgba(255,255,255,.98);
    border-top: 1px solid rgba(15,23,42,.08);

    display: flex;
    align-items: flex-end;
    gap: 8px;
  }

  .bvtai-input{
    flex: 1 1 auto;

    min-height: 42px;
    max-height: 112px;

    resize: none;
    overflow-y: auto;

    font-size: 16px !important;
    line-height: 1.35;

    border-radius: 18px;
  }

  .bvtai-send{
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 16px;
  }
}






@media (max-width: 767.98px){

  body.bvtai-modal-open .bvt-navbar{
    z-index: 1 !important;
    pointer-events: none;
  }

  body.bvtai-modal-open .bvt-navbar #navbarContent{
    z-index: 1 !important;
  }

  body.bvtai-modal-open #bvtai-root{
    position: relative;
    z-index: 2147483600 !important;
  }

  body.bvtai-modal-open .bvtai-panel{
    z-index: 2147483601 !important;
  }

  body.bvtai-modal-open .bvtai-launcher{
    z-index: 2147483602 !important;
  }
}