
:root{
  --bioaire-primary:#3cbec9;
  --bioaire-button-from:#3cbec9;
  --bioaire-button-to:#2c7fa3;
  --bioaire-user-from:#3cbec9;
  --bioaire-user-to:#2c7fa3;
  --bioaire-bot-bubble:#ffffff;
  --bioaire-faq-border:#3cbec9;
}
#bioaire-chat-btn{
  position:fixed;bottom:24px;right:24px;width:60px;height:60px;
  background:linear-gradient(135deg,var(--bioaire-button-from),var(--bioaire-button-to));
  border-radius:50%;color:white;display:flex;align-items:center;justify-content:center;
  font-size:28px;cursor:pointer;box-shadow:0 8px 20px rgba(0,0,0,.18);
}
#bioaire-chat-window{
  position:fixed;bottom:100px;right:24px;width:340px;height:480px;background:white;
  border-radius:18px;display:none;flex-direction:column;overflow:hidden;
  box-shadow:0 20px 40px rgba(0,0,0,.2);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.bioaire-header{
  background:linear-gradient(135deg,var(--bioaire-primary),var(--bioaire-button-to));
  color:white;padding:16px;
}
.bioaire-status{font-size:13px;opacity:.95;margin-top:4px;}
.bioaire-messages{flex:1;overflow-y:auto;padding:12px 16px;background:#f7fafb;}
.msg-row{display:flex;margin-bottom:10px;}
.msg-row.bot{justify-content:flex-start;}
.msg-row.user{justify-content:flex-end;}
.msg-avatar{
  width:28px;height:28px;border-radius:999px;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:#e2e8f0;margin:0 6px;font-size:14px;
}
.msg-bubble{max-width:75%;padding:8px 12px;border-radius:16px;font-size:14px;line-height:1.4;}
.msg-bubble.bot{
  background:var(--bioaire-bot-bubble);border:1px solid #e1ecf2;color:#111827;
}
.msg-bubble.user{
  background:linear-gradient(135deg,var(--bioaire-user-from),var(--bioaire-user-to));
  color:white;
}
.bioaire-faq-bar{
  display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;
  padding:8px 16px;background:white;border-top:1px solid #e2e8f0;
}
.faq-chip{
  white-space:nowrap;padding:6px 12px;border-radius:20px;
  border:1px solid var(--bioaire-faq-border);background:#ffffff;font-size:12px;
  cursor:pointer;flex:0 0 auto;display:flex;align-items:center;gap:6px;
}
.faq-chip:hover{background:#e9fafe;}
.bioaire-input{
  padding:12px 16px;border-top:1px solid #e2e8f0;display:flex;gap:8px;background:white;
}
.bioaire-input input{
  flex:1;border:none;background:#f1f5f9;border-radius:999px;
  padding:8px 12px;font-size:14px;outline:none;
}
.bioaire-input button{
  background:linear-gradient(135deg,var(--bioaire-button-from),var(--bioaire-button-to));border:none;
  border-radius:999px;color:white;padding:8px 14px;font-size:16px;cursor:pointer;
}



.bioaire-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bioaire-header-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bioaire-schedule {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}
.bioaire-schedule-note {
  font-size: 11px;
  color: #f97316;
  margin-top: 2px;
}
.bioaire-reset-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.8;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.bioaire-reset-btn:hover {
  opacity: 1;
  transform: rotate(-10deg) scale(1.05);
}
.bioaire-mic-btn {
  background: transparent;
  border: none;
  margin-right: 4px;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.bioaire-mic-btn.recording {
  opacity: 1;
  transform: scale(1.1);
}
.bioaire-tts-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  margin-left: 6px;
  opacity: 0.75;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.bioaire-tts-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.bioaire-wa-row {
  padding: 6px 16px 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}
.bioaire-wa-btn {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #22c55e;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.bioaire-wa-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.6);
  opacity: 0.96;
}



/* Premium WhatsApp Button (Style C) */
.bioaire-wa-row {
  padding: 14px 18px 20px 18px;
  background: #ffffff;
  border-top: 1px solid #dfe3e7;
}
.bioaire-wa-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(22, 163, 74, 0.35);
  transition: all 0.25s ease;
}
.bioaire-wa-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.45);
}


/* Caja de captación de leads */
.bioaire-lead-trigger-row {
  padding: 10px 18px 16px 18px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.bioaire-lead-trigger-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.bioaire-lead-trigger-btn:hover {
  background: #eef2ff;
  border-color: #4f46e5;
  transform: translateY(-1px);
}

.bioaire-lead-box {
  position: absolute;
  bottom: 78px;
  left: 16px;
  right: 16px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
  padding: 14px 16px 12px 16px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.bioaire-lead-box.visible {
  display: flex;
}

.bioaire-lead-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.bioaire-lead-text {
  font-size: 12px;
  color: #4b5563;
}

.bioaire-lead-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.bioaire-lead-form input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}

.bioaire-lead-form button {
  margin-top: 4px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45);
  transition: all 0.2s ease;
}

.bioaire-lead-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.55);
}

.bioaire-lead-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #9ca3af;
}


/* === FIX BUTTON VISIBILITY === */
#bioaire-chatbot-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #0073e6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 999999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
