/*
 * "Kuo galiu padėti?" lead chooser (src/components/leads/). Shared by /qr
 * (QrLayout) and /klientams (PublicLayout), so everything is scoped under
 * .lead-chooser and carries its own palette. Layout follows the chooser's
 * own width (container queries), not the viewport.
 */

.lead-chooser {
  --lc-ink: #15231d;
  --lc-paper: #fffef9;
  --lc-ground: #edf2e9;
  --lc-lime: #cdea81;
  --lc-cta: #e1493f;
  --lc-green-text: #2f7d33;
  --lc-muted: #4d5a53;
  --lc-line: #c8d0c8;
  --lc-field: #9aa79f;

  container-type: inline-size;
  color: var(--lc-ink);
}

.lead-chooser__title {
  margin: 0;
  color: var(--lc-ink);
  font-size: clamp(1.45rem, 6vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.lead-chooser__rule {
  margin: 0.4rem 0 1.1rem;
  color: var(--lc-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.lead-chooser [tabindex='-1']:focus {
  outline: none;
}

.lead-chooser [tabindex='-1']:focus-visible,
.lead-chooser button:focus-visible,
.lead-chooser a:focus-visible {
  outline: 3px solid #4cae50;
  outline-offset: 3px;
}

/* ---- Topic buttons ---- */

.lead-chooser__topics {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@container (min-width: 560px) {
  .lead-chooser__topics {
    grid-template-columns: 1fr 1fr;
  }
}

/* Text on top, price tag under it, arrow on the right: the label keeps the
   full width even on a 320 px phone. */
.lead-topic {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem 0.75rem;
  width: 100%;
  min-height: 76px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--lc-line);
  border-radius: 16px;
  background: var(--lc-paper);
  color: var(--lc-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.lead-topic:hover {
  border-color: var(--lc-ink);
  transform: translateY(-1px);
}

.lead-topic__text {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.lead-topic > .lead-topic__tag {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
}

.lead-topic__text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.lead-topic__text span {
  display: block;
  margin-top: 0.2rem;
  color: var(--lc-muted);
  font-size: 0.875rem;
  line-height: 1.35;
}

.lead-topic__tag {
  flex-shrink: 0;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--lc-lime);
  color: var(--lc-ink);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.lead-topic--paid .lead-topic__tag,
.lead-chooser__step-head .lead-topic__tag--paid {
  background: #fde7e5;
  color: #9b2c24;
}

.lead-topic__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--lc-muted);
}

/* ---- Step header ---- */

.lead-chooser__step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.75rem;
}

.lead-chooser__step-head h3 {
  margin: 0;
  color: var(--lc-ink);
  font-size: 1.25rem;
  font-weight: 800;
}

.lead-chooser__back {
  display: inline-flex;
  flex-basis: 100%;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lc-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lead-chooser__back svg {
  width: 1rem;
  height: 1rem;
}

.lead-chooser__note {
  margin: 0 0 0.75rem;
  color: var(--lc-muted);
}

.lead-chooser__alternatives {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.75rem;
}

.lead-chooser__link {
  min-height: 44px;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: var(--lc-green-text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---- Paid rates ---- */

.lead-paid__list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lead-paid__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 60px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--lc-line);
  border-radius: 14px;
  background: var(--lc-paper);
  color: var(--lc-ink);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.lead-paid__link:hover {
  border-color: var(--lc-ink);
}

.lead-paid__name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.lead-paid__name span {
  color: var(--lc-muted);
  font-size: 0.875rem;
}

.lead-paid__price {
  font-size: 1.1rem;
  font-weight: 800;
  white-space: nowrap;
}

.lead-paid__icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: var(--lc-muted);
}

.lead-paid__status {
  margin: 0;
  color: var(--lc-muted);
}

.lead-paid__status a {
  color: var(--lc-green-text);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .lead-topic,
  .lead-paid__link {
    transition: none;
  }

  .lead-topic:hover {
    transform: none;
  }
}
