/* ============================================
   Lead Capture Widget — Floating Concierge
   ============================================ */

#fb-lead-widget-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: #fff;
  border: none;
  border-radius: 60px;
  padding: 14px 22px 14px 18px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(26, 115, 232, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.2px;
}
#fb-lead-widget-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(26, 115, 232, 0.5);
}
#fb-lead-widget-trigger .trigger-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
#fb-lead-widget-trigger .trigger-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  position: absolute;
  top: 10px;
  right: 10px;
  animation: fb-pulse 2s infinite;
}

@keyframes fb-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.4); }
}

/* ---------- Panel ---------- */
#fb-lead-widget-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 100000;
  width: 380px;
  max-height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Source Sans Pro', sans-serif;
  animation: fb-slide-up 0.25s ease-out;
}
#fb-lead-widget-panel.open {
  display: flex;
}

@keyframes fb-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.fb-lw-header {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: #fff;
  padding: 20px 22px 16px;
  position: relative;
}
.fb-lw-header h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.fb-lw-header p {
  margin: 0;
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.4;
}
.fb-lw-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.fb-lw-close:hover {
  color: #fff;
}

/* Progress bar */
.fb-lw-progress {
  height: 3px;
  background: rgba(255,255,255,0.2);
}
.fb-lw-progress-bar {
  height: 100%;
  background: #4caf50;
  transition: width 0.3s ease;
  border-radius: 0 2px 2px 0;
}

/* Body */
.fb-lw-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

/* Steps */
.fb-lw-step {
  display: none;
}
.fb-lw-step.active {
  display: block;
  animation: fb-fade-in 0.2s ease;
}

@keyframes fb-fade-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.fb-lw-step-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 14px;
}

/* Category grid */
.fb-lw-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fb-lw-cat-btn {
  background: #f5f7fa;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  font-weight: 500;
  color: #444;
}
.fb-lw-cat-btn:hover {
  background: #e8f0fe;
  border-color: #1a73e8;
}
.fb-lw-cat-btn.selected {
  background: #e8f0fe;
  border-color: #1a73e8;
  color: #1a73e8;
  font-weight: 600;
}
.fb-lw-cat-btn .cat-icon {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}

/* Budget options */
.fb-lw-budgets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fb-lw-budget-btn {
  background: #f5f7fa;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
  color: #444;
  text-align: left;
}
.fb-lw-budget-btn:hover {
  background: #e8f0fe;
  border-color: #1a73e8;
}
.fb-lw-budget-btn.selected {
  background: #e8f0fe;
  border-color: #1a73e8;
  color: #1a73e8;
  font-weight: 600;
}

/* Form inputs */
.fb-lw-field {
  margin-bottom: 12px;
}
.fb-lw-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.fb-lw-field input,
.fb-lw-field textarea,
.fb-lw-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Source Sans Pro', sans-serif;
  color: #333;
  background: #fafafa;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}
.fb-lw-field input:focus,
.fb-lw-field textarea:focus,
.fb-lw-field select:focus {
  outline: none;
  border-color: #1a73e8;
  background: #fff;
}
.fb-lw-field textarea {
  resize: vertical;
  min-height: 60px;
}
.fb-lw-field input.error,
.fb-lw-field textarea.error,
.fb-lw-field select.error {
  border-color: #e53935;
}

/* Buttons */
.fb-lw-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Source Sans Pro', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 8px;
}
.fb-lw-btn-primary {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: #fff;
}
.fb-lw-btn-primary:hover {
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
}
.fb-lw-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.fb-lw-btn-back {
  background: none;
  color: #888;
  font-size: 13px;
  padding: 8px;
  margin-top: 4px;
}
.fb-lw-btn-back:hover {
  color: #333;
}

/* Skip link */
.fb-lw-skip {
  display: block;
  text-align: center;
  color: #aaa;
  font-size: 12px;
  margin-top: 8px;
  cursor: pointer;
  text-decoration: none;
}
.fb-lw-skip:hover {
  color: #666;
}

/* Success state */
.fb-lw-success {
  text-align: center;
  padding: 20px 0;
}
.fb-lw-success .success-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.fb-lw-success h4 {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px;
}
.fb-lw-success p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* Mobile responsive */
@media (max-width: 480px) {
  #fb-lead-widget-trigger {
    bottom: 16px;
    right: 16px;
    padding: 12px 16px 12px 14px;
    font-size: 14px;
  }
  #fb-lead-widget-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
  }
}
