/**
 * Theme Name:     Copernus
 * Author:         Jason Gillyon
 * Template:       hello-elementor
 * Text Domain:	   copernus
 * Description:    A theme for Copernus
 * Version:        1.0.14
 */

/* Spinner shown over #results while a product filter request is in flight. */
#results {
    position: relative;
}

#results.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

#results.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 3px solid rgba(0, 0, 0, 0.15);
    border-top-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    animation: copernus-spin 0.6s linear infinite;
}

@keyframes copernus-spin {
    to {
        transform: rotate(360deg);
    }
}

/*
 * Filter dropdowns: a <details> holding a checkbox per term, styled as the
 * same pill-shaped, accent-colored control used elsewhere on the site, with
 * a flat triangle instead of the native <select> arrow. Shared by both the
 * product and recipe filters so they look and behave identically.
 */
[data-product-filter-dropdown] summary,
[data-recipe-filter-dropdown] summary {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: var(--e-global-color-accent);
    color: var(--e-global-color-841c3bf);
    padding: 0.5em 2.75rem 0.5em 1em;
    border: none;
    border-radius: 20px;
    outline: none;
    list-style: none;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 8'%3E%3Cpath d='M0 0h16L8 8z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 16px 8px;
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}

[data-product-filter-dropdown] summary:focus,
[data-product-filter-dropdown] summary:focus-visible,
[data-recipe-filter-dropdown] summary:focus,
[data-recipe-filter-dropdown] summary:focus-visible {
    outline: none;
    box-shadow: none;
}

[data-product-filter-dropdown],
[data-recipe-filter-dropdown] {
    position: relative;
    display: block;
    width: 100%;
}

[data-product-filter-dropdown] summary::-webkit-details-marker,
[data-recipe-filter-dropdown] summary::-webkit-details-marker {
    display: none;
}

[data-product-filter-dropdown][open] summary,
[data-recipe-filter-dropdown][open] summary {
    border-radius: 20px 20px 0 0;
}

[data-product-filter-options],
[data-recipe-filter-options] {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    background: var(--e-global-color-accent);
    color: var(--e-global-color-841c3bf);
    border: none;
    border-radius: 0 0 20px 20px;
    padding: 0.5em;
}

[data-product-filter-option],
[data-recipe-filter-option] {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.25em 0.5em;
    cursor: pointer;
}

/*
 * Sourcing map: an inlined world map SVG whose dots are clickable. Popups
 * are plain HTML divs positioned in JS against the dot that opened them,
 * since the SVG itself has no room to lay out real content.
 */
[data-sourcing-map] {
    position: relative;
}

[data-sourcing-map] svg {
    display: block;
    width: 100%;
    height: auto;
}

.map-dot {
    cursor: pointer;
    transition: r 0.15s ease;
}

.map-dot:hover,
.map-dot:focus-visible {
    r: 13;
    outline: none;
}

.sourcing-map__popup {
    position: absolute;
    z-index: 20;
    transform: translate(-50%, calc(-100% - 14px));
    width: 190px;
    max-width: calc(100vw - 2rem);
    box-sizing: border-box;
    background: #E22D2A;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    padding: 0.85rem 0.85rem 0.75rem;
}

.sourcing-map__popup::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #E22D2A;
}

.sourcing-map__popup h3 {
    margin: 0 0 0.6rem;
    padding-right: 1.25rem;
    font-size: 0.95rem;
    color: #fff;
}

/*
 * Reset with !important: the theme's Elementor kit styles buttons globally,
 * so a plain class selector loses the specificity/cascade fight and these
 * render as unstyled (oversized, blue) buttons without it.
 */
.sourcing-map__product {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 0.4rem !important;
    padding: 0.4rem 0.6rem !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    border: none !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #1a1a1a !important;
    font-family: inherit !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: normal !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.sourcing-map__product:last-child {
    margin-bottom: 0 !important;
}

.sourcing-map__product:hover,
.sourcing-map__product:focus-visible {
    background: #f0f0f0 !important;
    outline: none !important;
}

.sourcing-map__close {
    position: absolute !important;
    top: 0.4rem !important;
    right: 0.5rem !important;
    border: none !important;
    background: none !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0.15rem !important;
    color: #fff !important;
    opacity: 0.8;
}

.sourcing-map__close:hover {
    opacity: 1;
}

/*
 * Single job: the headed fact list from [job_details] and the apply block
 * from [job_apply]. Headings match the h3s in the job description.
 */
/* Spaced like the h3s above it, so the details read as part of the description. */
.job-details__item {
    margin: 1.75rem 0 0;
}

/* Doubled-up selectors outrank the Elementor kit's h3 and link colours. */
.job-details .job-details__heading,
.job-content.job-content h3 {
    margin: 0 0 0.35rem;
    font-family: var(--e-global-typography-primary-font-family), sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    line-height: 1.25;
    color: var(--e-global-color-primary);
}

.job-content.job-content h3 {
    margin-top: 1.75rem;
}

.job-details ul,
.job-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Same gap after a list as after a paragraph. */
.job-content.job-content ul {
    margin-bottom: 0.9rem;
}

.job-details li::before,
.job-content li::before {
    content: "\2022\00a0";
}

.job-details p {
    margin: 0;
}

.job-apply .job-apply__button,
.job-apply .job-apply__button:visited {
    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    padding: 11px 24px;
    border-radius: 44px;
    background: var(--e-global-color-accent);
    color: #fff;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
    font-weight: 300;
    font-size: 22px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s ease;
}

/* The same flat caret the site's Elementor buttons use. */
.job-apply .job-apply__button::after {
    content: "";
    width: 0.4em;
    height: 0.65em;
    background: currentColor;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.job-apply .job-apply__button:hover,
.job-apply .job-apply__button:focus-visible {
    background: var(--e-global-color-d18dc36);
    color: #fff;
}

@media (max-width: 767px) {
    .job-apply .job-apply__button {
        font-size: 18px;
    }
}

/*
 * Job share buttons: larger icons, and the bare Facebook "f", LinkedIn "in"
 * and Telegram plane from the design in place of Elementor's boxed logos.
 */
.job-share .elementor-share-btn__icon svg {
    width: 22px;
    height: 22px;
}

.job-share .elementor-share-btn_facebook .elementor-share-btn__icon svg,
.job-share .elementor-share-btn_linkedin .elementor-share-btn__icon svg,
.job-share .elementor-share-btn_telegram .elementor-share-btn__icon svg {
    display: none;
}

.job-share .elementor-share-btn_facebook .elementor-share-btn__icon::before,
.job-share .elementor-share-btn_linkedin .elementor-share-btn__icon::before,
.job-share .elementor-share-btn_telegram .elementor-share-btn__icon::before {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    background: #fff;
    -webkit-mask: no-repeat center / contain;
    mask: no-repeat center / contain;
}

.job-share .elementor-share-btn_facebook .elementor-share-btn__icon::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M80 299.3V512H196V299.3h86.5l18-97.8H196V166.9c0-51.7 20.3-71.5 72.7-71.5c16.3 0 29.4 .4 37 1.2V7.9C291.4 4 256.4 0 236.2 0C129.3 0 80 50.5 80 159.4v42.1H14v97.8H80z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M80 299.3V512H196V299.3h86.5l18-97.8H196V166.9c0-51.7 20.3-71.5 72.7-71.5c16.3 0 29.4 .4 37 1.2V7.9C291.4 4 256.4 0 236.2 0C129.3 0 80 50.5 80 159.4v42.1H14v97.8H80z'/%3E%3C/svg%3E");
}

.job-share .elementor-share-btn_linkedin .elementor-share-btn__icon::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z'/%3E%3C/svg%3E");
}

.job-share .elementor-share-btn_telegram .elementor-share-btn__icon::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M446.7 98.6l-67.6 318.8c-5.1 22.5-18.4 28.1-37.3 17.5l-103-75.9-49.7 47.8c-5.5 5.5-10.1 10.1-20.7 10.1l7.4-104.9 190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8 284 16.2 252.2c-22.1-6.9-22.5-22.1 4.6-32.7L418.2 66.4c18.4-6.9 34.5 4.1 28.5 32.2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M446.7 98.6l-67.6 318.8c-5.1 22.5-18.4 28.1-37.3 17.5l-103-75.9-49.7 47.8c-5.5 5.5-10.1 10.1-20.7 10.1l7.4-104.9 190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8 284 16.2 252.2c-22.1-6.9-22.5-22.1 4.6-32.7L418.2 66.4c18.4-6.9 34.5 4.1 28.5 32.2z'/%3E%3C/svg%3E");
}

/*
 * Job application popup: the CV picker's button, in the same navy as the
 * dropdown button. Elementor's per-widget CSS drops this pseudo-element, so
 * it lives here.
 */
.job-application-form input[type="file"]::file-selector-button {
    height: 38px;
    margin-right: 12px;
    padding: 0 16px;
    line-height: 38px;
    vertical-align: top;
    border: none;
    border-radius: 8px;
    background: var(--e-global-color-d2f90f6);
    color: #fff;
    font-family: inherit;
    cursor: pointer;
}

.job-application-form input[type="file"]::-webkit-file-upload-button {
    height: 38px;
    margin-right: 12px;
    padding: 0 16px;
    line-height: 38px;
    vertical-align: top;
    border: none;
    border-radius: 8px;
    background: var(--e-global-color-d2f90f6);
    color: #fff;
    font-family: inherit;
    cursor: pointer;
}

/*
 * "Copy link" share button added by app.js: show a small "Link copied"
 * bubble above it once the link is on the clipboard.
 */
.elementor-share-btn.copernus-copy-link {
    position: relative;
    overflow: visible;
    cursor: pointer;
}

.copernus-copy-link[data-copied]::after {
    content: "Link copied";
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--e-global-color-d2f90f6);
    color: #fff;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: normal;
    word-spacing: normal;
    white-space: nowrap;
    pointer-events: none;
}

/*
 * Leadership Team cards that open a profile pop-up (see app.js).
 */
/* The carousel clips anything outside the slide, so the hover is a colour
   change rather than a lift or shadow. */
.team-card.team-card--has-profile {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.team-card.team-card--has-profile:hover,
.team-card.team-card--has-profile:focus-visible {
    /* Beats Elementor's per-element background rule. */
    background-color: var(--e-global-color-d2f90f6) !important;
}

.team-card.team-card--has-profile:focus-visible {
    outline: none;
}

/* The pop-up's photo stays square like the cards. */
.team-popup__photo img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Popup close buttons: no focus box when clicked, keep it for keyboard users. */
.elementor-popup-modal .dialog-close-button:focus:not(:focus-visible) {
    outline: none;
}

/* Anchored headings (e.g. /privacy-policy/#cookies) clear the sticky header. */
h1[id], h2[id], h3[id], h4[id] {
    scroll-margin-top: 100px;
}

/* CookieYes banner: match site brand colours (plugin sets colours inline, free plan can't change them). */
.cky-btn-accept,
.cky-btn-reject,
.cky-btn-preferences {
    color: #fff !important;
    background-color: #1d5375 !important;
    border-color: #1d5375 !important;
}

.cky-btn-customize {
    color: #1d5375 !important;
    background-color: transparent !important;
    border-color: #1d5375 !important;
}

.cky-btn {
    font-size: 16px !important;
    line-height: 1.25 !important;
    padding: 11px 20px !important;
    margin: 0 !important;
}

.cky-btn:hover {
    opacity: 0.85;
}

/* Banner buttons: Reject and Accept side by side (equal weight), Customise full width below. */
.cky-notice-btn-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cky-notice-btn-wrapper .cky-btn-reject {
    order: 1 !important;
}

.cky-notice-btn-wrapper .cky-btn-accept {
    order: 2 !important;
}

.cky-notice-btn-wrapper .cky-btn-customize {
    order: 3 !important;
    grid-column: 1 / -1;
}

/* Mobile: CookieYes stacks the buttons with its own order; keep the same layout and tighten the text. */
@media (max-width: 440px) {
    .cky-notice-btn-wrapper {
        margin-top: 16px !important;
    }

    .cky-notice .cky-title {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }

    .cky-notice-des,
    .cky-notice-des * {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
}

.cky-prefrence-btn-wrapper {
    gap: 10px;
}

.cky-policy {
    color: var(--e-global-color-primary, #3797d3) !important;
}

.cky-btn-revisit-wrapper {
    background-color: #1d5375 !important;
}

.cky-switch input[type="checkbox"]:checked {
    background: var(--e-global-color-primary, #3797d3) !important;
}
