/**
 * Share a lead — modal, floating CTA, flash alerts
 */

:root {
  --ls-ink: #0f172a;
  --ls-muted: #64748b;
  --ls-red: #ff1212;
  --ls-red-deep: #c4121a;
  --ls-red-soft: #fff5f5;
  --ls-border: rgba(225, 29, 72, 0.14);
  --ls-radius: 16px;
  --ls-font: "Plus Jakarta Sans", "Poppins", system-ui, sans-serif;
}

.lead-share-modal .modal-content {
  border: none;
  border-radius: calc(var(--ls-radius) + 4px);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.22);
}

.lead-share-modal .modal-header {
  position: relative;
  overflow: hidden;
  border: 0;
  background: linear-gradient(135deg, #1b2440 0%, #0c1326 100%);
  color: #fff;
  padding: 1.15rem 1.35rem;
}

.lead-share-modal .modal-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px 180px at 85% -30%, rgba(255, 18, 18, 0.42), transparent 60%);
  pointer-events: none;
}

.lead-share-modal .modal-title {
  position: relative;
  z-index: 1;
  font-family: var(--ls-font);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.2rem;
  margin: 0;
}

.lead-share-modal .modal-title i {
  color: #fca5a5;
}

.lead-share-modal .btn-close {
  position: relative;
  z-index: 1;
  filter: invert(1) grayscale(1) brightness(2);
}

.lead-share-modal .modal-body {
  padding: 1.35rem 1.5rem 1.5rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.lead-share-modal .ls-intro {
  margin: 0 0 1.15rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ls-muted);
}

.lead-share-modal .ls-section {
  margin-bottom: 1.1rem;
}

.lead-share-modal .ls-section__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  font-family: var(--ls-font);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9f1239;
}

.lead-share-modal .form-label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ls-muted);
  margin-bottom: 0.35rem;
}

.lead-share-modal .form-control,
.lead-share-modal .form-select {
  border-radius: 12px;
  border-color: #e2e8f0;
  font-size: 0.92rem;
}

.lead-share-modal .form-control:focus,
.lead-share-modal .form-select:focus {
  border-color: rgba(255, 18, 18, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(255, 18, 18, 0.1);
}

.lead-share-modal .lead-target-extra {
  display: none;
}

.lead-share-modal .lead-target-extra.is-visible {
  display: block;
}

.lead-share-modal .ls-member-picker {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.lead-share-modal .ls-member-picker__empty {
  font-size: 0.88rem;
  color: var(--ls-muted);
}

.lead-share-modal .ls-member-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.45rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lead-share-modal .ls-member-option:hover {
  background: var(--ls-red-soft);
}

.lead-share-modal .ls-member-option + .ls-member-option {
  margin-top: 0.15rem;
}

.lead-share-modal .ls-member-option input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.lead-share-modal .ls-member-option__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ls-ink);
  line-height: 1.35;
}

.lead-share-modal .ls-member-picker__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.lead-share-modal .ls-member-picker__tool {
  appearance: none;
  border: 1px solid var(--ls-border);
  background: #fff;
  color: var(--ls-muted);
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.lead-share-modal .ls-member-picker__tool:hover {
  background: var(--ls-red-soft);
  color: #9f1239;
}

.lead-share-modal .ls-hint {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--ls-red-soft);
  border: 1px solid var(--ls-border);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ls-muted);
}

.lead-share-modal .ls-guest {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--ls-radius);
  background: #fff;
  border: 1px dashed rgba(15, 23, 42, 0.12);
}

.lead-share-modal .ls-guest__icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ls-red-soft);
  color: var(--ls-red-deep);
  font-size: 1.25rem;
}

.lead-share-modal .ls-guest__title {
  margin: 0 0 0.4rem;
  font-family: var(--ls-font);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ls-ink);
}

.lead-share-modal .ls-guest__text {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--ls-muted);
  line-height: 1.55;
}

.lead-share-modal .ls-guest__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.lead-share-modal .ls-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
}

.lead-share-modal .ls-btn--primary {
  background: linear-gradient(135deg, #ff1212, #e11d48);
  color: #fff;
}

.lead-share-modal .ls-btn--outline {
  background: #fff;
  border-color: var(--ls-border);
  color: var(--ls-ink);
}

.lead-share-modal .modal-footer {
  border-top: 1px solid #e2e8f0;
  background: #fff;
  padding: 1rem 1.35rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lead-share-modal .modal-footer .btn-primary {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  background: linear-gradient(135deg, #ff1212, #e11d48);
  border: 0;
}

.lead-share-modal .modal-footer .btn-outline-secondary {
  border-radius: 999px;
}

.lead-share-flash-wrap {
  position: relative;
  z-index: 1040;
}

.lead-share-flash-wrap .alert {
  border-radius: 14px;
  border: none;
  font-size: 0.92rem;
}

.floating-lead-cta {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 1030;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  font-weight: 650;
  font-size: 0.88rem;
  background: #fff;
  border: 2px solid rgba(255, 18, 18, 0.35);
  color: var(--ls-red-deep);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.modal-open .floating-lead-cta,
body.modal-open .floating-cta {
  display: none !important;
  pointer-events: none;
}

.floating-lead-cta:hover {
  transform: translateY(-2px);
  background: var(--ls-red-soft);
  border-color: var(--ls-red);
  color: var(--ls-red-deep);
  box-shadow: 0 16px 32px rgba(225, 29, 72, 0.18);
}

@media (max-width: 767.98px) {
  .floating-lead-cta {
    right: 12px;
    bottom: 78px;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
  }

  .lead-share-modal .modal-body {
    padding: 1.1rem 1.15rem 1.25rem;
  }

  .lead-share-modal .modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 0.85rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }

  .lead-share-modal .modal-footer .btn {
    width: 100%;
    margin: 0;
  }
}
