/* =========================================================================
   Focus not obscured by the fixed header / sticky footer bar
   (accessibility audit items 4-5, WCAG 2.4.11)
   .header is position: fixed at 110px tall, so keyboard focus and in-page
   anchors scroll content to sit below it instead of underneath it. The
   bottom value clears the Paradox "Powered by" bar.
   ========================================================================= */
:root {
    --header-offset: 120px;  /* .header height (110px) + 10px breathing room */
    --footer-offset: 64px;   /* Paradox "Powered by" bar */
}

html {
    scroll-padding-top: var(--header-offset);
    scroll-padding-bottom: var(--footer-offset);
}

/* Same offset on each focus / anchor target, for scanners that check the
   element and for scroll containers that don't inherit html's padding */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
summary:focus,
[tabindex]:focus,
[contenteditable]:focus,
:target {
    scroll-margin-top: var(--header-offset);
    scroll-margin-bottom: var(--footer-offset);
}

/* "Skip to Content" lands on #PContent: keep its first line below the header */
#PContent {
    scroll-margin-top: var(--header-offset);
}

/* =========================================================================
   Mobile tap targets (Mobile UX audit: "Small Tap Target", min 44x44px)
   Load after bundle_v5.css / all.css.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Carousel dots (homepage hero, testimonials, iCare slider)
   Audit: slick-slide-control00..03 = 10x10px.
   The button becomes a 44x44 transparent hit area; the visible dot is drawn
   by ::before at the original size, so the design does not change.
   ------------------------------------------------------------------------- */
.slick__dots .slick-dots li,
.from-our-team__slick-dots .slick-dots li {
    margin: 0;
}

.slick__dots .slick-dots button,
.from-our-team__slick-dots .slick-dots button {
    --dot-color: #eaf7f6;
    --dot-size: 10px;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0;
    cursor: pointer;
}

.l-icare-slider__slick-dots .slick-dots button,
.from-our-team__slick-dots .slick-dots button {
    --dot-color: #147b74;
}

.slick__dots .slick-dots button::before,
.from-our-team__slick-dots .slick-dots button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--dot-size);
    height: var(--dot-size);
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    border: 2px solid var(--dot-color);
    border-radius: 50%;
    background-color: transparent;
}

.slick__dots .slick-dots button:hover,
.slick__dots .slick-dots button:focus,
.from-our-team__slick-dots .slick-dots button:hover,
.from-our-team__slick-dots .slick-dots button:focus,
.l-icare-slider__slick-dots .slick-dots button:hover,
.l-icare-slider__slick-dots .slick-dots button:focus,
.slick__dots .slick-dots .slick-active button,
.from-our-team__slick-dots .slick-dots .slick-active button,
.l-icare-slider__slick-dots .slick-dots .slick-active button {
    background: transparent;
    border: 0;
}

.slick__dots .slick-dots button:hover::before,
.slick__dots .slick-dots button:focus::before,
.slick__dots .slick-dots .slick-active button::before,
.from-our-team__slick-dots .slick-dots button:hover::before,
.from-our-team__slick-dots .slick-dots button:focus::before,
.from-our-team__slick-dots .slick-dots .slick-active button::before {
    background-color: var(--dot-color);
}

.slick__dots .slick-dots button:focus-visible,
.from-our-team__slick-dots .slick-dots button:focus-visible {
    outline: 2px solid var(--dot-color);
    outline-offset: -8px;
    border-radius: 50%;
}

/* Larger dots on desktop, matching the original 17px / 15px sizes */
@media (min-width: 768px) {
    .slick__dots .slick-dots button {
        --dot-size: 17px;
    }

    .from-our-team__slick-dots .slick-dots button {
        --dot-size: 15px;
    }
}

/* -------------------------------------------------------------------------
   2. "Use your location" button in the location search
   Audit: 30x20px.
   ------------------------------------------------------------------------- */
button.location-search__icon-button {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
}

/* -------------------------------------------------------------------------
   3. Job filter checkboxes (Category, Province, City)
   Audit: 13x13px.
   The whole label row is the real tap target, so it gets a 44px min height.
   The checkbox itself is a 44x44 box whose visible square stays 20x20: the
   transparent 12px border is part of the hit area but paints nothing.
   ------------------------------------------------------------------------- */
[data-testid="jobs-filter_filter-group_item"] {
    display: flex;
    align-items: center;
    min-height: 44px;
    cursor: pointer;
}

[data-testid="jobs-filter_filter-group_item_checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: 0 -4px 0 -12px; /* keeps the visible box aligned where the old one was */
    padding: 0;
    border: 12px solid transparent;
    border-radius: 0;
    background-color: #fff;
    background-clip: padding-box;
    background-origin: padding-box;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 14px 14px;
    box-shadow: inset 0 0 0 2px #666;
    cursor: pointer;
}

[data-testid="jobs-filter_filter-group_item_checkbox"]:checked {
    background-color: #147b74;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E");
    box-shadow: inset 0 0 0 2px #147b74;
}

[data-testid="jobs-filter_filter-group_item_checkbox"]:focus-visible {
    outline: 2px solid #147b74;
    outline-offset: -10px;
}

@media (forced-colors: active) {
    [data-testid="jobs-filter_filter-group_item_checkbox"] {
        -webkit-appearance: auto;
        appearance: auto;
        width: 20px;
        height: 20px;
        margin: 12px;
        border: 0;
    }
}
