/*
 * app.css — BTIS Broker Pricing Portal
 * Global base styles.
 * Fonts: Raleway (everything), Kanit (brand/nav headings).
 */

/* ── Reset & base ────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1d2951;
    background-color: #f0f2f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ──────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    color: #1d2951;
    line-height: 1.3;
}

h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

a {
    color: #076e6c;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #1d2951;
    text-decoration: underline;
}

/* ── Blazor validation ───────────────────────────── */
.valid.modified:not([type=checkbox]) {
    outline: none;
    border-color: #27ae60;
}

.invalid {
    outline: none;
    border-color: #e74c3c !important;
}

.validation-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

/* ── Blazor error boundary ───────────────────────── */
.blazor-error-boundary {
    padding: 16px 16px 16px 3.7rem;
    background-color: #e74c3c;
    color: #fff;
    border-radius: 8px;
}

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

/* ── Selection ───────────────────────────────────── */
::selection {
    background: rgba(7, 110, 108, 0.15);
    color: #1d2951;
}

/* ── Scrollbar (subtle) ──────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d0d5da;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b0b8c1;
}

/* ── Password requirement checklist ──────────────────────────────────────────────────────────
   Rendered by Components/Shared/PasswordRequirements.razor, driven by
   wwwroot/js/password-requirements.js. Rules come from Application.Security.PasswordPolicy.

   The marker is a CSS-drawn circle rather than a glyph: the house style rules out emoji and
   decorative Unicode, and a circle that fills reads at a glance without relying on a font.
   ────────────────────────────────────────────────────────────────────────────────────────── */
.pw-requirements {
    margin: var(--space-2) 0 var(--space-4);
    padding: var(--space-3);
    background: var(--color-bg-light);
    border-left: 3px solid var(--color-border);
}

.pw-requirements--satisfied {
    border-left-color: var(--color-brand-accent);
}

.pw-requirements-intro {
    margin: 0 0 var(--space-2);
    font-size: var(--font-size-form);
    font-weight: 700;
    color: var(--color-text-body);
}

.pw-requirements-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pw-rule {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 2px 0;
    font-size: var(--font-size-form);
    color: var(--color-text-muted);
}

/* 50% radius is the one sanctioned use of a rounded corner in this design — a checklist tick. */
.pw-rule-marker {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: transparent;
}

.pw-rule--met {
    color: var(--color-brand-teal);
    font-weight: 600;
}

.pw-rule--met .pw-rule-marker {
    border-color: var(--color-brand-accent-dark);
    background: var(--color-brand-accent);
}

/* A disabled submit must look disabled, or the user simply thinks the button is broken. */
.btn-primary.is-disabled,
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
