/*
 * UX fixes layered on top of main.css (loaded after it from the shared header).
 * Kept separate so they are easy to review; fold into main.css when it is next refactored.
 */

/* ---------- Mobile: floating "Contact Us" tab ---------- */
@media (max-width: 767px) {
    /* The rotated side tab covered the right edge of every form field on phones.
       Turn it into a small pill above the back-to-top button. */
    .contact-sticky-global {
        top: auto !important;
        right: 12px;
        bottom: 94px;          /* clear of the back-to-top button (bottom 30px + 50px tall) */
        transform: none;
        padding: 10px 16px;
        border-radius: 22px;
        font-size: 14px;
        line-height: 1.2;
        box-shadow: 0 4px 12px rgba(2, 24, 65, .25);
    }

    /* Pointless on the contact page itself, and in the way while someone is typing */
    .ux-form-page .contact-sticky-global,
    .ux-typing .contact-sticky-global {
        display: none;
    }

    /* Enzuzo cookie-settings button sat on top of form fields (bottom-left) */
    .cookieManagerButton {
        width: 36px !important;
        height: 36px !important;
        bottom: 8px !important;
        left: 8px !important;
        opacity: .85;
    }

    .ux-typing .cookieManagerButton {
        display: none !important;
    }
}

/* ---------- Mobile: Job Seeker form was 10px wider than the screen ---------- */
@media (max-width: 767px) {
    .container-form {
        width: auto !important;
        max-width: calc(100% - 20px);
    }
}

/* ---------- Touch: tap targets at least 44px tall (WCAG 2.5.5) ---------- */
@media (pointer: coarse), (max-width: 767px) {
    .servicelist-links li > a,
    .copylink-wrapper li > a,
    .breadcrumbs .breadcrumb_a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .servicelist-links li,
    .copylink-wrapper li {
        margin-top: 0 !important;
    }

    input[type="radio"],
    input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
}

/* ---------- Forms: visible labels (added by the form templates) ---------- */
.ux-label {
    display: block;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #021841;
}

/* the contact form's message box is indented by main.css; keep its label aligned */
.form-inputs-message .ux-label {
    margin-left: 20px;
}

/* ---------- Keyboard users: visible focus ring everywhere ---------- */
:focus-visible {
    outline: 3px solid #09a3e4;
    outline-offset: 2px;
}

/* ---------- Visually hidden but available to screen readers ---------- */
.sr-only-ux {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Forms: bot-check honeypot (must stay invisible to people) ---------- */
.ux-honeypot {
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cf-turnstile {
    margin: 4px 0 8px;
}

/* ---------- Home hero: first slide headline is now the page <h1>; keep it centred like the other slides ---------- */
.myslider .slider-caption h1.first-tag {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------- Home hero: call-to-action buttons ---------- */
.ux-hero-cta {
    position: absolute;
    left: 0;
    right: 0;
    top: 68%;                /* just below the slide tagline */
    z-index: 5;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.ux-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 26px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none !important;
    transition: background-color .2s, color .2s;
}

.ux-btn-primary {
    background: #09a3e4;
    color: #fff !important;
    border: 2px solid #09a3e4;
}

.ux-btn-primary:hover {
    background: #0e4b89;
    border-color: #0e4b89;
}

.ux-btn-outline {
    background: rgba(2, 24, 65, .35);
    color: #fff !important;
    border: 2px solid #fff;
}

.ux-btn-outline:hover {
    background: #fff;
    color: #021841 !important;
}

@media (max-width: 767px) {
    .ux-hero-cta {
        top: 76%;
        gap: 8px;
    }

    .ux-btn {
        min-height: 44px;
        padding: 0 18px;
        font-size: 14px;
    }
}

/* ---------- Home hero: pause / play control ---------- */
.ux-slider-toggle {
    position: absolute;
    right: 16px;            /* bottom-left belongs to the cookie button */
    bottom: 16px;
    z-index: 6;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .8);
    background: rgba(2, 24, 65, .45);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.ux-slider-toggle:hover {
    background: rgba(2, 24, 65, .75);
}

.ux-slider-toggle .ux-icon-play,
.ux-slider-toggle.is-paused .ux-icon-pause {
    display: none;
}

.ux-slider-toggle.is-paused .ux-icon-play {
    display: inline;
}

@media (max-width: 767px) {
    .ux-slider-toggle {
        right: 12px;
        bottom: 12px;
        width: 40px;
        height: 40px;
    }
}

/* ---------- Header: one clear "Contact Us" button in the main menu ---------- */
.navbar-desktop .ux-nav-cta {
    background: #09a3e4;
    color: #fff !important;
    border-radius: 6px;
    padding: 9px 18px !important;
    margin-left: 8px;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color .2s;
}

.navbar-desktop .ux-nav-cta:hover,
.navbar-desktop .ux-nav-cta:focus-visible {
    background: #0e4b89;
}

.navbar-mobile .ux-nav-cta {
    font-weight: 700;
    color: #09a3e4 !important;
}

/* The floating side tab is redundant on desktop now that the menu has the button */
@media (min-width: 768px) {
    .contact-sticky-global {
        display: none !important;
    }
}

/* ---------- Header: desktop dropdowns open for keyboard users too (they were hover-only) ---------- */
.navbar-desktop .dropdown:focus-within .dropdown-content {
    display: block;
}

/* ---------- Home "Looking for ..." cards: buttons used to cover the last lines of text ---------- */
/* The button row was absolutely positioned over the card bottom; lay the card out as a
   column instead so buttons always sit under the full text, and cards in a row line up. */
.looking-for-slide .owl-item {
    display: flex;
    padding-bottom: 0;
}

.looking-for-slide .owl-item > .item {
    display: flex;
    width: 100%;
}

.looking-for-slide .looking-for-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-bottom: 24px;
}

.looking-for-slide .looking-for-card .details {
    flex: 1 1 auto;
}

.looking-for-slide .looking-for-card .details p {
    padding-bottom: 16px;
}

.looking-for-slide .looking-for-card .link-box {
    position: static;
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.looking-for-slide .looking-for-card .link-box a {
    margin: 0 !important;      /* .aug-conbtn centres itself with margin:auto */
}
