/* Shared dark theme for the mock onboarding flow (Start/Provisioning/Setup/Ready).
   Scoped under `.onb-dark` so it never affects any other page. Same palette as
   Pricing.razor.css / academy-dark.css for visual consistency across the flow. */

.onb-dark {
    /* Values match the authoritative Design System v3 dark-mode tokens
       (colors.css: --dark-bg/--dark-surface/.../--gold) 1:1 — do not drift from those. */
    --onb-bg: #080F1A;
    --onb-surface: #0D1B2E;
    --onb-surface-alt: #152336;
    --onb-border: #1E2F45;
    --onb-text: #FFFFFF;
    --onb-text-2: #CBD5E1;
    --onb-text-muted: #64748B;
    --onb-gold: #F4A623;
    --onb-success: #4ADE80;
    --onb-success-bg: #10261A;
    /* --onb-primary/-text follow colors.css's [data-theme="dark"] --primary/--primary-text
       swap (gold-on-navy in dark, navy-on-white in light) — this is what the design's
       shared Button "primary" variant actually renders, not a fixed brand gold. */
    --onb-primary: var(--onb-gold);
    --onb-primary-text: #1c1305;
    --onb-link: #6C9BFF;

    background: var(--onb-bg);
    color: var(--onb-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Light-mode counterpart, same variable set — colors.css's Design System v3 light-mode raw
   tokens (--light-bg/--light-surface/.../--navy), not the older app.css "ivory" academy
   palette (a different, pre-redesign theme still used by other, non-onboarding pages). */
.onb-light {
    --onb-bg: #F0F2F5;
    --onb-surface: #FFFFFF;
    --onb-surface-alt: #F8F7F4;
    --onb-border: #E2E6EB;
    --onb-text: #0B1F3A;
    --onb-text-2: #555555;
    --onb-text-muted: #8A8A8A;
    --onb-gold: #F4A623;
    --onb-success: #22C55E;
    --onb-success-bg: #E9F7EE;
    --onb-primary: #0B1F3A;
    --onb-primary-text: #FFFFFF;
    --onb-link: #2D6CDF;

    background: var(--onb-bg);
    color: var(--onb-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 64px logo header used by the pre-auth onboarding screens (Start, Setup) */
.onb-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.onb-dark .text-muted,
.onb-light .text-muted {
    color: var(--onb-text-2) !important;
}

.onb-dark .form-label,
.onb-dark label,
.onb-light .form-label,
.onb-light label {
    color: var(--onb-text);
}

.onb-input {
    background-color: var(--onb-surface) !important;
    border: 1px solid var(--onb-border) !important;
    color: var(--onb-text) !important;
    /* Design System v3 gives text inputs a 52px raw height (see the v2 onboarding mockup's
       password field) — Bootstrap's default .form-control height is noticeably shorter. */
    height: 52px;
}

.onb-input::placeholder {
    color: var(--onb-text-muted);
}

.onb-input:focus {
    border-color: var(--onb-gold) !important;
    box-shadow: 0 0 0 0.2rem rgba(244, 166, 35, 0.15) !important;
}

/* Room for the absolutely-positioned show/hide eye icon (.onb-input-eye-btn) inside the field */
.onb-input-pw {
    padding-right: 44px !important;
}

.onb-input-eye-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--onb-text-muted);
    cursor: pointer;
}

.onb-input-eye-btn:hover {
    color: var(--onb-text);
}

/* Bordered trust pill (GDPR-native · EU-hosted · ...) */
.onb-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--onb-border);
    border-radius: 20px;
    background: var(--onb-surface);
    color: var(--onb-text-2);
    font-size: 0.85rem;
}

.onb-trust-pill svg {
    color: var(--onb-success);
    flex: none;
}

/* Reset the site-wide .btn uppercase/sharp-corner treatment (app.css) for onboarding buttons */
.onb-dark .btn,
.onb-light .btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: none;
    letter-spacing: normal;
    font-size: 1rem;
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
}

/* Bootstrap 5.3 drives .btn's hover/active/disabled colours from --bs-btn-* variables,
   in rules specific enough ((0,2,0) for :hover, (0,3,0) for :active) to beat a variant
   that only sets literal background/border at (0,1,0). Such a variant therefore keeps
   its resting look and falls back to the generic .btn defaults — transparent fill,
   transparent border — the moment it is hovered or pressed; on this dark background the
   primary button vanished under the cursor and flashed back out when it left. Point the
   variables at the same tokens as the literals below so every state resolves. */

/* Uses --onb-primary/-text, not a fixed gold — matches the design's shared Button
   "primary" variant, which is gold-on-navy in dark mode but navy-on-white in light. */
.onb-btn-primary {
    --bs-btn-bg: var(--onb-primary);
    --bs-btn-border-color: var(--onb-primary);
    --bs-btn-color: var(--onb-primary-text);
    --bs-btn-hover-bg: var(--onb-primary);
    --bs-btn-hover-border-color: var(--onb-primary);
    --bs-btn-hover-color: var(--onb-primary-text);
    --bs-btn-active-bg: var(--onb-primary);
    --bs-btn-active-border-color: var(--onb-primary);
    --bs-btn-active-color: var(--onb-primary-text);
    --bs-btn-disabled-bg: var(--onb-primary);
    --bs-btn-disabled-border-color: var(--onb-primary);
    --bs-btn-disabled-color: var(--onb-primary-text);
    background: var(--onb-primary);
    border: 1px solid var(--onb-primary);
    color: var(--onb-primary-text);
    font-weight: 600;
}

.onb-btn-primary:hover {
    filter: brightness(0.9);
    color: var(--onb-primary-text);
}

.onb-btn-outline {
    --bs-btn-bg: var(--onb-surface);
    --bs-btn-border-color: var(--onb-border);
    --bs-btn-color: var(--onb-text);
    --bs-btn-hover-bg: var(--onb-surface-alt);
    --bs-btn-hover-border-color: var(--onb-border);
    --bs-btn-hover-color: var(--onb-text);
    --bs-btn-active-bg: var(--onb-surface-alt);
    --bs-btn-active-border-color: var(--onb-border);
    --bs-btn-active-color: var(--onb-text);
    --bs-btn-disabled-bg: var(--onb-surface);
    --bs-btn-disabled-border-color: var(--onb-border);
    --bs-btn-disabled-color: var(--onb-text);
    background: var(--onb-surface);
    border: 1px solid var(--onb-border);
    color: var(--onb-text);
}

.onb-btn-outline:hover {
    background: var(--onb-surface-alt);
    color: var(--onb-text);
}

/* Vipps brand button (Design System v3 login screen) */
.onb-btn-vipps {
    --bs-btn-bg: #ff5b24;
    --bs-btn-border-color: #ff5b24;
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #e64f1c;
    --bs-btn-hover-border-color: #e64f1c;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #e64f1c;
    --bs-btn-active-border-color: #e64f1c;
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: #ff5b24;
    --bs-btn-disabled-border-color: #ff5b24;
    --bs-btn-disabled-color: #fff;
    background: #ff5b24;
    border: 1px solid #ff5b24;
    color: #fff;
    font-weight: 600;
}

.onb-btn-vipps:hover {
    background: #e64f1c;
    color: #fff;
}

/* Welcome.razor's Vipps button is a disabled "coming soon" placeholder (no Vipps OAuth/SSO
   integration exists yet) -- :hover above would otherwise still fire since it has no :disabled
   guard, misleadingly suggesting the button is interactive. */
.onb-btn-vipps:disabled {
    background: #ff5b24;
    border-color: #ff5b24;
    color: #fff;
    opacity: 0.55;
    cursor: not-allowed;
}

.onb-btn-vipps:disabled:hover {
    background: #ff5b24;
}

/* Small theme-matching "Coming soon" badge for a disabled SSO button (Welcome.razor's and
   Login.razor's Vipps buttons) -- deliberately not Bootstrap's .badge.text-bg-light, which
   renders as a bright white box that clashes with both the dark onboarding surface and the
   orange Vipps button. Uses "currentColor" so it inherits whatever text color its parent
   button already has (white on Vipps, --onb-text on the outline/Google button). */
.onb-badge-coming-soon {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: currentColor;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0.9;
}

/* ExternalLoginPicker (ASP.NET Identity scaffolding) renders Bootstrap's default
   btn-outline-secondary, which is unreadable against the dark background — reset it
   to match .onb-btn-outline so it fits the onboarding v2 look without touching the
   shared component itself. */
.onb-dark .btn-outline-secondary,
.onb-light .btn-outline-secondary {
    background: var(--onb-surface);
    border: 1px solid var(--onb-border);
    color: var(--onb-text);
}

.onb-dark .btn-outline-secondary:hover,
.onb-light .btn-outline-secondary:hover {
    background: var(--onb-surface-alt);
    color: var(--onb-text);
    border-color: var(--onb-border);
}

/* Gold accent inline link (Forgot password?, Create a workspace) */
.onb-link {
    color: var(--onb-gold);
    text-decoration: none;
    font-weight: 600;
}

.onb-link:hover {
    color: var(--onb-gold);
    text-decoration: underline;
}

/* "Selected: {plan} — add payment after setup" chip under the Welcome/Start heading —
   gold-bordered pill, matching the v2 mockup's chosenPlanName treatment. */
.onb-selected-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: 1px solid var(--onb-gold);
    border-radius: 16px;
    background: var(--onb-surface);
    font-size: 0.875rem;
    color: var(--onb-text);
}

.onb-chip-change-btn {
    background: var(--onb-surface-alt);
    border: none;
    border-radius: 16px;
    padding: 5px 11px;
    color: var(--onb-text-2);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.onb-chip-change-btn:hover {
    color: var(--onb-text);
}

.onb-chip-addon-note {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--onb-text-2);
}

/* Bootstrap's default alert-danger/alert-success are light-mode surfaces (pale pink/green)
   that clash hard against the dark background — swap in the Design System v3 status tokens
   for both themes so this matches the token file exactly instead of Bootstrap's own guess. */
.onb-dark .alert-danger {
    background: #2A1414;
    border-color: #3a1c1c;
    color: #F87171;
}

.onb-dark .alert-success {
    background: var(--onb-success-bg);
    border-color: #1a3a26;
    color: var(--onb-success);
}

.onb-light .alert-danger {
    background: #FDECEC;
    border-color: #F8D0D0;
    color: #B91C1C;
}

.onb-light .alert-success {
    background: var(--onb-success-bg);
    border-color: #CFEBD9;
    color: #15803D;
}

/* app.css sets a site-wide `h1, h2, h3 { font-family: Cormorant Garamond }` rule;
   the Design System v3 typography tokens mandate Inter-only headings (fw-semibold,
   fs-h1 32px, lh 1.15, ls -0.02em) — this opts onboarding headings back into that. */
.onb-heading-strong {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--onb-text);
}

.onb-success-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: var(--onb-success-bg);
    color: var(--onb-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto;
}

.onb-workspace-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--onb-surface);
    border: 1px solid var(--onb-border);
    border-radius: 24px;
    padding: 8px 12px 8px 8px;
}

.onb-workspace-pill-avatar {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    background: var(--onb-gold);
    color: #1c1305;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.onb-pill-divider {
    width: 1px;
    height: 16px;
    flex: none;
    background: var(--onb-border);
}

.onb-plan-badge {
    color: var(--onb-gold);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* CSS-only suffix so the visual reads "FREE PLAN" while the underlying
   data-testid element's text content stays just the plan name ("Free"). */
.onb-plan-badge::after {
    content: " plan";
}

.onb-muted-link {
    color: var(--onb-text-2);
    text-decoration: none;
}

.onb-muted-link:hover {
    color: var(--onb-text);
}

.onb-card {
    background: var(--onb-surface);
    border: 1px solid var(--onb-border);
    border-radius: 12px;
}

/* Larger cards on Configure (plan config, add-ons) — 18px/22px per the v2 mockup,
   layered on top of .onb-card rather than changing its shared 12px radius everywhere. */
.onb-card-lg {
    border-radius: 18px;
    padding: 22px;
}

.onb-icon-badge {
    flex: none;
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--onb-surface-alt);
    color: var(--onb-gold);
    align-items: center;
    justify-content: center;
}

/* Blue accent link (Change plan, Add coupon code) — Design System v3's --link token,
   distinct from .onb-link's gold (used for primary calls like Forgot password?). */
.onb-link-accent {
    background: transparent;
    border: none;
    color: var(--onb-link);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
}

.onb-link-accent:hover {
    color: var(--onb-link);
    text-decoration: underline;
}

.onb-seat-btn {
    width: 38px;
    height: 38px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--onb-surface-alt);
    border: 1px solid var(--onb-border);
    border-radius: 9px;
    color: var(--onb-text);
    padding: 0;
}

.onb-seat-btn:hover {
    background: var(--onb-border);
}

.onb-seat-input {
    width: 56px;
    height: 38px;
    text-align: center;
    background: var(--onb-bg) !important;
    border: 1px solid var(--onb-border) !important;
    border-radius: 9px;
    color: var(--onb-text) !important;
    font-weight: 600;
}

.onb-unlimited-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 20px;
    background: var(--onb-surface-alt);
    color: var(--onb-text);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Subscription-cycle option cards: bordered, not solid-filled, when selected — a small
   gold checkmark badge is what signals the current choice, text stays --onb-text either way. */
.onb-cycle-btn {
    text-align: left;
    flex: 1;
    min-width: 130px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--onb-border);
    background: var(--onb-surface);
    color: var(--onb-text);
}

.onb-cycle-btn.selected {
    border: 2px solid var(--onb-gold);
}

.onb-cycle-check {
    display: inline-flex;
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--onb-gold);
    color: #1c1305;
    align-items: center;
    justify-content: center;
}

.onb-persona-btn {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--onb-surface);
    border: 1px solid var(--onb-border);
    color: var(--onb-text);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    text-align: left;
    width: 100%;
    height: 100%;
}

.onb-persona-btn.selected {
    border-color: var(--onb-gold);
    border-width: 2px;
}

.onb-persona-btn .onb-persona-desc {
    color: var(--onb-text-2);
    font-size: 0.8rem;
}

.onb-persona-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--onb-surface-alt);
    color: var(--onb-text);
}

.onb-persona-btn.selected .onb-persona-icon {
    background: var(--onb-gold);
    color: #1c1305;
}

.onb-checklist i.done {
    color: var(--onb-gold);
}
