/* ==========================================================================
   CSS Variables / Root Settings
   ========================================================================== */

   /*
   Breakpoints: #TODO: Breakpoints need to be confirmed
   - Mobile: max-width(768px)
        - QAT shrink to one column

   - Another one: max-width(879px)
        - Font adjustment
        - Shrink to nav hamburger
   - Another one: max-width(905px)
        - Font adjustment
   - Tablet-mini: max-width(992px)
        - QAT shrink to 2 columns
        - Navigation bar shrinks
   - Tablet: max-width(1023px)
   - Desktop: min-width(1024px) */

:root {
    /* Fonts */
    --heading-font: "Source Sans 3";
    --body-font: 'Source Sans 3';
    --noto-serif-jp: 'Noto Serif JP', serif;

    /* Layout */
    --container-width: 1440px;
    --component-button-radius: 4px;

    /* Brand Colors */
    --color-primary: #005EA2;
    --theme-color-primary: #005EA2;
    --color-secondary: #1A4480;
    --color-dark: #003366;
    --color-navy: #162E51;
    --color-darker: #07294D;
    --color-link: #005ea2;
    --color-link-hover: #003256;
    --color-hover: #0066cc;

    /* Background Colors */
    --color-white: #FFFFFF;
    --bg-white: #fff;
    --bg-muted: #e9ecef;
    --bg-info: #F1F9FC;
    --bg-info-alt: #E1F3F8;
    --bg-warning: #faf3cf;
    --bg-notice: #FAF3D1;

    /* Text Colors */
    --text-black: #000;
    --text-primary: #111;
    --text-secondary: #222;
    --text-muted: #333;
    --text-subtle: #555;
    --text-white: #fff;

    /* Border Colors */
    --border-light: #dcdcdc;
    --border-base: #dee2e6;
    --border-accent: #97D4EA;
    --border-medium: #A9AEB1;

    /* Alert/Status Colors */
    --color-danger: #B50909;
    --color-error: #b50909;
    --color-danger-dark: #990000;

    /* Shadow Colors */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.17);
    --shadow-dark: rgba(0, 0, 0, 0.33);
    --shadow-card: rgba(86, 92, 101, 0.10);

    /* Legacy/Deprecated (for compatibility) */
    --bg-neutral: rgb(240, 240, 240);
    --border-faint: #eee;
    --color-primary-legacy: rgba(0, 94, 162, 1.00);
}

/* ==========================================================================
        Ordered List Styles
        ========================================================================== */
ol {
    list-style-type: lower-alpha;
}
ol ol {
    list-style-type: decimal;
}
ol ol ol {
    list-style-type: lower-roman;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.font-heading {
    font-family: var(--heading-font), sans-serif;
}

.font-noto-serif-jp {
    font-family: var(--noto-serif-jp), serif;
}

body, p {
    -webkit-font-smoothing: antialiased;
    font-family: var(--body-font), sans-serif;
    font-size: 17px;
    line-height: 20px;
    font-weight: 400;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font), sans-serif;
    margin-bottom: 8px;
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-size: 32px;
    line-height: 38px;
    font-weight: 400;
}

h2 {
    font-size: 24px;
    line-height: 30px;
    font-weight: 600;
}

h3 {
    font-size: 20px;
    line-height: 25px;
    font-weight: 600;
}

h4 {
    font-size: 20px;
    line-height: 25px;
    font-weight: 600;
}

h5 {
    font-size: 20px;
    line-height: 25px;
    font-weight: 600;
}

h6 {
    font-size: 20px;
    line-height: 25px;
    font-weight: 600;
}

/* Links */
a {
    color: var(--color-link);
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

a.font-normal {
    font-weight: 400;
}

a:hover {
    text-decoration: underline;
    color: var(--color-link-hover);
}

/* Links inside headings - no underline by default, underline on hover */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    text-decoration: none;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
    text-decoration: underline;
}

/* Link utility classes */
.link-blue {
    color: var(--color-link);
}

.link-blue:hover {
    color: var(--color-link-hover);
}

.font-light-blue {
    color: var(--color-primary-legacy)
}

/* ==========================================================================
   Layout Components
   ========================================================================== */
/* Container Styles */
.grid-container {
    max-width: var(--container-width);
}

.wide-container {
    max-width: var(--container-width);
}

/* ==========================================================================
   UI Elements
   ========================================================================== */
/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 8px;
    padding: 8px 10px;
    height: 35px;
    width: 35px;
}

#scroll-to-top img {
    filter: brightness(0) invert(1);
    width: 25px;
    height: 25px;
    max-width: none;
}

@media (max-width: 1025px) {
    #scroll-to-top {
        width: 24px;
        height: 24px;
        border: white solid 1px;
        right: 4px;
    }

    #scroll-to-top img {
        width: 20px;
        height: 24px;
        max-width: none;
    }
}

/* Fade Animation */
.fade-in {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0s 0.5s;
}

.fade-in.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0s 0s;
}

/* Dividers */
hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid var(--border-faint);
    margin: 1em 0;
    padding: 0;
}

.foundry-divider-simple {
    margin: 17px 0 17px 0;
    border-top: 1px solid var(--border-faint);
    height: 0;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
/* Link-styled Buttons */
button.link {
    all: unset;
    color: blue;
    cursor: pointer;
    text-decoration: underline;
    display: inline;
}

button.link:hover {
    text-decoration: none;
}

.links.unindented {
    padding-left: 0;
}

.links {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.links a {
    font-weight: normal;
}

.blue-page-links-bar {
    display: flex;
    background-color: var(--color-primary-legacy);
    border-radius: 5px;
    gap: 10px;
}

.blue-page-links-bar a {
    flex-grow: 1;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: normal;
    font-size: .9rem;
    padding: 16px;
}

.blue-page-links-bar a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.blue-page-links-bar i {
    color: white;
    font-size: 2rem;
}

/* ==========================================================================
   Responsive Typography - Mobile
   ========================================================================== */
@media (max-width: 768px) {
    body, p {
        font-size: 16px;
        line-height: 20px;
    }
    p.usa-banner__header-action {
        font-size: .8rem;
    }


    h1 {
        font-size: 24px;
        line-height: 32px;
    }

    h2 {
        font-size: 20px;
        line-height: 22px;
    }

    h3 {
        font-size: 18px;
        line-height: 20px;
    }

    h4, h5, h6 {
        font-size: 18px;
        line-height: 20px;
    }

    .blue-page-links-bar {
        gap: 5px;
        border-radius: 3px;
    }

    .blue-page-links-bar a .title {
        display: none !important;
    }

    .blue-page-links-bar a {
        gap: 5px;
        font-size: 0.8rem;
        padding: 12px 6px;
    }

    .blue-page-links-bar i {
        font-size: 20px;
    }
}
