/* ==========================================================================
   Job Opportunities page (page-job-openings.php)
   Styles the WP Job Openings plugin output to match the site (teal brand,
   same header style as the Release Calendar / Departments pages).
   Everything is scoped under .abp-jobs so no other page is affected.
   ========================================================================== */

.abp-jobs {
    --jobs-primary:      #26a69a;
    --jobs-primary-dark: #00897b;
    --jobs-text:         #1a1a1a;
    --jobs-text-mid:     #4a5568;
    --jobs-text-light:   #718096;
    --jobs-border:       #e3e7ec;
    --jobs-bg:           #f7f8fa;
    --jobs-radius:       12px;
    --jobs-shadow:       0 2px 8px rgba(0, 0, 0, 0.06);
    --jobs-shadow-hover: 0 10px 28px rgba(38, 166, 154, 0.16);
    background: var(--jobs-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.abp-jobs-hero {
    background: linear-gradient(135deg, var(--jobs-primary) 0%, var(--jobs-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}
/* The Customizer's Additional CSS puts the black/red/green band under every
   <header> element; it belongs to the site header only, not this banner. */
.abp-jobs-hero::after {
    display: none;
}
/* Full width with 64px sides, like the Departments pages (InfoPanel). */
.abp-jobs-hero__inner {
    max-width: 100%;
    margin: 0;
    padding: 44px 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.abp-jobs-hero__icon {
    flex: 0 0 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}
.abp-jobs-hero__eyebrow {
    margin: 0 0 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}
.abp-jobs-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}
.abp-jobs-hero__text > p:last-child {
    margin: 0;
    max-width: 640px;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.92;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.abp-jobs-body {
    max-width: 100%;
    margin: 0;
    padding: 40px 64px 72px;
    box-sizing: border-box;
}
/* Breadcrumb (InfoPanel) lines up with the header text. */
.abp-jobs .ip-breadcrumb__inner {
    max-width: 100%;
    padding-left: 64px;
    padding-right: 64px;
}
@media (max-width: 1100px) {
    .abp-jobs-hero__inner,
    .abp-jobs-body,
    .abp-jobs .ip-breadcrumb__inner {
        padding-left: 32px;
        padding-right: 32px;
    }
}
@media (max-width: 768px) {
    .abp-jobs .ip-breadcrumb__inner {
        padding-left: 16px;
        padding-right: 16px;
    }
}
.abp-jobs .awsm-job-wrap {
    margin: 0;
}

/* ── Search + filter toolbar ────────────────────────────────────────────── */
.abp-jobs .awsm-filter-wrap {
    margin: 0 0 24px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--jobs-border);
    border-radius: var(--jobs-radius);
    box-shadow: var(--jobs-shadow);
}
.abp-jobs .awsm-filter-wrap form {
    align-items: center;
    gap: 12px;
}
.abp-jobs .awsm-filter-item-search,
.abp-jobs .awsm-filter-wrap .awsm-filter-item {
    padding: 0;
}
.abp-jobs .awsm-filter-item-search {
    flex: 1 1 260px;
    width: auto;
}
/* Desktop: filters sit on the same row as the search box */
@media (min-width: 768px) {
    .abp-jobs .awsm-filter-wrap .awsm-filter-items {
        display: flex;
        flex: 0 0 auto;
        gap: 12px;
        width: auto;
    }
    .abp-jobs .awsm-filter-wrap .awsm-filter-item {
        width: 220px;
    }
}
.abp-jobs .awsm-job-form-control,
.abp-jobs .awsm-selectric {
    min-height: 48px;
    border: 1px solid var(--jobs-border);
    border-radius: 10px;
    background: var(--jobs-bg);
    font-size: 0.95rem;
    color: var(--jobs-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.abp-jobs .awsm-job-search {
    padding-left: 16px;
}
.abp-jobs .awsm-job-form-control:focus {
    outline: none;
    background: #fff;
    border-color: var(--jobs-primary);
    box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.18);
}
.abp-jobs .awsm-job-search-icon-wrapper {
    color: var(--jobs-primary-dark);
}
.abp-jobs .awsm-selectric .label {
    font-size: 0.95rem;
    color: var(--jobs-text-mid);
}
.abp-jobs .awsm-filter-toggle {
    border-radius: 10px;
    border-color: var(--jobs-border);
}

/* ── Job cards ──────────────────────────────────────────────────────────── */
.abp-jobs .awsm-lists {
    border: 0;
    display: grid;
    gap: 14px;
}
.abp-jobs .awsm-list-item .awsm-job-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--jobs-border);
    border-left: 4px solid var(--jobs-primary);
    border-radius: var(--jobs-radius);
    box-shadow: var(--jobs-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.abp-jobs .awsm-list-item .awsm-job-item::after {
    display: none; /* plugin's float clearfix; not needed with flex */
}
.abp-jobs .awsm-list-item .awsm-job-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--jobs-shadow-hover);
}
.abp-jobs .awsm-list-left-col,
.abp-jobs .awsm-list-right-col {
    float: none;
    width: auto;
    padding: 0;
}
.abp-jobs .awsm-list-left-col {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
/* Small briefcase badge in front of each title */
.abp-jobs .awsm-list-left-col::before {
    content: "\f0b1"; /* Font Awesome briefcase */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    flex: 0 0 44px;
    height: 44px;
    border-radius: 10px;
    background: #e8f5f4;
    color: var(--jobs-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.abp-jobs .awsm-job-item h2.awsm-job-post-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
}
.abp-jobs .awsm-job-item h2.awsm-job-post-title a {
    font-size: inherit;
    color: var(--jobs-text);
    text-decoration: none;
}
.abp-jobs .awsm-job-item h2.awsm-job-post-title a:hover,
.abp-jobs .awsm-job-item h2.awsm-job-post-title a:focus {
    color: var(--jobs-primary-dark);
}
/* Job specs (type, location ...) when the plugin shows them */
.abp-jobs .awsm-job-specification-item {
    font-size: 0.85rem;
    color: var(--jobs-text-light);
}

/* "More Details" → button */
.abp-jobs .awsm-list-item .awsm-job-more-container {
    display: block;
}
.abp-jobs a.awsm-job-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--jobs-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, gap 0.2s ease;
}
.abp-jobs a.awsm-job-more span {
    display: none; /* replaced by the arrow below */
}
.abp-jobs a.awsm-job-more::after {
    content: "\2192";
}
.abp-jobs a.awsm-job-more:hover,
.abp-jobs a.awsm-job-more:focus {
    background: var(--jobs-primary-dark);
    color: #fff;
    gap: 12px;
}
.abp-jobs a.awsm-job-more:focus-visible,
.abp-jobs .awsm-job-post-title a:focus-visible {
    outline: 3px solid rgba(38, 166, 154, 0.45);
    outline-offset: 2px;
}

/* Pagination / load more */
.abp-jobs .awsm-jobs-pagination {
    margin-top: 24px;
    text-align: center;
}
.abp-jobs .awsm-load-more-btn,
.abp-jobs .awsm-jobs-pagination a {
    border-radius: 999px;
    border: 1px solid var(--jobs-primary);
    color: var(--jobs-primary-dark);
    background: #fff;
}

/* ── No vacancies ───────────────────────────────────────────────────────── */
/* .jobs-none-container: no jobs at all; .awsm-jobs-none-container: no search/filter match */
.abp-jobs .jobs-none-container,
.abp-jobs .awsm-jobs-none-container {
    padding: 48px 24px;
    background: #fff;
    border: 1px dashed var(--jobs-border);
    border-radius: var(--jobs-radius);
    text-align: center;
    color: var(--jobs-text-mid);
}
.abp-jobs .jobs-none-container p,
.abp-jobs .awsm-jobs-none-container p {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--jobs-text);
}
.abp-jobs .jobs-none-container::after {
    content: "New vacancies are posted here as soon as they open. Please check back soon.";
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--jobs-text-light);
}
.abp-jobs .jobs-none-container::before,
.abp-jobs .awsm-jobs-none-container::before {
    content: "\f0b1";
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: block;
    margin-bottom: 12px;
    font-size: 32px;
    color: var(--jobs-primary);
}

/* ==========================================================================
   Single job page (single-awsm_job_openings.php)
   ========================================================================== */

.abp-jobs .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Spec chips in the header */
.abp-job-chips {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.abp-job-chips li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Two columns: details + summary */
.abp-job-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
}

/* The header chips already show the job specs */
.abp-job-single .awsm-job-specifications-container {
    display: none;
}
.abp-job-single .awsm-job-single-wrap,
.abp-job-single .awsm-job-content {
    margin: 0;
    padding: 0;
    float: none;
    width: auto;
}

/* Job description card */
.abp-job-single .awsm-job-entry-content {
    margin-bottom: 24px; /* gap above the application form */
    padding: 32px 36px;
    background: #fff;
    border: 1px solid var(--jobs-border);
    border-radius: var(--jobs-radius);
    box-shadow: var(--jobs-shadow);
    color: var(--jobs-text-mid);
    font-size: 1rem;
    line-height: 1.7;
}
/* A job with no description: don't show an empty card */
.abp-job-single .awsm-job-entry-content:not(:has(*)) {
    display: none; /* its bottom margin goes with it, so the form moves up */
}
.abp-job-single .awsm-job-entry-content > :first-child {
    margin-top: 0;
}
.abp-job-single .awsm-job-entry-content > :last-child {
    margin-bottom: 0;
}
.abp-job-single .awsm-job-entry-content p {
    margin: 0 0 1em;
}
.abp-job-single .awsm-job-entry-content strong {
    color: var(--jobs-text);
}
.abp-job-single .awsm-job-entry-content h2,
.abp-job-single .awsm-job-entry-content h3,
.abp-job-single .awsm-job-entry-content h4 {
    margin: 1.8em 0 0.7em;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f5f4;
    color: var(--jobs-text);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}
.abp-job-single .awsm-job-entry-content ul,
.abp-job-single .awsm-job-entry-content ol {
    margin: 0 0 1em;
    padding-left: 0;
    list-style: none;
}
.abp-job-single .awsm-job-entry-content li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 28px;
}
.abp-job-single .awsm-job-entry-content ul li::before {
    content: "\f00c"; /* check mark */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.15em;
    font-size: 0.8rem;
    color: var(--jobs-primary);
}
.abp-job-single .awsm-job-entry-content ol {
    counter-reset: abp-job-ol;
}
.abp-job-single .awsm-job-entry-content ol li::before {
    counter-increment: abp-job-ol;
    content: counter(abp-job-ol) ".";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--jobs-primary-dark);
}
.abp-job-single .awsm-job-entry-content hr {
    display: none; /* the card edge already separates it from the form */
}
.abp-job-single .awsm-job-entry-content a {
    color: var(--jobs-primary-dark);
}

/* Application form card */
.abp-job-single .awsm-job-form {
    float: none;
    width: auto;
    padding: 0;
    margin-top: 0;
    scroll-margin-top: calc(var(--abp-header-h, 100px) + 16px);
}
.abp-job-single .awsm-job-form-inner {
    padding: 32px 36px;
    background: #fff;
    border: 1px solid var(--jobs-border);
    border-top: 4px solid var(--jobs-primary);
    border-radius: var(--jobs-radius);
    box-shadow: var(--jobs-shadow);
}
.abp-job-single .awsm-job-form-inner h2 {
    margin: 0 0 24px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--jobs-text);
}
.abp-job-single .awsm-job-form-group {
    margin-bottom: 18px;
}
.abp-job-single .awsm-job-form-group label {
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--jobs-text);
}
.abp-job-single .awsm-job-form-error {
    color: #e53e3e;
}
.abp-job-single input.awsm-job-form-control,
.abp-job-single textarea.awsm-job-form-control,
.abp-job-single select.awsm-job-form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--jobs-border);
    border-radius: 10px;
    background: var(--jobs-bg);
    font: inherit;
    font-size: 0.95rem;
    color: var(--jobs-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.abp-job-single textarea.awsm-job-form-control {
    min-height: 140px;
    resize: vertical;
}
.abp-job-single input.awsm-job-form-control:focus,
.abp-job-single textarea.awsm-job-form-control:focus,
.abp-job-single select.awsm-job-form-control:focus {
    outline: none;
    background: #fff;
    border-color: var(--jobs-primary);
    box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.18);
}
.abp-job-single input.awsm-form-file-control {
    padding: 10px;
    background: #fff;
    border-style: dashed;
    cursor: pointer;
}
.abp-job-single input.awsm-form-file-control::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: #e8f5f4;
    color: var(--jobs-primary-dark);
    font-weight: 600;
    cursor: pointer;
}
.abp-job-single .awsm-job-form-group small,
.abp-job-single .awsm-job-form-group .awsm-job-form-description {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--jobs-text-light);
}
.abp-job-single input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--jobs-primary);
    vertical-align: middle;
}
.abp-job-single label.error,
.abp-job-single .awsm-job-form-group .error {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #e53e3e;
}
.abp-job-single input.awsm-application-submit-btn {
    display: inline-block;
    padding: 13px 32px;
    border: 0;
    border-radius: 999px;
    background: var(--jobs-primary);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.abp-job-single input.awsm-application-submit-btn:hover,
.abp-job-single input.awsm-application-submit-btn:focus {
    background: var(--jobs-primary-dark);
}
.abp-job-single input.awsm-application-submit-btn:focus-visible {
    outline: 3px solid rgba(38, 166, 154, 0.45);
    outline-offset: 2px;
}
.abp-job-single .awsm-application-message {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #e8f5f4;
    color: var(--jobs-primary-dark);
}

/* Summary sidebar */
.abp-job-aside {
    position: sticky;
    top: calc(var(--abp-header-h, 100px) + 16px);
}
.abp-job-summary {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--jobs-border);
    border-radius: var(--jobs-radius);
    box-shadow: var(--jobs-shadow);
}
.abp-job-summary h2 {
    margin: 0 0 14px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--jobs-text-light);
}
.abp-job-summary dl {
    margin: 0 0 20px;
}
.abp-job-summary dl > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f4;
    font-size: 0.92rem;
}
.abp-job-summary dt {
    color: var(--jobs-text-light);
}
.abp-job-summary dd {
    margin: 0;
    font-weight: 600;
    color: var(--jobs-text);
    text-align: right;
}
.abp-job-apply {
    display: block;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--jobs-primary);
    color: #fff;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease;
}
.abp-job-apply:hover,
.abp-job-apply:focus {
    background: var(--jobs-primary-dark);
    color: #fff;
}
.abp-job-back {
    display: block;
    margin-top: 14px;
    font-size: 0.9rem;
    text-align: center;
    color: var(--jobs-primary-dark);
    text-decoration: none;
}
.abp-job-back:hover,
.abp-job-back:focus {
    text-decoration: underline;
}

@media (max-width: 960px) {
    .abp-job-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    /* Summary moves above the description on narrow screens */
    .abp-job-aside {
        position: static;
        order: -1;
    }
}

/* ── Small screens ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .abp-job-single .awsm-job-entry-content,
    .abp-job-single .awsm-job-form-inner {
        padding: 22px 18px;
    }
    .abp-job-single input.awsm-application-submit-btn {
        width: 100%;
    }
    .abp-jobs-hero__inner {
        padding: 32px 16px;
        gap: 16px;
        align-items: flex-start;
    }
    .abp-jobs-hero__icon {
        flex-basis: 52px;
        height: 52px;
        font-size: 22px;
        border-radius: 14px;
    }
    .abp-jobs-body {
        padding: 20px 16px 48px;
    }
    /* Keep the filter button on the same row as the search box */
    .abp-jobs .awsm-filter-item-search {
        flex: 1 1 0;
        min-width: 0;
    }
    .abp-jobs .awsm-filter-wrap .awsm-filter-items {
        flex: 1 1 100%; /* opened filters drop to their own full-width row */
    }
    .abp-jobs .awsm-list-item .awsm-job-item {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px;
    }
    .abp-jobs a.awsm-job-more {
        width: 100%;
        justify-content: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .abp-jobs .awsm-list-item .awsm-job-item,
    .abp-jobs a.awsm-job-more {
        transition: none;
    }
    .abp-jobs .awsm-list-item .awsm-job-item:hover {
        transform: none;
    }
}
