/* ─── Nutrichum brand tokens ─────────────────────────────────────────────
   Source: wwwroot/marketing/design_handoff_nutrichum_brand/README.md */
:root {
    --color-brand-primary: #388E3C; /* Forest — wordmark, headlines, primary buttons */
    --color-brand-leaf:    #4CAF50; /* Leaf   — secondary brand surfaces, success    */
    --color-brand-sprout:  #81C784; /* Sprout — backgrounds, illustrations           */
    --color-accent-carrot: #FF9800; /* Carrot — CTAs, highlights, "chum"             */
    --color-accent-coral:  #FF8A65; /* Coral  — secondary accent, human-warm icons   */
    --color-data-berry:    #5C6BC0; /* Berry  — chart series, info states            */
    --color-ink:           #2E3B2E; /* Body text, monochrome logo                    */
    --color-paper:         #FAFAF5; /* Page background                               */
    --color-line:          rgba(46, 59, 46, 0.10);
    --color-line-strong:   rgba(46, 59, 46, 0.18);

    --radius-card: 14px;
    --radius-pill: 999px;

    --shadow-card-hover: 0 1px 0 rgba(46,59,46,0.04), 0 24px 48px -32px rgba(46,59,46,0.18);
}

/* Brand typography utilities (opt-in — MudBlazor's Typo system stays default for app surfaces). */
.brand-display-xl { font-size: 54px; font-weight: 700; letter-spacing: -0.02em; }
.brand-display-l  { font-size: 44px; font-weight: 700; letter-spacing: -0.035em; }
.brand-display-m  { font-size: 32px; font-weight: 600; letter-spacing: -0.015em; }
.brand-heading-l  { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
.brand-heading-m  { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.brand-body       { font-size: 16px; font-weight: 400; line-height: 1.55; }
.brand-body-s     { font-size: 14px; font-weight: 400; line-height: 1.6; }
.brand-eyebrow    { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.brand-mono-label { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }

.brand-logo { display: inline-block; vertical-align: middle; }

html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-feature-settings: "ss01", "cv11";
    margin: 0;
    padding: 0;
    background-color: var(--color-paper);
    color: var(--color-ink);
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
}

.invalid {
    outline: none;
}

.blazor-error-boundary {
    background: #EF5350;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Generic validation-error text (used by Blazor's <ValidationMessage>). */
.validation-message {
    font-size: 0.8rem;
    color: #EF5350;
    margin-top: 0.125rem;
}

/* Native <select> wrapper used on Register / CompleteBusinessRegistration where
   MudSelect's popover-based control isn't compatible with static SSR form-post.
   Styled to match MudTextField Variant.Outlined so the form looks cohesive. */
.form-select-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-select-group label {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 400;
    padding-left: 0.25rem;
}

.form-select-group select {
    width: 100%;
    padding: 0.875rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    background: #fff;
    font-size: 1rem;
    font-family: inherit;
    color: rgba(0, 0, 0, 0.87);
    transition: border-color 150ms;
}

.form-select-group select:hover {
    border-color: rgba(0, 0, 0, 0.87);
}

.form-select-group select:focus {
    outline: none;
    border-color: var(--mud-palette-primary, #2e7d32);
    border-width: 2px;
    padding: calc(0.875rem - 1px) calc(0.75rem - 1px);
}

/* Plan-card radio-driven selector used on Register + CompleteBusinessRegistration. */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 150ms, box-shadow 150ms;
}

.plan-card:hover {
    border-color: var(--mud-palette-primary, #2e7d32);
}

.plan-card.selected {
    border-color: var(--mud-palette-primary, #2e7d32);
    border-width: 2px;
    padding: calc(1rem - 1px);
    box-shadow: 0 0 0 1px var(--mud-palette-primary, #2e7d32);
}

.plan-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-card-name {
    font-weight: 600;
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.87);
}

.plan-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-primary, #2e7d32);
    line-height: 1.2;
}

.plan-card-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.6);
}

.plan-card-desc {
    font-size: 0.8125rem;
    color: rgba(0, 0, 0, 0.6);
    min-height: 2.4em;
}

.plan-card-features {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
}

.plan-card-features li {
    padding: 0.125rem 0;
}

/* Static-SSR password strength meter (custom element from PasswordSetupStatic.razor.js).
   Used on pre-auth pages (Register, RegisterInvite, ResetPassword) that can't take a
   Blazor circuit. Shared across pages so it lives here, not in a .razor.css. */
password-strength {
    display: block;
}

password-strength .ps-meter {
    width: 100%;
    height: 6px;
    background-color: #EEEEEE;
    border-radius: 3px;
    overflow: hidden;
    margin: 0.25rem 0;
}

password-strength .ps-meter-fill {
    height: 100%;
    transition: width 150ms ease, background-color 150ms ease;
}

password-strength .ps-label {
    font-size: 0.8125rem;
    font-weight: 500;
    min-height: 1.2em;
}

password-strength .ps-requirements {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.8125rem;
}

password-strength .ps-requirements li {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.125rem 0;
    color: #757575;
}

password-strength .ps-requirements li.ok {
    color: #2E7D32;
}

password-strength .ps-bullet {
    display: inline-block;
    width: 1em;
    text-align: center;
    font-weight: 600;
}

/* Password strength meter (PasswordStrengthMeter.razor) */
.password-strength .password-requirements {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.8125rem;
}

.password-strength .password-requirements li {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0;
    color: #757575;
}

.password-strength .password-requirements li.ok {
    color: #2E7D32;
}

/* Status message styles */
.status-message {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.status-error {
    background: #FDECEA;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.status-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.status-icon {
    flex-shrink: 0;
}

/* External login picker override */
.form-horizontal {
    margin-top: 1rem;
}

.form-horizontal .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: #5A6B5A;
    border: 1.5px solid #E0E0D5;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    margin-right: 0.5rem;
}

.form-horizontal .btn-primary:hover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.04);
    color: #2E3B2E;
}

/* Passkey button (inherits from btn-link class) */
.passkey-button,
.btn-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    color: #5A6B5A;
    border: 1.5px solid #E0E0D5;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.passkey-button:hover,
.btn-link:hover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.04);
    color: #2E3B2E;
    text-decoration: none;
}

/* Plan selection cards */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.plan-card {
    display: block;
    border: 1.5px solid #E0E0D5;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.plan-card:hover {
    border-color: #81C784;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.plan-card-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-card:has(.plan-card-radio:checked) {
    border-color: #4CAF50;
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.18);
    background: rgba(76, 175, 80, 0.03);
}

.plan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.plan-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2E3B2E;
}

.plan-card-badge {
    background: #E8F5E9;
    color: #2E7D32;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.plan-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 0.25rem;
}

.plan-card-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9E9E9E;
}

.plan-card-desc {
    font-size: 0.78rem;
    color: #7A8A7A;
    margin-bottom: 0.5rem;
}

.plan-card-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.78rem;
    color: #5A6B5A;
}

.plan-card-features li {
    padding: 0.1rem 0;
}

@media (max-width: 640px) {
    .plan-cards {
        grid-template-columns: 1fr;
    }
}
