/* ==========================================================================
   Vacature-archief (concept) — master/detail weergave (brabantzorg-stijl)
   ========================================================================== */

.awcf-vac-archive {
    --awcf-accent: #c25233;   /* oranje-rood (brand) */
    --awcf-accent-dark: #a8401f;
    --awcf-blue: #2a4a6b;     /* donkerblauw voor koppen */
    --awcf-blue-soft: #7fb3dc;
    --awcf-ink: #1f2933;
    --awcf-muted: #6b7785;
    --awcf-line: #e4e8ee;
    --awcf-bg: #f3f6f9;
    --awcf-bg-soft: #f7f9fb;
    --awcf-radius: 10px;
    --awcf-shadow: 0 1px 3px rgba(31,41,51,.06);
    --awcf-shadow-lg: 0 10px 30px rgba(31,41,51,.12);
    max-width: 1240px;
    margin: 0 auto;
    color: var(--awcf-ink);
    box-sizing: border-box;
}
.awcf-vac-archive *, .awcf-vac-archive *::before, .awcf-vac-archive *::after { box-sizing: border-box; }

/* ============================ TOOLBAR ============================ */
.awcf-vac-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--awcf-line);
    border-radius: var(--awcf-radius);
    box-shadow: var(--awcf-shadow);
    margin-bottom: 18px;
}
.awcf-vac-toolbar { flex-direction: column; align-items: stretch; }

/* Rij 1: zoekbalk + reset */
.awcf-vac-searchrow { display: flex; align-items: center; gap: 14px; }
.awcf-vac-search { flex: 1 1 auto; }
.awcf-vac-search .facetwp-search-wrap, .awcf-vac-search input.facetwp-search { width: 100%; }
.awcf-vac-search .facetwp-search-wrap { position: relative; }
.awcf-vac-search input.facetwp-search {
    padding: 13px 18px; border: 1.5px solid var(--awcf-line);
    border-radius: 999px; font-size: 15px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.awcf-vac-search input.facetwp-search:focus {
    border-color: var(--awcf-accent); outline: none; box-shadow: 0 0 0 3px rgba(194,82,51,.10);
}
.awcf-vac-reset .facetwp-reset, .awcf-vac-reset a {
    font-size: 14px; color: var(--awcf-accent); text-decoration: underline; cursor: pointer; white-space: nowrap;
}

/* Rij 2: filter-dropdowns — vullen samen de balk, elk even breed */
.awcf-vac-filters { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.awcf-vac-filters .facetwp-facet { margin: 0 !important; flex: 1 1 160px; min-width: 150px; }
.awcf-vac-filters .fs-wrap { width: 100%; }

/* ===== Custom filter-knoppen + panel/modal met checkboxes ===== */
/* GEEN position hier: het panel ankert aan .awcf-vac-filters → full width. */
.awcf-vac-filter { position: static; }

/* Knop */
.awcf-vac-filter__btn {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px;
    padding: 0 14px; background: #fff; border: 1.5px solid var(--awcf-line); border-radius: 10px;
    cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--awcf-ink); text-align: left;
    transition: border-color .15s, box-shadow .15s;
}
.awcf-vac-filter__btn:hover { border-color: var(--awcf-blue-soft); }
.awcf-vac-filter.is-open .awcf-vac-filter__btn {
    border-color: var(--awcf-blue-soft); box-shadow: 0 0 0 3px rgba(42,74,107,.10);
}
.awcf-vac-filter__label { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.awcf-vac-filter__badge {
    flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--awcf-blue); color: #fff; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
/* Chevron — netjes gecentreerd */
.awcf-vac-filter__chevron {
    flex: 0 0 auto; width: 9px; height: 9px;
    border-right: 2px solid var(--awcf-muted); border-bottom: 2px solid var(--awcf-muted); border-radius: 1px;
    transform: translateY(-2px) rotate(45deg); transition: transform .2s;
}
.awcf-vac-filter.is-open .awcf-vac-filter__chevron { transform: translateY(1px) rotate(-135deg); }

/* Panel (full-width popover op desktop — ankert aan de hele filter-rij) */
.awcf-vac-filter__panel {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
    width: auto; max-width: none;
    background: #fff; border: 1px solid var(--awcf-line); border-radius: 14px;
    box-shadow: 0 18px 40px rgba(31,41,51,.18); overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
.awcf-vac-filter.is-open .awcf-vac-filter__panel { opacity: 1; visibility: visible; transform: translateY(0); }

.awcf-vac-filter__panelhead {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--awcf-line);
}
.awcf-vac-filter__title { font-weight: 700; color: var(--awcf-blue); font-size: 15px; }
.awcf-vac-filter__close {
    border: none; background: var(--awcf-bg); width: 30px; height: 30px; border-radius: 50%;
    font-size: 20px; line-height: 1; cursor: pointer; color: var(--awcf-ink);
}
.awcf-vac-filter__close:hover { background: var(--awcf-line); }

.awcf-vac-filter__search { padding: 12px 14px 6px; }
.awcf-vac-filter__search input {
    width: 100%; padding: 10px 13px; border: 1.5px solid var(--awcf-line); border-radius: 8px; font-size: 14px;
}
.awcf-vac-filter__search input:focus { border-color: var(--awcf-accent); outline: none; }

.awcf-vac-filter__list { max-height: 320px; overflow-y: auto; padding: 6px 8px 10px; }

/* FacetWP-checkboxes binnen ons panel — custom checkbox-uiterlijk */
.awcf-vac-filter__list .facetwp-facet { margin: 0 !important; }
.awcf-vac-filter__list .facetwp-checkbox {
    display: flex; align-items: center; gap: 11px; padding: 9px 10px; margin: 0 0 1px;
    border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--awcf-ink); line-height: 1.3;
    background-image: none !important; transition: background .12s;
}
.awcf-vac-filter__list .facetwp-checkbox:hover { background: var(--awcf-bg); }
.awcf-vac-filter__list .facetwp-checkbox::before {
    content: ""; flex: 0 0 auto; width: 20px; height: 20px; border: 2px solid var(--awcf-line);
    border-radius: 6px; background: #fff; transition: background .12s, border-color .12s;
}
.awcf-vac-filter__list .facetwp-checkbox.checked { background: rgba(42,74,107,.06); font-weight: 600; }
.awcf-vac-filter__list .facetwp-checkbox.checked::before {
    border-color: var(--awcf-blue);
    background: var(--awcf-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.awcf-vac-filter__list .facetwp-counter { margin-left: auto; color: var(--awcf-muted); font-size: 12.5px; font-weight: 400; }
.awcf-vac-filter__list .facetwp-toggle { display: block; padding: 8px 10px; color: var(--awcf-accent); font-size: 13.5px; cursor: pointer; }

/* Sort-dropdown (native select) */
.awcf-vac-sort select {
    padding: 9px 36px 9px 14px; border: 1.5px solid var(--awcf-line); border-radius: 10px;
    background: #fff; font-size: 14px; color: var(--awcf-ink); cursor: pointer; font-weight: 600;
}
.awcf-vac-sort select:focus { border-color: var(--awcf-accent); outline: none; }

/* ============================ LAYOUT ============================ */
.awcf-vac-layout {
    display: grid;
    grid-template-columns: minmax(360px, 460px) 1fr;
    gap: 20px;
    align-items: start;
}
.awcf-vac-main { min-width: 0; }

/* ============================ LIJST ============================ */
.awcf-vac-list { display: flex; flex-direction: column; gap: 10px; }
.awcf-vac-empty { padding: 40px 0; text-align: center; color: var(--awcf-muted); }

.awcf-vac-card {
    display: block;
    position: relative;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--awcf-line);
    border-left: 3px solid var(--awcf-line);
    border-radius: var(--awcf-radius);
    box-shadow: var(--awcf-shadow);
    text-decoration: none !important;
    color: var(--awcf-ink);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.awcf-vac-card:hover { border-color: var(--awcf-blue-soft); box-shadow: 0 4px 14px rgba(31,41,51,.10); }
.awcf-vac-card.is-active {
    border-left-color: var(--awcf-accent);
    border-color: var(--awcf-accent);
    box-shadow: 0 4px 16px rgba(194,82,51,.14);
}

.awcf-vac-card__top { display: flex; gap: 12px; align-items: flex-start; }
.awcf-vac-card__logo {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; background: var(--awcf-bg-soft);
    border: 1px solid var(--awcf-line);
}
.awcf-vac-card__logo-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.awcf-vac-card__head { min-width: 0; }
.awcf-vac-card__title { margin: 0 0 3px; font-size: 15.5px; line-height: 1.3; font-weight: 700; color: var(--awcf-blue); }
.awcf-vac-card__meta { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 12.5px; color: var(--awcf-muted); }
.awcf-vac-card__company { font-weight: 600; color: var(--awcf-accent); }
.awcf-vac-card__place::before { content: "·"; margin-right: 6px; color: var(--awcf-line); }
.awcf-vac-card__company + .awcf-vac-card__place::before { /* keep separator */ }

.awcf-vac-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.awcf-vac-card__tag {
    font-size: 11.5px; line-height: 1; padding: 5px 9px; border-radius: 999px;
    background: var(--awcf-bg); color: var(--awcf-ink); border: 1px solid var(--awcf-line);
}
.awcf-vac-card__date { display: block; margin-top: 10px; font-size: 11.5px; color: var(--awcf-muted); }

/* ===================== RESULTATEN-BALK (boven lijst) ===================== */
.awcf-vac-resultsbar {
    display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px;
    padding-bottom: 14px; border-bottom: 1px solid var(--awcf-line);
}
/* Rij: aantal links, sortering rechts */
.awcf-vac-resultsbar__top {
    display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
}
.awcf-vac-count .facetwp-facet { margin: 0 !important; }
.awcf-vac-count, .awcf-vac-count .facetwp-counts {
    font-size: 16px; font-weight: 700; color: var(--awcf-blue);
}
.awcf-vac-sort { display: flex; align-items: center; gap: 8px; }
.awcf-vac-sort::before { content: "Sorteer:"; font-size: 13px; color: var(--awcf-muted); }

/* Pager (eigen container onder de bovenrij, gecentreerd) */
.awcf-vac-pagertop { display: flex; justify-content: center; }
.awcf-vac-pagertop .facetwp-facet { margin: 0 !important; }
.awcf-vac-pagertop .facetwp-pager { justify-content: center; }
.awcf-vac-pagertop .facetwp-pager { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.awcf-vac-pagertop .facetwp-page {
    padding: 6px 11px; border: 1px solid var(--awcf-line); border-radius: 7px;
    background: #fff; color: var(--awcf-ink); cursor: pointer; font-size: 13.5px;
}
.awcf-vac-pagertop .facetwp-page:hover { border-color: var(--awcf-blue-soft); }
.awcf-vac-pagertop .facetwp-page.active { background: var(--awcf-accent); border-color: var(--awcf-accent); color: #fff; }

/* ============================ DETAIL (rechts) ============================ */
.awcf-vac-detail {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #fff;
    border: 1px solid var(--awcf-line);
    border-radius: var(--awcf-radius);
    box-shadow: var(--awcf-shadow);
}
.awcf-vac-detail__placeholder { padding: 60px 30px; text-align: center; color: var(--awcf-muted); }

.awcf-vac-detail__loading { padding: 60px; display: flex; justify-content: center; }
.awcf-vac-spinner {
    width: 30px; height: 30px; border-radius: 50%;
    border: 3px solid var(--awcf-line); border-top-color: var(--awcf-accent);
    animation: awcf-vac-spin .8s linear infinite;
}
@keyframes awcf-vac-spin { to { transform: rotate(360deg); } }

.awcf-vac-detail__inner { padding: 22px 26px 28px; }
.awcf-vac-detail__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.awcf-vac-detail__date { font-size: 12.5px; color: var(--awcf-muted); }
.awcf-vac-detail__close {
    border: none; background: var(--awcf-bg); color: var(--awcf-ink); width: 32px; height: 32px;
    border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; display: none;
}
.awcf-vac-detail__close:hover { background: var(--awcf-line); }

.awcf-vac-detail__org { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.awcf-vac-detail__logo {
    flex: 0 0 auto; width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; background: var(--awcf-bg-soft);
    border: 1px solid var(--awcf-line);
}
.awcf-vac-detail__logo-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.awcf-vac-detail__title { margin: 0 0 4px; font-size: 22px; line-height: 1.25; color: var(--awcf-blue); font-weight: 800; }
.awcf-vac-detail__company { font-size: 14px; font-weight: 600; color: var(--awcf-accent); }

.awcf-vac-detail__apply {
    display: inline-block; margin: 4px 0 18px; padding: 12px 22px;
    background: var(--awcf-accent); color: #fff !important; text-decoration: none !important;
    border-radius: 999px; font-weight: 600; font-size: 15px; transition: background .15s;
}
.awcf-vac-detail__apply:hover { background: var(--awcf-accent-dark); }

.awcf-vac-detail__attrs {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px;
    padding: 16px 0; margin-bottom: 8px; border-top: 1px solid var(--awcf-line); border-bottom: 1px solid var(--awcf-line);
}
.awcf-vac-detail__attr { display: flex; flex-direction: column; gap: 2px; }
.awcf-vac-detail__attr-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--awcf-muted); }
.awcf-vac-detail__attr-value { font-size: 14px; font-weight: 600; color: var(--awcf-ink); }

.awcf-vac-detail__content { padding: 18px 0; font-size: 15px; line-height: 1.6; overflow-wrap: break-word; word-break: break-word; }
.awcf-vac-detail__content h1,
.awcf-vac-detail__content h2,
.awcf-vac-detail__content h3 { color: var(--awcf-blue); margin: 1.2em 0 .4em; }
.awcf-vac-detail__content ul,
.awcf-vac-detail__content ol { padding-left: 1.2em; }

/* --- Externe ATS-HTML temmen (harde pixelbreedtes, table-layouts, grote
   fonts uit bv. werkenbij.curaxl.nl). Alles fluid maken zodat niets afsnijdt. --- */
.awcf-vac-detail__content,
.awcf-vac-detail__content * {
    max-width: 100% !important;
    box-sizing: border-box;
}
/* Inline pixel-breedtes/-hoogtes neutraliseren */
.awcf-vac-detail__content [style*="width"]  { width: auto !important; }
.awcf-vac-detail__content [style*="height"] { height: auto !important; }
.awcf-vac-detail__content [style*="overflow"] { overflow: visible !important; }
/* Inline achtergronden → wit, inline tekstkleuren → binnen onze styling */
.awcf-vac-detail__content,
.awcf-vac-detail__content [style*="background"] { background: #fff !important; }
.awcf-vac-detail__content [style*="color"] { color: var(--awcf-ink) !important; }
/* Table-/zone-layouts platslaan naar één kolom */
.awcf-vac-detail__content table,
.awcf-vac-detail__content .zonetable,
.awcf-vac-detail__content .zonerow,
.awcf-vac-detail__content .zonecell,
.awcf-vac-detail__content .zone {
    display: block !important;
    width: 100% !important;
}
.awcf-vac-detail__content table { table-layout: fixed; }
/* Beelden responsief */
.awcf-vac-detail__content img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    margin: 0 auto;
}
/* Te grote inline fonts terugbrengen naar leesbaar formaat */
.awcf-vac-detail__content [style*="font-size"] { font-size: inherit !important; line-height: 1.6 !important; }

.awcf-vac-detail__foot {
    display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center;
    padding-top: 16px; border-top: 1px solid var(--awcf-line);
}
.awcf-vac-detail__permalink { font-size: 13.5px; color: var(--awcf-muted); text-decoration: underline; }

/* ============================ MOBIEL ============================ */
@media (max-width: 900px) {
    .awcf-vac-layout { grid-template-columns: 1fr; }

    .awcf-vac-filters .awcf-vac-filter { flex: 1 1 45%; min-width: 140px; }

    /* Filter-panel wordt een bottom-sheet met backdrop */
    .awcf-vac--filter-open::before {
        content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 59;
    }
    .awcf-vac-filter__panel {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto;
        width: 100%; max-width: none; max-height: 82vh;
        border-radius: 16px 16px 0 0; transform: translateY(100%);
        display: flex; flex-direction: column;
    }
    .awcf-vac-filter.is-open .awcf-vac-filter__panel { transform: translateY(0); }
    .awcf-vac-filter__list { max-height: none; flex: 1 1 auto; }

    /* Detail wordt een drawer die van rechts inschuift */
    .awcf-vac-detail {
        position: fixed;
        top: 0; right: 0; bottom: 0; left: 0;
        max-height: none;
        border-radius: 0;
        z-index: 99999;
        transform: translateX(100%);
        transition: transform .25s ease;
        box-shadow: var(--awcf-shadow-lg);
    }
    .awcf-vac--detail-open .awcf-vac-detail { transform: translateX(0); }
    .awcf-vac-detail__close { display: inline-flex; align-items: center; justify-content: center; }
    .awcf-vac-detail__placeholder { display: none; }
}

@media (max-width: 520px) {
    .awcf-vac-detail__attrs { grid-template-columns: 1fr; }
    .awcf-vac-detail__inner { padding: 18px 16px 24px; }
}
