/* Lead Capture Widget & Mobile Sticky Action Bar */
.lead-widget-container {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lead-capsule-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 10px 20px 10px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(197, 168, 128, 0.3);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.lead-capsule-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(197, 168, 128, 0.6);
  border-color: rgba(197, 168, 128, 0.5);
}

.lead-beacon {
  position: relative;
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.lead-beacon::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  animation: lead-pulse 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes lead-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

.lead-capsule-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.lead-capsule-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lead-capsule-sub {
  font-size: 10px;
  color: #c5a880;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.lead-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 20000 !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lead-modal-overlay.active {
  display: flex;
}

.lead-modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  animation: lead-fade-in 0.25s ease-out;
}

@keyframes lead-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.lead-modal-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 22px 24px;
  position: relative;
}

.lead-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff !important;
}

.lead-modal-header p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #94a3b8 !important;
}

.lead-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.lead-modal-body {
  padding: 24px;
}

.lead-quick-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.lead-channel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.lead-channel-tg {
  background: #0284c7;
  color: #ffffff;
}
.lead-channel-tg:hover { background: #0369a1; }

.lead-channel-wa {
  background: #16a34a;
  color: #ffffff;
}
.lead-channel-wa:hover { background: #15803d; }

.lead-modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: #94a3b8;
  font-size: 12px;
}
.lead-modal-divider::before, .lead-modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}
.lead-modal-divider span { padding: 0 10px; }

.lead-modal-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.lead-modal-form input,
.lead-modal-form textarea,
.lead-modal-form select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.lead-modal-form input:focus,
.lead-modal-form textarea:focus {
  border-color: #c5a880;
  outline: none;
  box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.2);
}

.lead-submit-btn {
  width: 100%;
  padding: 12px;
  background: #c5a880;
  color: #0f172a;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.lead-submit-btn:hover { background: #b39366; }

/* Mobile Sticky Bottom Action Bar (< 768px) */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 9998;
  padding: 0 10px;
  box-sizing: border-box;
}

.mobile-sticky-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 8px;
  height: 100%;
  align-items: center;
}

.mobile-sticky-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.mobile-btn-tg { background: #0284c7; }
.mobile-btn-wa { background: #16a34a; }
.mobile-btn-rfq { background: #c5a880; color: #0f172a; }

@media (max-width: 768px) {
  .lead-widget-container {
    display: none;
  }
  .mobile-sticky-bar {
    display: block;
  }
  body {
    padding-bottom: 60px !important;
  }
}


/* iPhone Fullscreen Safe Area Inset Support */
.mobile-sticky-bar {
  padding-bottom: max(6px, env(safe-area-inset-bottom, 6px)) !important;
  height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
