/* dashboard/static/style-segmented-control.css
   Shared pill segmented control — marketing audience/plan toggles, login role
   picker, SPA .seg, and pipeline outreach buttons. Requires style-tokens.css. */

/* ── Track ─────────────────────────────────────────────────── */
.seg,
.m-hero-tabs,
.m-plan-tabs,
.role-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--lp-surface-1);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-r-pill);
  width: fit-content;
}

.role-tabs {
  display: flex;
  width: 100%;
}

/* Glass track variant — frosted bar matching marketing nav (.m-nav).
   Apply only where needed (e.g. homepage floating audience toggle). */
.seg--glass,
.m-hero-tabs.seg--glass,
.m-plan-tabs.seg--glass,
.role-tabs.seg--glass {
  background: var(--lp-glass-bg);
  backdrop-filter: var(--lp-glass-blur);
  -webkit-backdrop-filter: var(--lp-glass-blur);
  border-color: var(--lp-border-soft);
}

/* ── Segment button ────────────────────────────────────────── */
.seg__btn,
.m-hero-tab,
.m-plan-tab,
.role-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--lp-r-pill);
  background: transparent;
  color: var(--lp-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.role-tab {
  flex: 1;
  font-size: 13px;
  padding: 10px 12px;
}

.role-tab .ph-light {
  font-size: 16px;
  line-height: 1;
}

.seg__btn {
  font-size: 12px;
  padding: 5px 12px;
}

/* ── Hover (inactive) ──────────────────────────────────────── */
.seg__btn:hover:not(.seg__btn--active):not(:disabled),
.m-hero-tab:hover:not(.m-hero-tab-active),
.m-plan-tab:hover:not(.m-plan-tab-active),
.role-tab:hover:not(.is-active) {
  color: var(--lp-text);
  background: rgba(var(--lp-primary-rgb), 0.08);
}

/* ── Selected — high-contrast primary fill ─────────────────── */
.seg__btn--active,
.m-hero-tab-active,
.m-plan-tab-active,
.role-tab.is-active {
  background: var(--lp-primary);
  color: #fff;
  box-shadow: var(--lp-shadow-sm);
  font-weight: 700;
}

.seg__btn--active:hover,
.m-hero-tab-active:hover,
.m-plan-tab-active:hover,
.role-tab.is-active:hover {
  background: var(--lp-primary-hover);
  color: #fff;
}

/* ── Focus ─────────────────────────────────────────────────── */
.seg__btn:focus-visible,
.m-hero-tab:focus-visible,
.m-plan-tab:focus-visible,
.role-tab:focus-visible,
.pipeline-email-outreach-btn:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}

.seg__btn--active:focus-visible,
.m-hero-tab-active:focus-visible,
.m-plan-tab-active:focus-visible,
.role-tab.is-active:focus-visible,
.pipeline-email-outreach-btn.is-active:focus-visible {
  outline-color: #fff;
}

/* ── Rectangular outreach segmented control ────────────────── */
.pipeline-email-outreach-toggle {
  display: inline-flex;
  gap: 0;
  flex-shrink: 0;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-r-pill);
  overflow: hidden;
  background: var(--lp-surface-1);
}

.pipeline-email-outreach-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  border-right: 1px solid var(--lp-border);
  color: var(--lp-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.pipeline-email-outreach-btn:last-child {
  border-right: none;
}

.pipeline-email-outreach-btn:hover:not(.is-active) {
  background: rgba(var(--lp-primary-rgb), 0.08);
  color: var(--lp-text);
}

.pipeline-email-outreach-btn.is-active {
  background: var(--lp-primary);
  color: #fff;
  font-weight: 700;
}

.pipeline-email-outreach-btn.is-active:hover {
  background: var(--lp-primary-hover);
  color: #fff;
}
