/* site.css — shared rules on top of the page styles generated from the design.
   (Same building blocks as gygler.com, in People Solutions colors.) */

/* ---------- Mobile menu (button injected by js/site.js) ---------- */
.ps-menu-btn { display: none; }

@media (max-width: 900px) {
    header.ps-has-menu { flex-wrap: wrap !important; }
    header.ps-has-menu > .ps-menu-group { display: none !important; }
    header.ps-has-menu.ps-menu-open > .ps-menu-group {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start !important;
        flex-basis: 100%;
        gap: 14px !important;
        padding: 16px 0 8px;
    }
    header.ps-has-menu.ps-menu-open > .ps-menu-group nav {
        display: flex !important;
        flex-direction: column;
        align-items: stretch !important;
        align-self: stretch;
        gap: 0 !important;
    }
    /* Each menu link is a full-width 44px tap target (same look as the 14px-gap list). */
    header.ps-has-menu.ps-menu-open > .ps-menu-group nav a {
        display: flex !important;
        align-items: center;
        min-height: 44px;
    }
    /* "Try Gygler" sits outside the nav: same 44px target through padding (flex would eat the
       space between "Try" and "Gygler"). */
    header.ps-has-menu.ps-menu-open > .ps-menu-group > a[style*="border-bottom"] { display: block; padding: 12px 0 !important; margin: -12px 0; }
    /* The current page's underline (the link's border) goes on the text, not the full-width row. */
    header.ps-has-menu.ps-menu-open > .ps-menu-group nav a { border-bottom: 0 !important; padding-bottom: 0 !important; }
    header.ps-has-menu.ps-menu-open > .ps-menu-group nav a[style*="border-bottom"]:not([style*="transparent"]) > span { border-bottom: 2px solid currentColor; padding-bottom: 2px; }
    .ps-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid #353A57;
        border-radius: 12px;
        background: transparent;
        color: #FFFFFF;
        cursor: pointer;
    }
    .ps-menu-btn svg { display: block; }
    .ps-menu-btn .ps-menu-close { display: none; }
    .ps-menu-open .ps-menu-btn .ps-menu-close { display: block; }
    .ps-menu-open .ps-menu-btn .ps-menu-bars { display: none; }
}

/* ---------- Button rows on phones (classes set by js/site.js) ---------- */
@media (max-width: 600px) {
    .gy-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
    }
    .gy-actions > .gy-act-button {
        flex: 1 1 100% !important;
        width: auto !important;
        max-width: none !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .gy-actions > .gy-act-toggle {
        flex: 1 1 calc(50% - 5px) !important;
        min-width: 0 !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .gy-actions > .gy-act-badge {
        flex: 1 1 calc(50% - 5px) !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    .gy-actions > .gy-act-badge img { height: 48px !important; width: auto !important; max-width: 100% !important; }
    /* A row the page hid (gy-if / data-style display:none) stays hidden. */
    .gy-actions[style*="display: none"], .gy-actions[style*="display:none"],
    .gy-actions > [style*="display: none"], .gy-actions > [style*="display:none"] { display: none !important; }
}

/* ---------- Bigger touch targets for small text links ---------- */
@media (pointer: coarse) {
    footer a { position: relative; }
    footer a::after { content: ""; position: absolute; inset: -6px 0; }
}

/* ---------- Cookie consent (markup injected by js/consent.js) ---------- */
.gy-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000;
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 22px;
    border-radius: 20px;
    border: 1px solid #353A57;
    background: #22263F;
    color: #FFFFFF;
    font: 400 15px/1.55 'Bricolage Grotesque', sans-serif;
    box-shadow: 0 18px 48px rgba(31, 31, 31, .28);
    box-sizing: border-box;
}
.gy-consent h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: #FFFFFF; }
.gy-consent p { margin: 0 0 14px; color: #C9CBE0; }
.gy-consent a { color: #B9A2F0; font-weight: 700; }
.gy-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gy-consent button {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid #353A57;
    background: transparent;
    color: #FFFFFF;
    font: 700 14px 'Bricolage Grotesque', sans-serif;
    cursor: pointer;
}
.gy-consent button:hover { background: #2E3352; }
.gy-consent button.gy-primary { background: #6833CD; border-color: #6833CD; color: #FFFFFF; }
.gy-consent button.gy-primary:hover { background: #7B4DDB; }
.gy-consent-options { display: grid; gap: 12px; margin: 4px 0 16px; }
.gy-consent-option {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    background: #2E3352;
}
.gy-consent-option input { margin-top: 4px; width: 18px; height: 18px; accent-color: #6833CD; flex: none; }
.gy-consent-option strong { display: block; color: #FFFFFF; }
.gy-consent-option span { color: #C9CBE0; font-size: 14px; }
.gy-consent-note { font-size: 13px; color: #B9BCD6; margin: 0 0 12px; }

/* ---------- Language picker (js/translate.js) ---------- */
.gy-lang { position: relative; }
.gy-lang-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #353A57;
    border-radius: 999px;
    background: transparent;
    color: #C9CBE0;
    font: 700 13px 'Bricolage Grotesque', sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
    white-space: nowrap;
}
.gy-lang-btn:hover, .gy-lang-btn[aria-expanded="true"] { background: #2E3352; }
.gy-lang-btn:focus-visible { outline: 2px solid #6833CD; outline-offset: 2px; }
.gy-lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 2147483200;
    min-width: 220px;
    max-height: min(420px, 70vh);
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid #353A57;
    border-radius: 16px;
    background: #22263F;
    box-shadow: 0 18px 40px rgba(31, 31, 31, .35);
    font: 600 14px 'Bricolage Grotesque', sans-serif;
}
.gy-lang-menu[hidden] { display: none; }
.gy-lang-menu [role="option"] {
    padding: 10px 12px;
    border-radius: 10px;
    color: #FFFFFF;
    cursor: pointer;
}
.gy-lang-menu [role="option"]:hover, .gy-lang-menu [role="option"]:focus { background: #2E3352; outline: none; }
.gy-lang-menu [aria-selected="true"] { color: #B9A2F0; }
.gy-lang-divider {
    margin: 6px 6px 2px;
    padding-top: 8px;
    border-top: 1px solid #2E3352;
    color: #B9BCD6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.gy-lang-notice {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 2147483300;
    max-width: min(520px, calc(100vw - 32px));
    padding: 14px 18px;
    border-radius: 14px;
    background: #22263F;
    color: #FFFFFF;
    font: 600 14px/1.5 'Bricolage Grotesque', sans-serif;
    box-shadow: 0 18px 40px rgba(31, 31, 31, .35);
}
.gy-lang-notice[hidden] { display: none; }
@media (max-width: 900px) {
    .gy-lang-menu { right: auto; left: 0; }
}

/* ---------- Phones: fixes where the design has no small-screen layout ----------
   Desktop is untouched. A 4-column grid of cards (Home "connected to it all") leaves 73px per
   card on a phone and the text runs off the screen: 2 columns below 760px. The header's first
   block may shrink so the menu button stays on the logo's row. */
@media (max-width: 760px) {
    [style*="grid-template-columns:repeat(4,minmax(0,1fr))"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    header.ps-has-menu { flex-wrap: wrap !important; }
    header.ps-has-menu > :first-child { flex: 1 1 0; min-width: 0; }
    header.ps-has-menu > .ps-menu-btn { flex: none; }
}

/* ---------- Contact form: Submit + inline reCAPTCHA badge (row injected by js/forms.js) ---------- */
.ps-submit-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    min-height: 60px; /* the badge's height, so the row doesn't jump when it appears */
}
.ps-recaptcha:empty { display: none; }
.ps-recaptcha .grecaptcha-badge { box-shadow: none !important; border-radius: 8px; overflow: hidden; }

/* ---------- Form result modal (markup injected by js/forms.js) ---------- */
.gy-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(34, 38, 63, .6);
}
.gy-modal {
    width: 100%;
    max-width: 440px;
    padding: 32px 28px 28px;
    border-radius: 24px;
    background: #FFFFFF;
    color: #22263F;
    text-align: center;
    font: 400 16px/1.55 'Bricolage Grotesque', sans-serif;
    box-shadow: 0 24px 64px rgba(34, 38, 63, .3);
    box-sizing: border-box;
}
.gy-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
}
.gy-modal-icon--success { background: #EEE8FB; color: #6833CD; }
.gy-modal-icon--error { background: #FDE7E5; color: #B3261E; }
.gy-modal h2 { margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.gy-modal p { margin: 0 0 10px; color: #5B607A; }
.gy-modal button {
    margin-top: 12px;
    min-height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: #6833CD;
    color: #FFFFFF;
    font: 700 15px 'Bricolage Grotesque', sans-serif;
    cursor: pointer;
}
.gy-modal button:hover { background: #7B4DDB; }
form[aria-busy="true"] button { opacity: .7; cursor: progress; }

/* Talent Sourcing: no name ever comes from the API; the card and popup show a blurred placeholder. */
.ps-blur-name { filter: blur(5px); user-select: none; }
.ps-gygs:has(> [data-text]:empty),
.ps-langs:has(> [data-text]:empty) { display: none; }

/* Skip link: off-screen until a keyboard user focuses it. */
.ps-skip { position: absolute; left: 16px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 999px; background: #22263F; color: #fff; font-weight: 700; text-decoration: none; }
.ps-skip:focus { top: 12px; }

/* The language picker is ours, not the design's: on mid-size screens it is only the globe, set in
   the header's side margin, so the design's one-row header wraps exactly where the design does.
   The language stays in the button's aria-label. */
@media (min-width: 900px) and (max-width: 1499px) {
    .gy-lang-btn > span, .gy-lang-btn > svg:last-child { display: none; }
    .gy-lang-btn { width: 32px; min-height: 32px; height: 32px; padding: 0; justify-content: center; }
    /* Out of the row, in the header's right margin: the design's row keeps its full width. */
    header.ps-has-menu { position: relative; }
    header.ps-has-menu .gy-lang { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
}

/* Map popups (js/ps-map.js): the card look the design's popups had. */
.ps-map-popup .maplibregl-popup-content { padding: 14px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(34, 38, 63, .22); }
.ps-map-popup .maplibregl-popup-close-button { font-size: 20px; min-width: 44px; min-height: 44px; padding: 0; color: #5B607A; }

/* "I Need Work" pager (10 cards per page), in the design's colors. */
.ps-pager { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; font-family: 'Bricolage Grotesque', sans-serif; }
.ps-pager-btn { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid #4D2903; background: #fff; color: #4D2903; font: 700 15px 'Bricolage Grotesque', sans-serif; cursor: pointer; }
.ps-pager-btn:hover:not(:disabled) { background: #4D2903; color: #FFF3E7; }
.ps-pager-btn:focus-visible { outline: 2px solid #FF880B; outline-offset: 2px; }
.ps-pager-btn:disabled { opacity: .4; cursor: default; }
.ps-pager-info { font-weight: 700; font-size: 15px; color: #5A4632; }
@media (max-width: 480px) {
    .ps-pager-sep, .ps-pager-info > span:last-child { display: none; }
    .ps-pager { gap: 8px; }
    .ps-pager-btn { padding: 0 14px; font-size: 14px; }
    .ps-pager-info { font-size: 13.5px; }
}

/* Talent Sourcing pager: same pager, in the People Solutions colors. */
.ps-pager--ps { margin-top: 18px; }
.ps-pager--ps .ps-pager-btn { border-color: #22263F; color: #22263F; }
.ps-pager--ps .ps-pager-btn:hover:not(:disabled) { background: #22263F; color: #fff; }
.ps-pager--ps .ps-pager-btn:focus-visible { outline-color: #6833CD; }
.ps-pager--ps .ps-pager-info { color: #4A4F6A; }

/* Phones: the logo and the page name ("Talent Sourcing / Powered by Gygler") share the header row
   with the menu button. At the design's sizes the page name was squeezed to ~60px and broke into
   3-4 lines; slightly smaller logo, gaps and type keep it on one line (two for the longest,
   "Operational Support"). */
@media (max-width: 480px) {
    header.ps-has-menu > :first-child { gap: 10px !important; }
    header.ps-has-menu > :first-child > a { gap: 8px !important; }
    header.ps-has-menu > :first-child > a > img { width: 38px !important; height: 38px !important; }
    header.ps-has-menu > :first-child > a > div > span:first-child { font-size: 18px !important; }
    header.ps-has-menu > :first-child > a > div > span:last-child { font-size: 8px !important; letter-spacing: .38em !important; }
    header.ps-has-menu > :first-child > div { min-width: 0; }
    header.ps-has-menu > :first-child > div > span:first-child { font-size: 14.5px !important; line-height: 1.1; }
    header.ps-has-menu > :first-child > div > span:last-child { font-size: 11px !important; white-space: nowrap; }
}

/* "Close ✕" buttons of the design's panels and modals stay on one line on phones. */
[data-on="click:closeOpp"], [data-on="click:closeSkills"] { white-space: nowrap; flex: none; }

/* Touch targets: at least 44px tall without changing how the controls look (an invisible hit area). */
.ps-dot { position: relative; }
.ps-dot::before { content: ''; position: absolute; inset: -17px -4px; }  /* 10px dot -> 44px; 8px gap keeps neighbours apart */
.gy-lang-btn::after { content: ''; position: absolute; inset: -4px; }    /* 36px -> 44px */
@media (min-width: 900px) and (max-width: 1499px) {
    .gy-lang-btn::after { inset: -6px; }                                  /* 32px globe -> 44px */
}

/* Logo marquee (every page): paused on hover, still with reduced motion (WCAG 2.2.2). */
[style*="psLogos"]:hover { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
    [style*="psLogos"] { animation: none !important; }
}
