/* ================================================================
   Being LeadChat — Frontend Styles v1.2.0
   ================================================================ */

:root {
  --blc-btn-color:  #25D366;
  --blc-btn-hover:  #1ebe5d;
  --blc-shadow-lg:  0 8px 32px rgba(0,0,0,.22);
  --blc-radius:     16px;
  --blc-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --blc-green:      #25D366;
  --blc-teal-dark:  #075e54;
  --blc-teal-mid:   #128c7e;
  --blc-text:       #1a1a1a;
  --blc-label:      #374151;
  --blc-muted:      #6b7280;
  --blc-border:     #e5e7eb;
  --blc-input-bg:   #f9fafb;
  --blc-error:      #ef4444;
  --blc-ease:       cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════════════════════════════
   FAB — Floating Action Button
══════════════════════════════════════════════════════════════ */
#blc-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 99990;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--blc-btn-color);
  box-shadow: var(--blc-shadow-lg), 0 0 0 0 rgba(37,211,102,.4);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .22s var(--blc-ease), transform .22s var(--blc-ease);
  animation: blc-pulse 3s infinite;
  outline: none;
  padding: 0;
}
#blc-fab.blc-pos-left { right:auto; left:24px; }
#blc-fab:hover {
  background: var(--blc-btn-hover);
  transform: scale(1.08);
  animation: none;
  box-shadow: var(--blc-shadow-lg), 0 0 0 10px rgba(37,211,102,.12);
}

/* WhatsApp SVG icon in FAB */
#blc-fab .blc-wa-svg {
  width: 32px; height: 32px;
  display: block; flex-shrink: 0;
}
#blc-fab .blc-wa-svg path {
  fill: #ffffff;
}

.blc-fab-badge {
  position: absolute; top: -2px; right: -2px;
  width: 18px; height: 18px;
  background: #ff3b30; border-radius: 50%; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff; font-family: var(--blc-font);
}

@keyframes blc-pulse {
  0%   { box-shadow: var(--blc-shadow-lg), 0 0 0 0   rgba(37,211,102,.4); }
  60%  { box-shadow: var(--blc-shadow-lg), 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: var(--blc-shadow-lg), 0 0 0 0   rgba(37,211,102,0); }
}

/* ══════════════════════════════════════════════════════════════
   OVERLAY
══════════════════════════════════════════════════════════════ */
#blc-overlay {
  position: fixed; inset: 0; z-index: 99991;
  background: rgba(0,0,0,.40);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .22s var(--blc-ease);
}
#blc-overlay.open { opacity:1; pointer-events:all; }

/* ══════════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════════ */
#blc-modal {
  position: fixed; z-index: 99992;
  top: 50%; right: 24px;
  transform: translateY(-50%) scale(.96);
  width: 380px; max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: var(--blc-radius);
  box-shadow: var(--blc-shadow-lg);
  font-family: var(--blc-font);
  overflow: hidden;

  /* closed */
  opacity: 0;
  transform: translateY(20px) scale(.96);
  pointer-events: none;
  transition: opacity .22s var(--blc-ease), transform .22s var(--blc-ease);
  transform-origin: center right;
}
#blc-modal.blc-pos-left { right:auto; left:24px; transform-origin:center left; }
#blc-modal.open { opacity:1; transform:translateY(-50%) scale(1); pointer-events:all; }

/* ══════════════════════════════════════════════════════════════
   MODAL HEADER — teal gradient, compacto
══════════════════════════════════════════════════════════════ */
.blc-modal-header {
  background: linear-gradient(135deg, var(--blc-teal-dark) 0%, var(--blc-teal-mid) 100%);
  padding: 12px 14px 11px;
  position: relative;
}
.blc-modal-header-inner {
  display: flex; align-items: center; gap: 11px;
  padding-right: 36px; /* room for close btn */
}
.blc-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.blc-avatar .blc-wa-svg { width: 22px; height: 22px; }
.blc-avatar .blc-wa-svg path { fill: #fff; }

.blc-header-text h3 {
  margin: 0 0 2px; font-size: 15px; font-weight: 700;
  color: #fff; line-height: 1.2;
}
.blc-header-text p {
  margin: 0; font-size: 12px; color: rgba(255,255,255,.85);
  display: flex; align-items: center; gap: 5px;
}
.blc-online-dot {
  display: inline-block; width: 7px; height: 7px;
  background: #4ade80; border-radius: 50%;
  animation: blc-blink 2s infinite; flex-shrink: 0;
}
@keyframes blc-blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Close button — círculo perfecto */
.blc-close-btn {
  position: absolute; top: 50%; right: 14px;
  transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.22);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 400; line-height: 1;
  transition: background .18s;
  padding: 0;
  font-family: var(--blc-font);
}
.blc-close-btn:hover { background: rgba(255,255,255,.38); }

/* ══════════════════════════════════════════════════════════════
   MODAL BODY — pure white
══════════════════════════════════════════════════════════════ */
.blc-modal-body {
  background: #fff;
  padding: 12px 14px 14px;
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #ddd #fff;
}
.blc-modal-subtitle {
  font-size: 12px; color: var(--blc-muted);
  margin: 0 0 10px; line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════════
   FIELDS GRID
══════════════════════════════════════════════════════════════ */
.blc-fields-grid {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.blc-field { display: flex; flex-direction: column; min-width: 0; }
.blc-field--full { width: 100%; }
.blc-field--half { width: calc(50% - 5px); }

.blc-field label {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--blc-label); margin-bottom: 3px;
}
.blc-field label .blc-req { color: var(--blc-error); margin-left: 2px; }

/* Standard inputs */
.blc-field input[type=text],
.blc-field input[type=tel],
.blc-field input[type=email],
.blc-field input[type=number],
.blc-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 7px 10px;
  background: var(--blc-input-bg);
  border: 1.5px solid var(--blc-border); border-radius: 7px;
  font-size: 13px; font-family: var(--blc-font); color: var(--blc-text);
  transition: border-color .18s, box-shadow .18s;
  outline: none; -webkit-appearance: none;
}
.blc-field input:focus,
.blc-field textarea:focus {
  border-color: var(--blc-green);
  box-shadow: 0 0 0 3px rgba(37,211,102,.15);
  background: #fff;
}
.blc-field input.error,
.blc-field textarea.error,
.blc-field select.error {
  border-color: var(--blc-error);
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.blc-field textarea { resize: vertical; min-height: 58px; }

/* Custom select */
.blc-select-wrap { position: relative; width: 100%; }
.blc-select-wrap select {
  width: 100%; box-sizing: border-box;
  padding: 7px 28px 7px 10px;
  background: var(--blc-input-bg);
  border: 1.5px solid var(--blc-border); border-radius: 7px;
  font-size: 13px; font-family: var(--blc-font); color: var(--blc-text);
  cursor: pointer; outline: none;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  transition: border-color .18s, box-shadow .18s;
}
.blc-select-wrap select:focus {
  border-color: var(--blc-green);
  box-shadow: 0 0 0 3px rgba(37,211,102,.15);
  background: #fff;
}
.blc-select-arrow {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 10px; color: var(--blc-muted); pointer-events: none;
}

/* Radio buttons */
.blc-radio-group { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.blc-radio-btn input[type=radio] {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.blc-radio-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 11px;
  background: var(--blc-input-bg);
  border: 1.5px solid var(--blc-border); border-radius: 20px;
  font-size: 12px; font-family: var(--blc-font); font-weight: 500;
  color: var(--blc-text); cursor: pointer; user-select: none;
  transition: background .18s, border-color .18s, color .18s;
  white-space: nowrap; margin: 0;
}
.blc-radio-btn:hover { border-color: var(--blc-green); background: rgba(37,211,102,.06); }
.blc-radio-btn.active { background: var(--blc-green); border-color: var(--blc-green); color: #fff; font-weight: 600; }
.blc-radio-group.error .blc-radio-btn { border-color: var(--blc-error); }

/* Field error */
.blc-field-error { font-size: 11px; color: var(--blc-error); margin-top: 4px; display: none; }

/* Form error banner */
.blc-form-error {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
  color: var(--blc-error); font-size: 13px;
  padding: 10px 12px; margin-bottom: 12px; display: none;
}

/* ══════════════════════════════════════════════════════════════
   SUBMIT BUTTON
══════════════════════════════════════════════════════════════ */
.blc-submit-btn {
  width: 100%; margin-top: 10px;
  padding: 11px 20px;
  background: var(--blc-green); color: #fff;
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700; font-family: var(--blc-font);
  cursor: pointer; letter-spacing: .02em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .18s, transform .18s, opacity .18s;
}
.blc-submit-btn:hover:not(:disabled) { background: var(--blc-btn-hover); transform: translateY(-1px); }
.blc-submit-btn:disabled { opacity: .65; cursor: wait; }
.blc-btn-icon { display: flex; align-items: center; gap: 8px; }
.blc-btn-icon svg { width: 17px; height: 17px; fill: #fff; }

.blc-spinner {
  width: 17px; height: 17px; display: none;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: blc-spin .7s linear infinite;
}
.blc-submit-btn.loading .blc-spinner { display: inline-block; }
.blc-submit-btn.loading .blc-btn-icon { display: none; }
@keyframes blc-spin { to { transform: rotate(360deg); } }

.blc-privacy-note {
  font-size: 10px; color: var(--blc-muted);
  text-align: center; margin-top: 6px; line-height: 1.3;
}

/* ══════════════════════════════════════════════════════════════
   SUCCESS STATE
══════════════════════════════════════════════════════════════ */
.blc-success-state { display: none; text-align: center; padding: 10px 0; }
.blc-success-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--blc-green), var(--blc-teal-mid));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.blc-success-icon svg { width: 28px; height: 28px; fill: #fff; }
.blc-success-state h4 { font-size: 16px; font-weight: 700; color: var(--blc-text); margin: 0 0 6px; }
.blc-success-state p  { font-size: 13px; color: var(--blc-muted); margin: 0; }

/* ══════════════════════════════════════════════════════════════
   MOBILE
══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  #blc-modal { top:50%; right:12px; left:12px; width:auto; max-width:none; }
  #blc-modal.blc-pos-left { right:12px; left:12px; }
  #blc-fab { bottom:16px; right:16px; }
  #blc-fab.blc-pos-left { right:auto; left:16px; }
  .blc-field--half { width:100%; }
}
