:root{
  --fw-z: 99999;
  --fw-gap: 10px;
  --fw-size: 56px;
  --fw-radius: 999px;
  --fw-bg: #111827;
  --fw-fg: #ffffff;
  --fw-accent: #10b981; /* verde OK */
  --fw-shadow: 0 10px 25px rgba(0,0,0,.25);
  --fw-border: 1px solid rgba(255,255,255,.08);
}

/* Contenedor flotante */
.floating-widget-container{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--fw-z);
  display: grid;
  gap: var(--fw-gap);
  align-items: end;
}

/* Stack de opciones */
.option-buttons-stack{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Botón FAB */
.fab-button{
  width: var(--fw-size);
  height: var(--fw-size);
  border-radius: var(--fw-radius);
  border: var(--fw-border);
  background: var(--fw-bg);
  color: var(--fw-fg);
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--fw-shadow);
  transition: transform .25s ease, background .2s ease, box-shadow .2s ease;
}
.fab-button:hover{ transform: translateY(-1px); }
.fab-button .fab-icon{ display: inline-block; transition: transform .25s ease; }
.fab-button.open .fab-icon{ transform: rotate(45deg); }

/* Opción con etiqueta */
.option-item{
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.option-item.visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.option-label{
  background: rgba(17,24,39,.95);
  color: #fff;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  border: var(--fw-border);
  box-shadow: var(--fw-shadow);
  white-space: nowrap;
}

/* Botones redondos de opción */
.option-button-round{
  width: 46px;
  height: 46px;
  border-radius: var(--fw-radius);
  border: var(--fw-border);
  background: #0b1220;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--fw-shadow);
}
.whatsapp-icon, .chatbot-icon{
  width: 24px; height: 24px; display: block;
}

/* Ventana del chatbot */
.chatbot-window{
  position: fixed;
  right: 18px;
  bottom: calc(18px + var(--fw-size) + 12px);
  width: min(360px, calc(100vw - 36px));
  max-height: min(70vh, 640px);
  background: #0b1220;
  color: #e5e7eb;
  border-radius: 14px;
  border: var(--fw-border);
  box-shadow: var(--fw-shadow);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: var(--fw-z);
}
.chatbot-window.open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.chat-header{
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #111827;
  border-bottom: var(--fw-border);
}
.chatbot-logo{ width: 28px; height: 28px; object-fit: contain; }
.chat-title{ margin: 0; font-size: 14px; color: #fff; }
.chat-close-button{
  background: transparent; border: 0; color: #9ca3af; font-size: 22px; cursor: pointer;
}
.chat-close-button:hover{ color: #fff; }

.chat-messages{
  padding: 12px;
  overflow: auto;
  scroll-behavior: smooth;
}
.message-bubble{
  max-width: 80%;
  padding: 10px 12px;
  margin: 6px 0;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.35;
  word-wrap: break-word;
}
.message-user{
  margin-left: auto;
  background: #1f2937;
  color: #fff;
}
.message-bot{
  margin-right: auto;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,.06);
  color: #e5e7eb;
}
.loading-indicator{
  font-size: 12px; opacity: .8; margin: 4px 0; color: #9ca3af;
}

.chat-input-area{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  background: #0b1220;
  border-top: var(--fw-border);
}
.chat-input{
  background: #0f172a; color: #e5e7eb; border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.send-button{
  background: var(--fw-accent); color: #062a1f; border: 0;
  padding: 0 14px; font-weight: 600; border-radius: 10px; cursor: pointer;
}
.send-button:hover{ filter: brightness(1.05); }

/* Compatibilidad móvil */
@media (max-width: 420px){
  .option-label{ display: none; }
}
