/* =============================
   Reset & Base Styles
   ============================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

html,
body {
    height: 100%;
    margin: 0;
}

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.v2-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

img,
picture,
svg {
    max-width: 100%;
    display: block;
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

details > summary {
    list-style: none;
}

    details > summary::-webkit-details-marker {
        display: none;
    }

/* ADA / Keyboard Focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
}

/* Screen Reader Only — single canonical definition */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip navigation link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary-btn);
    color: var(--color-white);
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    z-index: 9999;
    border-radius: 0 0 4px 0;
}

    .skip-link:focus {
        top: 0;
        outline: 3px solid var(--color-white);
        outline-offset: 2px;
    }

.required {
    color: var(--color-required);
}

.d-none {
    display: none !important;
}

.v2-signin-tos a {
    color: var(--color-primary);
}

/* ── Inline validation error state (universal — used by all form pages) ── */
.form-group.has-error label,
.form-group.has-error .form-label,
.form-group.has-error .form-label .form-label {
    color: var(--color-error);
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--color-error) !important;
    background-color: #fff5f5;
}

    .form-group.has-error input:focus,
    .form-group.has-error select:focus,
    .form-group.has-error textarea:focus {
        outline-color: var(--color-error);
        border-color: var(--color-error) !important;
    }

.field-error {
    display: none;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-error);
    margin-top: 4px;
    line-height: 1.4;
}

.form-group.has-error .field-error {
    display: block;
    color: var(--color-error);
    margin-top: 5px;
}

/* Alerts */
.v2-alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

.v2-alert-danger {
    background: var(--color-alert-danger-bg);
    border: 1px solid var(--color-alert-danger-border);
    color: var(--color-alert-danger-text);
}

.v2-alert-success {
    background: var(--color-alert-success-bg);
    border: 1px solid var(--color-alert-success-border);
    color: var(--color-alert-success-text);
}

.v2-alert-warning {
    background: var(--color-alert-warning-bg);
    border: 1px solid var(--color-alert-warning-border);
    color: var(--color-alert-warning-text);
}

/* ════════════════════════════════════════════
   CHAT FAB
════════════════════════════════════════════ */
.v2-chat-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 46px;
    height: 46px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-fab);
    z-index: 300;
    transition: transform var(--transition-fast);
    border: none;
}

    .v2-chat-fab:hover {
        transform: scale(1.07);
    }

    .v2-chat-fab svg {
        width: 22px;
        height: 22px;
        color: var(--color-white);
    }

form#aspnetForm {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.v2-signin-tos {
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 14px;
    line-height: 1.5;
}

    .v2-signin-tos a {
        color: var(--color-primary);
    }
