/* Local font: Zilla Slab (from wwwroot/dist/2.0.2/assets/fonts/...) */
@font-face {
    font-family: "Zilla Slab";
    src: url("../dist/2.0.2/assets/fonts/ZillaSlab/woff2/ZillaSlab-Regular.woff2") format("woff2"),
         url("../dist/2.0.2/assets/fonts/ZillaSlab/woff/ZillaSlab-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Zilla Slab";
    src: url("../dist/2.0.2/assets/fonts/ZillaSlab/woff2/ZillaSlab-Italic.woff2") format("woff2"),
         url("../dist/2.0.2/assets/fonts/ZillaSlab/woff/ZillaSlab-Italic.woff") format("woff");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Zilla Slab";
    src: url("../dist/2.0.2/assets/fonts/ZillaSlab/woff2/ZillaSlab-Bold.woff2") format("woff2"),
         url("../dist/2.0.2/assets/fonts/ZillaSlab/woff/ZillaSlab-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Zilla Slab";
    src: url("../dist/2.0.2/assets/fonts/ZillaSlab/woff2/ZillaSlab-BoldItalic.woff2") format("woff2"),
         url("../dist/2.0.2/assets/fonts/ZillaSlab/woff/ZillaSlab-BoldItalic.woff") format("woff");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

html, body {
    font-family: "Plus Jakarta Sans", PlusJakartaSans, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    overflow-x: hidden; /* prevent 100vw full-bleed backgrounds from causing scroll */
}

@supports (overflow-x: clip) {
    html, body {
        overflow-x: clip;
    }
}

h1:focus {
    outline: none;
}

/* Override KDS/AEM default serif H1. */
h1 {
    font-family: "Zilla Slab", ZillaSlab, serif !important;
    font-weight: 700 !important;
    color: #001849 !important;
}

h2, h3, h4, h5, h6 {
    color: #001849 !important;
}

/* PLC detail: ensure "Application type: ..." uses Zilla Slab like the H1. */
.plc-application-type-heading {
    font-family: "Zilla Slab", ZillaSlab, serif !important;
    font-weight: 700;
}

/* PLC detail: section headers (e.g., Overview) should match Zilla Slab. */
.plc-section-heading {
    font-family: "Zilla Slab", ZillaSlab, serif !important;
    font-weight: 700;
}

/* Enforce app-wide typography (including injected AEM fragments). */
.app-shell,
#aem-header,
#aem-breadcrumb,
#aem-footer {
    font-family: "Plus Jakarta Sans", PlusJakartaSans, system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

/* Keep code blocks readable (monospace). */
code, pre, kbd, samp {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

/* Main content alignment: match AEM header/breadcrumb/footer container width/gutters */
.app-container {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    /* Match Bootstrap `.container` gutter (1.5rem / 2) */
    padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
}

@media (min-width: 1200px) {
    .app-container {
        max-width: 75pc;
        padding-left: 0;
        padding-right: 0;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD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OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.loading-progress {
    /* Spinner removed from `wwwroot/index.html` (keep class harmless). */
    display: none !important;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    /* Spinner removed from `wwwroot/index.html` (keep class harmless). */
    display: none !important;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* AEM header: extend banner background + divider lines full width (no layout shift) */
#aem-header .cmp-header__banner,
#aem-header .cmp-header__navbar,
#aem-header .cmp-header__nav {
    position: relative;
    z-index: 0;
    isolation: isolate;
}

/* Full-bleed banner background behind constrained content */
#aem-header .cmp-header__banner::before {
    content: "";
    position: absolute;
    inset: 0;
    left: 50%;
    width: 100vw;
    width: 100dvw;
    transform: translateX(-50%);
    background-color: #e8edff; /* fallback */
    background-color: inherit; /* match AEM .cmp-header__banner without hard-coding */
    z-index: -1;
    pointer-events: none;
}

/* Replace constrained divider borders with full-bleed equivalents */
#aem-header .cmp-header__navbar,
#aem-header .cmp-header__nav {
    border-bottom-color: transparent !important;
}

#aem-header .cmp-header__navbar::before,
#aem-header .cmp-header__nav::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 100vw;
    width: 100dvw;
    transform: translateX(-50%);
    border-bottom: 1px solid #c5c6d0; /* matches AEM dividers */
    pointer-events: none;
}

/* Mobile-only top divider inside navbar (AEM uses :after with width:100%) */
@media (max-width: 991.98px) {
    #aem-header .cmp-header__navbar:after {
        left: 50% !important;
        width: 100vw !important;
        width: 100dvw !important;
        transform: translateX(-50%);
    }
}

/* AEM footer: extend legal bar background full width (no layout shift) */
#aem-footer .cmp-footer__legal {
    position: relative;
    z-index: 0;
    isolation: isolate;
}

#aem-footer .cmp-footer__legal::before {
    content: "";
    position: absolute;
    inset: 0;
    left: 50%;
    width: 100vw;
    width: 100dvw;
    transform: translateX(-50%);
    background-color: #dfe8ff; /* fallback */
    background-color: inherit; /* match AEM .cmp-footer__legal */
    z-index: -1;
    pointer-events: none;
}

/* AEM footer typography: ensure Google Font name matches */
#aem-footer .cmp-footer__col-content__header {
    font-family: "Plus Jakarta Sans", PlusJakartaSans, system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

/* AEM footer: hide scriptcomponent container (prevents blank 175px footer block) */
#aem-footer .scriptcomponent.aem-GridColumn {
    display: none !important;
}

/* AEM footer social icons: ensure newer brand glyphs exist (Bluesky/Threads/WhatsApp) */
@font-face {
    font-family: "remixicon-pa-social";
    src: url("https://cdn.jsdelivr.net/npm/remixicon@4.9.1/fonts/remixicon.woff2") format("woff2");
    font-display: swap;
}

#aem-footer .cmp-social-share i[class^="ri-"],
#aem-footer .cmp-social-share i[class*=" ri-"] {
    font-family: "remixicon-pa-social" !important;
    font-style: normal;
    font-weight: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
    line-height: 1;
}

#aem-footer .cmp-social-share .ri-facebook-fill:before { content: "\ecbc" !important; }
#aem-footer .cmp-social-share .ri-twitter-x-fill:before { content: "\f3e5" !important; }
#aem-footer .cmp-social-share .ri-bluesky-fill:before { content: "\f498" !important; }
#aem-footer .cmp-social-share .ri-threads-fill:before { content: "\f3df" !important; }
#aem-footer .cmp-social-share .ri-instagram-fill:before { content: "\ee65" !important; }
#aem-footer .cmp-social-share .ri-tiktok-fill:before { content: "\f372" !important; }
#aem-footer .cmp-social-share .ri-youtube-fill:before { content: "\f2d4" !important; }
#aem-footer .cmp-social-share .ri-flickr-fill:before { content: "\f328" !important; }
#aem-footer .cmp-social-share .ri-whatsapp-fill:before { content: "\f2bb" !important; }

/* Breadcrumb alignment: match main content container */
#aem-breadcrumb {
    /* prevents any inherited grid padding from drifting */
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* Bootstrap sets `.breadcrumb{display:flex}`; don't let that affect layout */
    display: block !important;
}

/* Match `.app-container` sizing/gutters so breadcrumb aligns with main content. */
#aem-breadcrumb .cmp-breadcrumb {
    margin-left: auto;
    margin-right: auto;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    /* Match Bootstrap `.container` gutter (1.5rem / 2) */
    padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5) !important;
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5) !important;
}

@media (min-width: 1200px) {
    #aem-breadcrumb .cmp-breadcrumb {
        max-width: 75pc !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
