/* AccuTraX shared website header — FRONT02F.
   Desktop standard: 78px total, including the 4px red rule.
   Use these same classes and logo on each subsequently aligned page.
   Header-specific rules are deliberately independent of older page styles. */
:root {
    --atx-sh-height: 78px;
    --atx-sh-logo-width: 280px;
    --atx-sh-bg: #18191d;
    --atx-sh-red: #ed1c2e;
    --atx-sh-title-size: 18px;
    --atx-sh-action-size: 16px;
}
.atx-sh-header {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 18px;
    width: 100%;
    height: var(--atx-sh-height);
    padding: 0 32px 0 24px;
    border: 0;
    border-bottom: 4px solid var(--atx-sh-red);
    background: var(--atx-sh-bg);
    color: #fff;
    font: 700 var(--atx-sh-action-size)/22px Arial, Helvetica, sans-serif;
}
.atx-sh-header .atx-sh-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 16px;
    color: #fff;
    text-decoration: none;
}
.atx-sh-header .atx-sh-logo {
    display: block;
    flex: 0 0 auto;
    width: var(--atx-sh-logo-width);
    max-width: none;
    height: auto;
    margin: 0;
}
.atx-sh-header .atx-sh-title {
    margin: 0;
    padding: 0;
    color: #fff;
    font: 700 var(--atx-sh-title-size)/22px Arial, Helvetica, sans-serif;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}
.atx-sh-header .atx-sh-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    color: #fff;
    font: 700 var(--atx-sh-action-size)/22px Arial, Helvetica, sans-serif;
}
.atx-sh-header .atx-sh-actions > a,
.atx-sh-header .atx-sh-actions > button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.atx-sh-header .atx-sh-actions > button:disabled { cursor: wait; }
.atx-sh-header .atx-sh-actions > a:hover,
.atx-sh-header .atx-sh-actions > button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
.atx-sh-header a:focus-visible,
.atx-sh-header button:focus-visible { outline: 2px solid #ff6870; outline-offset: 2px; }
.atx-sh-header .atx-sh-divider {
    display: block;
    flex: 0 0 3px;
    width: 3px;
    height: 20px;
    background: var(--atx-sh-red);
}
/* Keep the existing portal's side menu and collage below the full-width header. */
.portal-shell.atx-sh-shell { grid-template-rows: var(--atx-sh-height) minmax(0, 1fr); }
.portal-shell.atx-sh-shell > .atx-sh-header { grid-column: 1 / -1; grid-row: 1; }
.portal-shell.atx-sh-shell > .portal-sidebar { grid-row: 2 / -1; }
.portal-shell.atx-sh-shell > .portal-logout-error { top: calc(var(--atx-sh-height) + 10px); }
/* Preserve FRONT02E's login feedback spacing. */
body.customer-login-page #status:not(:empty) { margin: 0 0 20px; }
@media (max-width: 900px) {
    :root { --atx-sh-logo-width: 220px; }
    .atx-sh-header { padding-left: 16px; padding-right: 16px; gap: 12px; }
    .atx-sh-header .atx-sh-brand { gap: 12px; }
    .atx-sh-header .atx-sh-actions { gap: 10px; }
}
@media (max-width: 680px) {
    :root { --atx-sh-logo-width: 160px; }
    .atx-sh-header { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 24px; gap: 0; padding: 0 16px 3px; }
    .atx-sh-header .atx-sh-title { white-space: normal; }
    .atx-sh-header .atx-sh-actions > a,
    .atx-sh-header .atx-sh-actions > button { min-height: 24px; }
}
@media (max-width: 420px) {
    :root { --atx-sh-logo-width: 130px; --atx-sh-title-size: 14px; --atx-sh-action-size: 14px; }
    .atx-sh-header .atx-sh-title { line-height: 18px; }
}

/* FRONT02G: public and legal pages use the unchanged FRONT02F header
   dimensions, image and typography. These extensions are page-specific. */
.atx-sh-header.atx-home-header {
    position: sticky;
    top: 0;
    z-index: 20;
}
.atx-sh-header.atx-home-header .atx-sh-brand,
.atx-sh-header.atx-legal-header .atx-sh-brand { flex: 1 1 auto; }
.atx-sh-header.atx-home-header .atx-sh-title,
.atx-sh-header.atx-legal-header .atx-sh-title { white-space: normal; }
.atx-sh-header.atx-home-header .atx-home-links > a { text-transform: uppercase; }
.atx-sh-header.atx-home-header .atx-home-links > a[aria-current="page"] { color: #ff686a; }
.atx-sh-header.atx-home-header .atx-home-toggle { display: none; }
.atx-home-page section[id] { scroll-margin-top: var(--atx-sh-height); }
.atx-legal-page #portal-logout-error {
    position: fixed;
    top: calc(var(--atx-sh-height) + 10px);
    right: 16px;
    z-index: 30;
    max-width: min(360px, calc(100% - 32px));
    margin: 0;
    padding: 12px 16px;
    color: #721e24;
    background: #fff5f5;
    border: 1px solid #cf292d;
    border-radius: 4px;
    font: 14px/1.5 Arial, Helvetica, sans-serif;
}
.atx-legal-page #portal-logout-error[hidden] { display: none; }
@media (max-width: 1200px) {
    .atx-sh-header.atx-home-header .atx-home-toggle { display: inline-flex; }
    .atx-sh-header.atx-home-header .atx-home-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: min(300px, 100%);
        padding: 12px 20px 18px;
        background: var(--atx-sh-bg);
        border-bottom: 4px solid var(--atx-sh-red);
        box-shadow: 0 8px 18px #0003;
        align-items: stretch;
        flex-direction: column;
        gap: 4px;
    }
    .atx-sh-header.atx-home-header .atx-home-links.open { display: flex; }
    .atx-sh-header.atx-home-header .atx-home-links > a { justify-content: flex-start; min-height: 40px; }
    .atx-sh-header.atx-home-header .atx-home-links > .atx-sh-divider { display: none; }
}
@media (max-width: 680px) {
    .atx-sh-header.atx-home-header .atx-sh-title,
    .atx-sh-header.atx-legal-header .atx-sh-title { line-height: 20px; }
}
@media (max-width: 420px) {
    .atx-sh-header.atx-home-header .atx-sh-title,
    .atx-sh-header.atx-legal-header .atx-sh-title { line-height: 18px; }
}
@media print {
    .atx-sh-header.atx-legal-header {
        height: auto;
        min-height: 54px;
        padding: 10px 0;
        border-bottom: 1px solid #111;
        background: white;
        color: #111;
    }
    .atx-sh-header.atx-legal-header .atx-sh-title { color: #111; }
    .atx-sh-header.atx-legal-header .atx-sh-logo { width: 180px; }
    .atx-sh-header.atx-legal-header .atx-sh-actions,
    .atx-legal-page #portal-logout-error { display: none !important; }
}
