/**
 * Aimstyle – Careers widget.
 *
 * Original HTML-widget design. Elementor Style controls override the
 * --swm-* custom properties; var() fallbacks keep the original values.
 */

.swm-careers,
.swm-careers *,
.swm-careers *::before,
.swm-careers *::after {
    box-sizing: border-box;
}

.swm-careers {
    --swm-navy: #04293d;
    --swm-blue: #034872;
    --swm-green: #00833e;
    --swm-text: #758087;
    --swm-light: #f5f8f7;
    --swm-border: rgba(4, 41, 61, 0.14);

    width: 100%;
    margin: 0;
    padding: 20px 0;
    background: transparent;
    font-family: "Rethink Sans", sans-serif;
}

/* ==========================================
   Career Path Selector
========================================== */

.swm-careers__selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin-bottom: 48px;
}

/*
 * The !important declarations prevent the
 * WordPress theme button styles from overriding
 * the tab background and hover colours.
 */
.swm-careers button.swm-careers__tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    width: 100%;
    min-height: 165px;
    margin: 0 !important;
    padding: 28px 30px !important;
    border: 1px solid var(--swm-border) !important;
    border-radius: 18px !important;
    outline: 0;
    color: var(--swm-navy) !important;
    background: var(--swm-tab-bg, #ffffff) !important;
    background-color: var(--swm-tab-bg, #ffffff) !important;
    background-image: none !important;
    box-shadow: none;
    font-family: "Rethink Sans", sans-serif !important;
    font-size: inherit;
    line-height: normal;
    text-align: left;
    text-decoration: none !important;
    appearance: none;
    cursor: pointer;
    overflow: hidden;

    transition:
        color 0.35s ease,
        background-color 0.35s ease,
        border-color 0.35s ease,
        transform 0.35s ease,
        box-shadow 0.35s ease !important;
}

/* Background decoration */

.swm-careers button.swm-careers__tab::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background:
        radial-gradient(
            circle at 15% 50%,
            rgba(255, 255, 255, 0.18),
            transparent 36%
        );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

/* Remove any theme-generated button pseudo element */

.swm-careers button.swm-careers__tab::after {
    content: none !important;
    display: none !important;
}

/* Inactive tab hover */

.swm-careers button.swm-careers__tab:not(.is-active):hover {
    color: #ffffff !important;
    background: var(--swm-green) !important;
    background-color: var(--swm-green) !important;
    background-image: none !important;
    border-color: var(--swm-green) !important;
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(0, 131, 62, 0.2) !important;
}

.swm-careers button.swm-careers__tab:not(.is-active):hover::before {
    opacity: 1;
}

/* Active tab */

.swm-careers button.swm-careers__tab.is-active,
.swm-careers button.swm-careers__tab.is-active:hover {
    color: #ffffff !important;
    background: var(--swm-navy) !important;
    background-color: var(--swm-navy) !important;
    background-image: none !important;
    border-color: var(--swm-navy) !important;
    transform: translateY(0);
    box-shadow: 0 20px 45px rgba(4, 41, 61, 0.17) !important;
}

.swm-careers button.swm-careers__tab.is-active:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(4, 41, 61, 0.22) !important;
}

.swm-careers button.swm-careers__tab.is-active::before {
    opacity: 1;
}

/* Keyboard focus */

.swm-careers button.swm-careers__tab:focus-visible {
    outline: 3px solid rgba(0, 131, 62, 0.28);
    outline-offset: 4px;
}

/* Tab inner elements */

.swm-careers__tab-icon,
.swm-careers__tab-content,
.swm-careers__tab-arrow {
    position: relative;
    z-index: 2;
}

.swm-careers__tab-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: var(--swm-green);
    background: rgba(0, 131, 62, 0.09);

    transition:
        color 0.35s ease,
        background-color 0.35s ease,
        transform 0.35s ease;
}

.swm-careers__tab-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.swm-careers__tab-content {
    flex: 1;
    min-width: 0;
}

.swm-careers__tab-label {
    display: block;
    margin-bottom: 7px;
    color: var(--swm-green);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    transition: color 0.35s ease;
}

.swm-careers__tab-title {
    display: block;
    margin-bottom: 8px;
    color: var(--swm-navy);
    font-size: clamp(21px, 2vw, 28px);
    font-weight: 700;
    line-height: 1.15;

    transition: color 0.35s ease;
}

.swm-careers__tab-description {
    display: block;
    color: var(--swm-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;

    transition: color 0.35s ease;
}

/* Inactive tab hover content colours */

.swm-careers button.swm-careers__tab:not(.is-active):hover
.swm-careers__tab-label,
.swm-careers button.swm-careers__tab:not(.is-active):hover
.swm-careers__tab-title {
    color: #ffffff !important;
}

.swm-careers button.swm-careers__tab:not(.is-active):hover
.swm-careers__tab-description {
    color: rgba(255, 255, 255, 0.78) !important;
}

.swm-careers button.swm-careers__tab:not(.is-active):hover
.swm-careers__tab-icon {
    color: var(--swm-green);
    background: #ffffff;
    transform: scale(1.05);
}

/* Active tab content colours */

.swm-careers button.swm-careers__tab.is-active
.swm-careers__tab-label {
    color: rgba(255, 255, 255, 0.68) !important;
}

.swm-careers button.swm-careers__tab.is-active
.swm-careers__tab-title {
    color: #ffffff !important;
}

.swm-careers button.swm-careers__tab.is-active
.swm-careers__tab-description {
    color: rgba(255, 255, 255, 0.72) !important;
}

.swm-careers button.swm-careers__tab.is-active
.swm-careers__tab-icon {
    color: #ffffff;
    background: var(--swm-green);
}

/* Tab arrow */

.swm-careers__tab-arrow {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(4, 41, 61, 0.15);
    border-radius: 50%;
    color: var(--swm-navy);
    background: #ffffff;

    transition:
        color 0.35s ease,
        background-color 0.35s ease,
        border-color 0.35s ease,
        transform 0.35s ease;
}

.swm-careers__tab-arrow svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform 0.35s ease;
}

.swm-careers button.swm-careers__tab:hover
.swm-careers__tab-arrow {
    transform: scale(1.04);
}

.swm-careers button.swm-careers__tab:hover
.swm-careers__tab-arrow svg {
    transform: translateX(3px);
}

.swm-careers button.swm-careers__tab:not(.is-active):hover
.swm-careers__tab-arrow {
    color: var(--swm-green);
    background: #ffffff;
    border-color: #ffffff;
}

.swm-careers button.swm-careers__tab.is-active
.swm-careers__tab-arrow {
    color: #ffffff;
    background: var(--swm-green);
    border-color: var(--swm-green);
}

/* ==========================================
   Career Panels
========================================== */

.swm-careers__panel[hidden] {
    display: none !important;
}

.swm-careers__panel {
    animation: swmPanelFade 0.45s ease;
}

@keyframes swmPanelFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swm-careers__panel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.swm-careers__panel-heading {
    max-width: 720px;
}

.swm-careers__eyebrow {
    display: block;
    margin-bottom: 9px;
    color: var(--swm-green);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.swm-careers__panel-heading h2 {
    margin: 0 0 10px;
    color: var(--swm-navy);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.swm-careers__panel-heading p {
    max-width: 650px;
    margin: 0;
    color: var(--swm-text);
    font-size: 16px;
    line-height: 1.7;
}

.swm-careers__department {
    flex: 0 0 auto;
    padding: 11px 17px;
    border: 1px solid rgba(0, 131, 62, 0.2);
    border-radius: 50px;
    color: var(--swm-green);
    background: rgba(0, 131, 62, 0.055);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ==========================================
   Jobs List
========================================== */

.swm-jobs__list {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid var(--swm-border);
}

.swm-job {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto 58px;
    align-items: center;
    gap: 28px;
    min-height: 145px;
    padding: 28px 12px;
    border-bottom: 1px solid var(--swm-border);
    color: inherit;
    text-decoration: none !important;
    overflow: hidden;

    transition:
        padding 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.swm-job::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 131, 62, 0.09),
        rgba(3, 72, 114, 0.025)
    );
    transform: translateX(-101%);
    transition: transform 0.45s cubic-bezier(.2, .8, .2, 1);
}

.swm-job:hover {
    padding-right: 28px;
    padding-left: 28px;
    border-color: rgba(0, 131, 62, 0.35);
    box-shadow: 0 15px 35px rgba(4, 41, 61, 0.06);
}

.swm-job:hover::before {
    transform: translateX(0);
}

.swm-job > * {
    position: relative;
    z-index: 2;
}

.swm-job__number {
    color: var(--swm-green);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.swm-job__content {
    min-width: 0;
}

.swm-job__title {
    margin: 0 0 12px;
    color: var(--swm-navy);
    font-size: clamp(23px, 2.2vw, 32px);
    font-weight: 700;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.swm-job__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px 20px;
    color: var(--swm-text);
    font-size: 15px;
    line-height: 1.5;
}

.swm-job__meta span {
    position: relative;
}

.swm-job__meta span:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -12px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0, 131, 62, 0.55);
    transform: translateY(-50%);
}

.swm-job__type {
    padding: 9px 16px;
    border: 1px solid rgba(0, 131, 62, 0.22);
    border-radius: 50px;
    color: var(--swm-green);
    background: rgba(0, 131, 62, 0.055);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    white-space: nowrap;
    text-transform: uppercase;
}

.swm-job__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(4, 41, 61, 0.16);
    border-radius: 50%;
    color: var(--swm-navy);
    background: #ffffff;

    transition:
        color 0.35s ease,
        background-color 0.35s ease,
        border-color 0.35s ease,
        transform 0.35s ease;
}

.swm-job__arrow svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.swm-job:hover .swm-job__title {
    color: var(--swm-green);
}

.swm-job:hover .swm-job__arrow {
    color: #ffffff;
    background: var(--swm-green);
    border-color: var(--swm-green);
    transform: translateX(5px);
}

/* ==========================================
   Application Route
========================================== */

.swm-careers__route {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 35px;
    padding: 30px 34px 24px;
    border: 1px solid var(--swm-border);
    border-radius: 18px;
    background: var(--swm-light);
}

.swm-careers__route-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
}

.swm-careers__route-content h3 {
    margin: 0 0 8px;
    color: var(--swm-navy);
    font-size: 24px;
    font-weight: 700;
}

.swm-careers__route-content p {
    max-width: 720px;
    margin: 0;
    color: var(--swm-text);
    font-size: 15px;
    line-height: 1.65;
}

/* Application buttons */

.swm-careers a.swm-careers__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 13px 23px !important;
    border: 1px solid var(--swm-button-bg, var(--swm-green)) !important;
    border-radius: 50px !important;
    color: var(--swm-button-color, #ffffff) !important;
    background: var(--swm-button-bg, var(--swm-green)) !important;
    background-color: var(--swm-button-bg, var(--swm-green)) !important;
    background-image: none !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease !important;
}

.swm-careers a.swm-careers__button:hover {
    color: var(--swm-button-hover-color, #ffffff) !important;
    background: var(--swm-button-hover-bg, var(--swm-navy)) !important;
    background-color: var(--swm-button-hover-bg, var(--swm-navy)) !important;
    border-color: var(--swm-button-hover-bg, var(--swm-navy)) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(4, 41, 61, 0.16);
}

.swm-careers__button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform 0.3s ease;
}

.swm-careers__button:hover svg {
    transform: translateX(3px);
}

/* ==========================================
   Applicant Privacy Note
========================================== */

.swm-careers__route-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-top: 17px;
    border-top: 1px solid rgba(4, 41, 61, 0.10);
}

.swm-careers__route-note-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--swm-green);
    background: rgba(0, 131, 62, 0.08);
}

.swm-careers__route-note-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.swm-careers__route-note-content {
    min-width: 0;
    padding-top: 1px;
}

.swm-careers__route-note-label {
    display: block;
    margin-bottom: 3px;
    color: var(--swm-navy);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.swm-careers__route-note-content p {
    margin: 0;
    color: var(--swm-text);
    font-size: 12px;
    line-height: 1.6;
}

.swm-careers__route-note-content a {
    color: var(--swm-green);
    font-weight: 700;
    text-decoration: none;
}

.swm-careers__route-note-content a:hover {
    text-decoration: underline;
}

.swm-careers__privacy-policy {
    font-weight: 700;
    color: var(--swm-navy);
}

/* ==========================================
   Onboard Panel Card
========================================== */

.swm-onboard-card {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 170px;
    padding: 32px;
    border: 1px solid var(--swm-border);
    border-radius: 18px;
    background: linear-gradient(
        135deg,
        rgba(0, 131, 62, 0.075),
        rgba(3, 72, 114, 0.025)
    );
}

.swm-onboard-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--swm-navy);
}

.swm-onboard-card__icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.swm-onboard-card__content h3 {
    margin: 0 0 8px;
    color: var(--swm-navy);
    font-size: clamp(24px, 2.5vw, 34px);
    line-height: 1.2;
}

.swm-onboard-card__content p {
    max-width: 720px;
    margin: 0;
    color: var(--swm-text);
    font-size: 15px;
    line-height: 1.7;
}

/* ==========================================
   Responsive
========================================== */

@media (max-width: 1024px) {
    .swm-careers__selector {
        gap: 14px;
    }

    .swm-careers button.swm-careers__tab {
        padding: 24px !important;
    }

    .swm-careers__tab-arrow {
        display: none;
    }

    .swm-job {
        grid-template-columns: 50px minmax(0, 1fr) auto 48px;
        gap: 20px;
    }

    .swm-job__arrow {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 767px) {
    .swm-careers {
        padding: 10px 0;
    }

    .swm-careers__selector {
        grid-template-columns: 1fr;
        margin-bottom: 35px;
    }

    .swm-careers button.swm-careers__tab {
        min-height: 135px;
        padding: 22px !important;
    }

    .swm-careers__tab-icon {
        width: 54px;
        height: 54px;
    }

    .swm-careers__panel-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .swm-careers__panel-heading h2 {
        font-size: 36px;
    }

    .swm-careers__department {
        white-space: normal;
    }

    .swm-job {
        grid-template-columns: 42px minmax(0, 1fr) 44px;
        gap: 14px;
        min-height: auto;
        padding: 25px 4px;
    }

    .swm-job:hover {
        padding-right: 10px;
        padding-left: 10px;
    }

    .swm-job__type {
        grid-column: 2 / 4;
        justify-self: start;
        margin-top: 3px;
        padding: 7px 12px;
    }

    .swm-job__title {
        font-size: 22px;
        overflow-wrap: anywhere;
    }

    .swm-job__meta {
        gap: 7px 15px;
        font-size: 14px;
    }

    .swm-job__arrow {
        width: 42px;
        height: 42px;
    }

    .swm-careers__route,
    .swm-onboard-card {
        padding: 25px;
    }

    .swm-careers__route-main {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .swm-onboard-card {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 18px;
    }

    .swm-onboard-card__icon {
        width: 54px;
        height: 54px;
    }

    .swm-onboard-card .swm-careers__button {
        grid-column: 1 / -1;
    }

    .swm-careers__route .swm-careers__button,
    .swm-onboard-card .swm-careers__button {
        width: 100%;
    }

    .swm-careers__route-note {
        gap: 10px;
        padding-top: 15px;
    }
}

@media (max-width: 480px) {
    .swm-careers button.swm-careers__tab {
        align-items: flex-start;
        gap: 14px;
        min-height: auto;
        padding: 18px !important;
    }

    .swm-careers__tab-icon {
        width: 46px;
        height: 46px;
    }

    .swm-careers__tab-icon svg {
        width: 23px;
        height: 23px;
    }

    .swm-careers__tab-title {
        font-size: 20px;
        line-height: 1.2;
    }

    .swm-careers__tab-description {
        font-size: 12.5px;
        line-height: 1.5;
    }

    .swm-careers__panel-heading h2 {
        font-size: 30px;
        line-height: 1.15;
    }

    .swm-careers__panel-heading p {
        font-size: 14px;
        line-height: 1.6;
    }

    .swm-job {
        grid-template-columns: minmax(0, 1fr) 38px;
        gap: 12px;
        padding: 22px 0;
    }

    .swm-job:hover {
        padding-right: 6px;
        padding-left: 6px;
    }

    .swm-job__number {
        display: none;
    }

    .swm-job__content {
        min-width: 0;
    }

    .swm-job__title {
        margin-bottom: 9px;
        font-size: 20px;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .swm-job__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 13px;
        line-height: 1.45;
    }

    .swm-job__meta span {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .swm-job__meta span:not(:last-child)::after {
        display: none;
    }

    .swm-job__type {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 5px;
        padding: 7px 11px;
        font-size: 11.5px;
        white-space: normal;
    }

    .swm-job__arrow {
        width: 38px;
        height: 38px;
    }

    .swm-careers__route,
    .swm-onboard-card {
        padding: 20px;
    }

    .swm-onboard-card {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 14px;
    }

    .swm-onboard-card__icon {
        width: 46px;
        height: 46px;
    }

    .swm-onboard-card__icon svg {
        width: 23px;
        height: 23px;
    }

    .swm-onboard-card__content h3 {
        font-size: 22px;
        line-height: 1.25;
    }

    .swm-onboard-card__content p {
        font-size: 13.5px;
        line-height: 1.6;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .swm-careers *,
    .swm-careers *::before,
    .swm-careers *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Full applicant privacy notice shared by both career paths */
.swm-careers__privacy-section { margin-top: 32px; }
.swm-careers__privacy-section .swm-careers__route-note { padding-top: 0; border-top: 0; }
.swm-careers__privacy-section .swm-careers__route-note-label { font-size: 18px; margin: 0 0 12px; }
.swm-careers__privacy-section .swm-careers__route-note-content p { font-size: 14px; line-height: 1.7; margin: 0 0 12px; }
