/*
 * WooCommerce "Min side" → "Sikkerhet og ansvar" account tab
 * (BareDykk\DiveSafe\Integration\WooCommerce\SafetyTabRenderer). Loaded
 * together with bd-tokens.css + admin.css (see AccountTabAssets), so the tab
 * inherits `.bds-admin-wrap`'s `.bd-card`/`.bd-status`/`.bd-empty`/`.bds-btn`
 * rules and only needs to add the classes NOT already defined there
 * (`.bd-action-list`/`.bd-action-row`). Only `--bd-*` tokens — never a
 * hardcoded hex value; dark mode is automatic via `html[data-theme="dark"]`
 * (no per-component dark rules needed here).
 */

.bds-account-safety-tab .bd-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.bds-account-safety-tab .bd-action-row {
  background: var(--bd-card);
  border: 1px solid var(--bd-line);
  border-radius: var(--bd-radius-sm);
  padding: 0;
}

/*
 * D-61(8): the whole task row is now a deep-link (SafetyTabRenderer's
 * `actionItemHref()`), not plain text — the anchor fills the `.bd-action-row`
 * card so the entire card is the click/tap target (UX-004 48px minimum).
 * `:focus-visible` (bd-tokens.css, global) already gives it a visible focus
 * ring — no per-component focus rule needed.
 */
.bds-account-safety-tab .bd-action-row__task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--bd-touch-min);
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
}

.bds-account-safety-tab .bd-action-row__task:hover {
  text-decoration: underline;
}

.bds-account-safety-tab .bd-action-row__chevron {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--bd-muted);
}

/* Quick-link / operational / admin buttons: UX-004 48px minimum touch target. */
.bds-account-safety-tab .bd-action-row__link {
  min-height: var(--bd-touch-min);
}

.bds-account-safety-tab .bds-account-safety-tab__status {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/*
 * D-40b "Sjekk forholdene" card — the `.bd-forhold-summary-grid`/`.bd-hint`
 * etc. classes it uses are defined once in admin.css (shared with the admin
 * "Forhold" page, {@see \BareDykk\DiveSafe\Admin\Pages\ConditionsPage}); only
 * this card's own wrapper layout is specific to the account tab.
 */
.bds-account-safety-tab .bds-account-safety-tab__conditions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/*
 * D-42 "Din vei til første dykk" card. `.bd-progress*` mirrors the PWA's own
 * rule set exactly (app/styles/app.css — `TrainingCourseView.tsx`/
 * `SigningView.tsx`'s item-progress bar), which is NOT part of the shared
 * admin.css bundle this tab loads (see AccountTabAssets), so it is defined
 * once here instead. Colour is never the only signal (UX-003): the numeric
 * "x av y steg fullført" label is always shown alongside the bar.
 */
.bds-account-safety-tab .bds-account-safety-tab__onboarding {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bds-account-safety-tab .bd-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bds-account-safety-tab .bd-progress__track {
  height: 10px;
  border-radius: 999px;
  background: var(--bd-grey);
  overflow: hidden;
}

.bds-account-safety-tab .bd-progress__bar {
  height: 100%;
  background: var(--bd-ok);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.bds-account-safety-tab .bd-progress__label {
  color: var(--bd-muted);
  font-size: 0.85rem;
}

/*
 * 360px baseline (CLAUDE.md): quick-link/action buttons go full-width below
 * 480px. The list deliberately STAYS a flex column here — an earlier
 * `display: block` override silently discarded the flex `gap`, and since
 * `.bd-action-row` cards carry no margin of their own, every card in
 * «Oppgaver»/lenkelistene collapsed edge-to-edge on mobile (found live by the
 * product owner on Min side). Flex + gap already stacks correctly on narrow
 * screens; only the links need the full-width treatment.
 */
@media (max-width: 480px) {
  .bds-account-safety-tab .bd-action-row__link {
    display: flex;
    justify-content: center;
    width: 100%;
  }
}
