/* ==========================================================================
   RangamWorks design system
   Single source of truth for member/job-seeker page tokens and primitives.

   Load order matters: this file is loaded BEFORE the shell stylesheets so its
   tokens are inherited by them. Nothing downstream may redefine a --rw-* token
   in :root -- scope any deliberate exception to a component class instead.

   Page anatomy:
     section.rw-page-shell            full-bleed background band
       div.rw-content-container       standard 1440px centred column
         header.rw-page-header        kicker + title + description + actions
         ...page content
   ========================================================================== */

:root {
    /* --- UI density ---------------------------------------------------- */
    /* Keep the browser's normal text size. Use spacing tokens for density,
       not a smaller root font that also shrinks labels and navigation. */
    --rw-ui-scale: 1;

    /* --- Brand + ink -------------------------------------------------- */
    --rw-primary: #0c61e7;
    --rw-primary-dark: #084db9;
    --rw-button-primary: #1769e8;
    --rw-button-primary-dark: #0f55c8;
    --rw-green: #16854b;
    --rw-ink: #172033;
    --rw-muted: #5d6678;
    --rw-border: #dce2ea;
    --rw-surface: #fff;
    --rw-canvas: #f5f7fa;
    --rw-soft: #f4f7fb;

    /* Alias kept so older rules that referenced the page background keep
       resolving to the one canvas colour. */
    --rw-page-bg: var(--rw-canvas);

    /* --- Layout ------------------------------------------------------- */
    /* Gutters, sidebar and header are in rem so they follow --rw-ui-scale.
       The two max-widths stay in px to keep the content column bounded.

       --rw-content-max matches .nwa-container on the public landing page
       (wwwroot/css/job-seeker/nwa-landing.css: width: min(1180px, calc(100% - 48px)))
       so a member's content column reads the same width switching from the marketing
       site into the signed-in shell, rather than suddenly spanning noticeably wider. */
    --rw-content-max: 1180px;
    --rw-content-wide-max: 1720px;
    --rw-page-gutter: clamp(1rem, 2vw, 1.75rem);
    --rw-page-space: clamp(.625rem, 1.2vw, .875rem);
    --rw-sidebar-width: 15.5rem;
    --rw-header-height: 3.25rem;

    /* --- Type scale --------------------------------------------------- */
    --rw-font-sans: Poppins, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* G42: the same scale as type-scale.css (--ts-*), which every layout loads first. It used to be 2pt smaller
       for display type and 14px for body, so an h3 here (14.3px) came out smaller than the paragraph under it. */
    --rw-text-kicker: var(--ts-small, .8125rem);
    --rw-text-sm: var(--ts-meta, .875rem);
    --rw-text-body: var(--ts-body, 1rem);
    --rw-text-lead: var(--ts-lead, 1rem);
    --rw-text-h3: var(--ts-h3, 1.0625rem);
    --rw-text-h2: var(--ts-h2, 1.25rem);
    --rw-text-h1: var(--ts-h1, 1.75rem);

    /* --- Shape + depth ------------------------------------------------ */
    --rw-radius: 12px;
    --rw-radius-sm: 8px;
    --rw-radius-pill: 999px;
    --rw-shadow-card: 0 6px 18px rgba(23, 35, 60, .06);
    --rw-focus-ring: 0 0 0 3px rgba(12, 97, 231, .25);
    --rw-focus-outline: 3px solid #0a3a85;

    /* --- Controls ----------------------------------------------------- */
    /* Stays in px: 44px is the minimum touch target, so it must not shrink
       when --rw-ui-scale goes down. */
    --rw-tap-target: 44px;
}

/* Respect the browser's default font size; the console owns its own scale. */
:root:has(body:not(.program-team-d3)) {
    font-size: calc(100% * var(--rw-ui-scale, 1));
}

/* ==========================================================================
   Page frame
   ========================================================================== */

.rw-site-main,
.rw-page-shell {
    min-width: 0;
}

.rw-page-shell {
    width: 100%;
    background: var(--rw-canvas);
}

/* `.rw-page` is the legacy alias for `.rw-content-container`. Both resolve to
   the same frame so navigating between old and migrated pages never shifts. */
.rw-content-container,
.rw-page {
    width: min(var(--rw-content-max), 100%);
    min-width: 0;
    margin-inline: auto;
    padding: 11px var(--rw-page-gutter) 26px;
}

/* Documented exception only -- data-dense screens that need more horizontal
   room. Record the route in Documentation/SITE_UI_STANDARDIZATION_HANDOFF.md
   when you apply it. */
.rw-content-container--wide {
    width: min(var(--rw-content-wide-max), 100%);
}

/* ==========================================================================
   Page header
   Borderless by default -- that is what every shipped member screen uses.
   Opt into the card treatment with .rw-page-header--card.
   ========================================================================== */

.rw-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--rw-page-space);
    min-height: 0;
    margin: 0 0 var(--rw-page-space);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.rw-page-header__text {
    min-width: 0;
}

.rw-page-header--card {
    padding: 12px 14px;
    border: 1px solid var(--rw-border);
    border-radius: var(--rw-radius);
    background: var(--rw-surface);
    box-shadow: var(--rw-shadow-card);
}

.rw-page-kicker {
    display: block;
    margin: 0 0 4px;
    color: var(--rw-primary);
    font-size: var(--rw-text-kicker);
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.rw-page-header h1 {
    margin: 0 0 4px;
    color: var(--rw-ink);
    font-size: var(--rw-text-h1);
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.16;
    overflow-wrap: anywhere;
}

.rw-page-header p {
    max-width: 760px;
    margin: 0;
    color: var(--rw-muted);
    font-size: var(--rw-text-lead);
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.rw-page-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

/* Any primary action sitting in the header keeps one height and one shape. */
.rw-page-actions > .btn,
.rw-page-actions > .rw-btn,
.rw-page-actions > a,
.rw-page-actions > button {
    display: inline-flex;
    min-height: var(--rw-tap-target);
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-inline: 11px;
    border-radius: var(--rw-radius-sm);
    font-size: var(--rw-text-sm);
    white-space: nowrap;
}

/* Supporting text in the header's right-hand slot (status, progress notes)
   where a route has something to say instead of an action button. */
.rw-page-header__aside {
    flex: 0 0 auto;
    max-width: 320px;
    text-align: right;
}

.rw-page-header__aside p {
    max-width: none;
    margin: 0;
}

.rw-page-header__aside p:first-child {
    color: var(--rw-ink);
    font-size: var(--rw-text-h3);
    font-weight: 600;
}

/* Inline 18px icon that inherits the current text colour. `.rw-partner-ui-icon`
   is the older name, still used across the partner/job-reporting partials. */
.rw-page-action-icon,
.rw-partner-ui-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: currentColor;
    vertical-align: middle;
}

/* ==========================================================================
   Back navigation -- always directly above the page header, same spot, same
   shape, on every route that has a parent.
   ========================================================================== */

.rw-back-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: var(--rw-tap-target);
    margin: 0 0 2px;
    color: var(--rw-primary);
    font-size: var(--rw-text-body);
    font-weight: 600;
    text-decoration: none;
}

.rw-back-button::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: currentColor;
    /* Left-pointing chevron, drawn so it inherits the link colour. */
    -webkit-mask: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M10 3.5 5.5 8l4.5 4.5'/%3E%3C/svg%3E");
    mask: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M10 3.5 5.5 8l4.5 4.5'/%3E%3C/svg%3E");
}

.rw-back-button:hover {
    color: var(--rw-primary-dark);
    text-decoration: underline;
}

/* ==========================================================================
   Surfaces
   ========================================================================== */

.rw-card {
    border: 1px solid var(--rw-border);
    border-radius: var(--rw-radius);
    background: var(--rw-surface);
    box-shadow: var(--rw-shadow-card);
}

.rw-empty-state {
    padding: 20px 14px;
    border: 1px solid var(--rw-border);
    border-radius: var(--rw-radius);
    background: var(--rw-surface);
    box-shadow: var(--rw-shadow-card);
    text-align: center;
}

.rw-empty-state h2 {
    margin: 0 0 5px;
    color: var(--rw-ink);
    font-size: var(--rw-text-h2);
    font-weight: 700;
}

.rw-empty-state p {
    max-width: 560px;
    margin: 0 auto;
    color: var(--rw-muted);
    font-size: var(--rw-text-body);
    line-height: 1.5;
}

.rw-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 6px;
    border-radius: var(--rw-radius-pill);
    font-size: .8125rem;
    font-weight: 700;
    white-space: nowrap;
}

.rw-status-badge--pending {
    color: #775600;
    background: #fff4ce;
}

/* A full-width note strip that sits between the header and the page content. */
.rw-page-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 var(--rw-page-space);
    padding: 11px 14px;
    border: 1px solid var(--rw-border);
    border-radius: var(--rw-radius);
    background: #f7fbff;
    box-shadow: 0 3px 12px rgba(23, 35, 60, .035);
}

.rw-page-note h2 {
    margin: 0 0 3px;
    color: var(--rw-ink);
    font-size: var(--rw-text-h3);
    font-weight: 700;
}

.rw-page-note p {
    margin: 0;
    color: var(--rw-muted);
    font-size: var(--rw-text-body);
    line-height: 1.5;
}

/* Search Jobs keeps its form controls on the same 44px tap target as header
   actions -- its Search/Reset buttons sit in the filter panel, not the header. */
.rw-job-search-page .btn:not(.btn-close) {
    display: inline-flex;
    min-height: var(--rw-tap-target);
    align-items: center;
    justify-content: center;
}

/* SourceAbled job icon beside the job title: the 44px tap target above made the 20px icon sit 12px below
   the title in the top-aligned row. The negative margin keeps the 44px hit area but lays it out at icon
   size, so it lines up with the title (same as the member and Program Team job lists). */
.rw-site-main .job-listing .info-btn:has(> img) {
    flex: 0 0 auto;
    margin: -12px;
}

.rw-opportunity-search-tabs {
    margin-bottom: var(--rw-page-space);
    border-bottom: 2px solid var(--rw-primary);
}

.rw-opportunity-search-tabs ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 32rem);
    margin: 0;
    padding: 0;
    gap: 8px;
    list-style: none;
}

.rw-opportunity-search-tabs a {
    display: flex;
    min-height: var(--rw-tap-target);
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid var(--rw-border);
    border-bottom: 0;
    border-radius: var(--rw-radius) var(--rw-radius) 0 0;
    background: var(--rw-surface);
    color: var(--rw-primary);
    font-weight: 700;
    text-decoration: none;
}

.rw-opportunity-search-tabs a:hover {
    border-color: var(--rw-primary);
    background: var(--rw-soft);
    color: var(--rw-primary-dark);
}

.rw-opportunity-search-tabs a.is-active {
    border-color: var(--rw-primary);
    background: var(--rw-primary);
    color: #fff;
}

@media (max-width: 480px) {
    .rw-opportunity-search-tabs ul {
        grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr) minmax(0, 1fr);
        width: 100%;
        gap: 4px;
    }

    .rw-opportunity-search-tabs a {
        padding: 8px 4px;
        font-size: clamp(.75rem, 3.4vw, .875rem);
        white-space: nowrap;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Shared controls retain a real 44px target, including compact shell icons. */
body.rw-member-enabled :is(.btn, .rw-btn, .rw-header-icon, .rw-sidebar-collapse, .rw-nav-link, [role="tab"], .form-control, .form-select) {
    min-height: var(--rw-tap-target) !important;
}

body.rw-member-enabled :is(button, .btn, .rw-btn, [role="tab"]) {
    min-width: var(--rw-tap-target) !important;
}

body.rw-member-enabled .btn-close {
    min-height: var(--rw-tap-target) !important;
    box-sizing: border-box;
}

/* The public content shell uses the same control floor as member pages. */
.rw-site-main :is(button, .btn, .form-control, .form-select) {
    min-height: var(--rw-tap-target) !important;
}

.rw-site-main :is(button, .btn) {
    min-width: var(--rw-tap-target) !important;
}


#frmAwardsAndCertificate .row.align-items-end .form-group {
    position: relative;
}

#frmAwardsAndCertificate .row.align-items-end .form-group > .required {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
}

body.rw-member-enabled .form-control[type="file"]::file-selector-button,
.rw-site-main .form-control[type="file"]::file-selector-button {
    height: var(--rw-tap-target);
    display: inline-flex;
    align-items: center;
}

/* flatpickr.min.css is linked per view inside @@section Styles, so it loads AFTER this file.
   Matching its own specificity would lose on source order - every selector below therefore
   carries one class more than the flatpickr rule it replaces. */
.flatpickr-calendar .flatpickr-months,
.flatpickr-calendar .flatpickr-months .flatpickr-month {
    height: auto;
    min-height: 34px;
    overflow: visible;
}

.flatpickr-calendar .flatpickr-months .flatpickr-current-month {
    position: static;
    width: auto;
    left: auto;
    height: auto;
    padding-bottom: 6px;
    text-align: center;
}

/* Poppins needs ~1.45em for ascender + descender, but flatpickr gives the year
   a line box equal to its font size and the input clips overflow, cutting the
   bottom off the digits. */
.flatpickr-calendar .flatpickr-current-month input.cur-year,
.flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months {
    line-height: 1.5;
}

body.rw-member-enabled .rw-jobseeker-footer .bg-secondary {
    font-size: var(--rw-text-sm);
    line-height: 1.5;
}

/* CR-14: the footer was 324px tall because every link sat in a 44px box around 17.5px of text -
   26px of empty space per row, and 220px for the five Legal links alone. The 44px floor came from
   CR-04 (R-44), which fixed links that had no minimum height at all, but it is SC 2.5.5 Target Size
   (Enhanced), level AAA. This product targets WCAG 2.2 AA, where SC 2.5.8 Target Size (Minimum)
   asks for 24x24 - met here by 24px of height plus 2px of padding each side, with 4px between rows
   so neighbouring targets stay distinct. min-width is dropped: it was stretching short links such as
   "Home" and "FAQs" into 44px-wide boxes for no benefit, since the row is already full width. */
.rw-jobseeker-footer a {
    display: inline-flex;
    min-height: 24px;
    padding: 2px 0;
    align-items: center;
    font-size: max(1em, var(--rw-text-sm));
    line-height: 1.35;
}

.rw-jobseeker-footer .list-item.w-100 {
    font-size: max(1em, var(--rw-text-sm));
}

.rw-jobseeker-footer a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    text-decoration: underline !important;
}

.rw-jobseeker-footer {
    background: #12345b;
    color: #fff;
}

.rw-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    /* CR-14: a little more air above the columns now the rows are tight, so the footer reads as
       one block rather than four lists pinned to the top edge. */
    padding: 1.75rem 1.5rem 1.25rem;
}

.rw-footer-main {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
    gap: 2rem;
    align-items: start;
}

/* G42: the tenant logo, the same image as the header, on a white tile so it reads on the navy footer (as works-shell .foot-logo). */
.rw-footer-logo {
    display: block;
    height: 56px;
    width: auto;
    max-width: 100%;
    margin: 0 0 .75rem;
    padding: 4px 6px;
    border-radius: 8px;
    background: #fff;
}

.rw-footer-brand-title,
.rw-footer-brand-copy,
.rw-footer-heading {
    margin: 0;
}

.rw-footer-brand-title {
    color: #fff !important;
    font-size: 1.125rem;
    font-weight: 700;
}

.rw-footer-brand-copy {
    max-width: 240px;
    margin-top: .625rem;
    color: #d8e4f0 !important;
    font-size: .8125rem;
    line-height: 1.55;
}

.rw-footer-heading {
    margin-bottom: .5rem; /* CR-14: the 44px rows used to separate the heading from its links; now this does. */
    color: #8fd3c8;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.35;
    text-transform: uppercase;
}

.rw-jobseeker-footer ul.rw-footer-links {
    justify-items: start;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rw-jobseeker-footer ul.rw-footer-links li {
    display: block;
    width: 100%;
    padding: 0;
    border-right: 0;
}

/* RG-1527 (8 Nov 2026 regression): every footer link is a 44px tall tap target again (it was 26px). The rows touch, so the
   targets do not overlap; the text stays where it was inside each row. */
.rw-jobseeker-footer ul.rw-footer-links li + li {
    margin-top: 0;
}

/* RG-1064: one text size in the footer (16px) for links, the brand line and the bottom line. */
.rw-jobseeker-footer .rw-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #f7fbff;
    font-size: 1rem;
    line-height: 1.35;
    text-decoration: none;
}

.rw-jobseeker-footer .rw-footer-links a:hover,
.rw-jobseeker-footer .rw-footer-links a:focus-visible {
    color: #8fd3c8;
}

.rw-footer-bottom {
    margin-top: 1.25rem;
    padding-top: .875rem; /* CR-14 */
    border-top: 1px solid rgba(216, 228, 240, .28);
    color: #d8e4f0;
    font-size: .8125rem;
    /*line-height: 0.4;*/
}

@media (max-width: 760px) {
    .rw-footer-main {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .rw-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 420px) {
    .rw-footer-inner {
        padding: 1.75rem 1.25rem 1rem;
    }

    .rw-footer-main {
        grid-template-columns: 1fr;
    }

    .rw-footer-brand {
        grid-column: auto;
    }
}

.rw-page-shell :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: var(--rw-focus-outline);
    outline-offset: 2px;
}

.rw-back-button:focus-visible,
.rw-page-actions :focus-visible {
    outline: var(--rw-focus-outline);
    box-shadow: var(--rw-focus-ring);
}

@media (prefers-reduced-motion: reduce) {
    .rw-page-shell *,
    .rw-page-shell *::before,
    .rw-page-shell *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    .rw-page-header,
    .rw-page-note {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .rw-page-actions {
        justify-content: flex-start;
    }

    .rw-page-header__aside {
        max-width: none;
        text-align: left;
    }

    .rw-page-note .rw-status-badge {
        align-self: flex-start;
    }
}

@media (max-width: 767.98px) {
    .rw-content-container,
    .rw-page,
    .rw-content-container--wide {
        width: 100%;
        /* Bottom padding clears the member mobile bottom navigation. */
        padding: 10px 12px;
    }

    .rw-page-header--card,
    .rw-page-note {
        padding: 11px;
    }

    .rw-page-actions,
    .rw-page-actions > .btn,
    .rw-page-actions > .rw-btn,
    .rw-page-actions > a,
    .rw-page-actions > button {
        width: 100%;
    }

    .rw-empty-state {
        padding: 16px 11px;
    }
}

/* The footer is pushed down with mt-auto inside a flex body, and .rw-site-main did not grow, so
   on short pages the space between the end of the .rw-page-shell band and the footer fell back to
   the white body background - a white strip across the bottom of the page. Let main take the
   leftover height and let the shell band fill it, so the page keeps one background to the footer. */
.rw-site-main {
    flex: 1 0 auto;
}

/* The column layout is scoped with :has() to pages that actually use the shell band. Pages
   without one (the landing page, Contact Us) keep normal block flow, so this cannot change
   margin collapsing or stacking anywhere it is not needed. */
.rw-site-main:has(> .rw-page-shell) {
    display: flex;
    flex-direction: column;
}

.rw-site-main > .rw-page-shell {
    flex: 1 0 auto;
}

/* "This job is no longer available" (JobsClosed.cshtml): the card had no padding, so the text sat on its border, and it ran the whole page width.
   It is now a centred card with room around the text and the buttons. */
.rw-job-closed-page {
    padding-top: 3rem !important;
    padding-bottom: 4rem !important;
}

.rw-job-closed-state {
    max-width: 44rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
}

.rw-job-closed-state .rw-page-kicker {
    margin-bottom: .5rem;
}

.rw-job-closed-state h1 {
    margin: 0 0 .75rem;
    font-size: 1.75rem;
    line-height: 1.25;
}

.rw-job-closed-state p {
    margin: 0 0 1.5rem;
    color: var(--rw-muted, #475467);
}

.rw-job-closed-state__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}