/*
 * bewerber3_jobs frontend styles.
 * Brand-neutral: every colour/spacing is a CSS custom property that can be
 * overridden by the integrating site. No Bootstrap, no global element resets.
 */
.bewerber3-jobs {
    color: var(--tertiary);
    box-sizing: border-box;
    display: flex;
    margin-top: 2em;
}

.bewerber3-jobs *,
.bewerber3-jobs *::before,
.bewerber3-jobs *::after {
    box-sizing: inherit;
}

.bewerber3-jobs :focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.bewerber3-jobs hr.lib-divider {
    border-width: 1px;
    color: var(--primary);
    margin: .75em 0;
}

/* --- Sidebar / view switch --------------------------------------------- */
.bewerber3-jobs__sidebar .bewerber3-jobs__viewswitch {
    display: grid;
    border: 1px solid var(--tertiary);
    overflow: hidden;
    grid-template-columns: 1fr 1fr;
}

.bewerber3-jobs__sidebar .bewerber3-jobs__viewbutton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border: 0;
    background: white;
    color: var(--primary);
    font: inherit;
    cursor: pointer;
    outline: none;
}

.bewerber3-jobs__sidebar .bewerber3-jobs__viewbutton[aria-pressed="true"] {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.bewerber3-jobs__sidebar .bewerber3-jobs__viewbutton-icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    background: currentColor;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.bewerber3-jobs__sidebar .bewerber3-jobs__viewbutton--grid .bewerber3-jobs__viewbutton-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='1' width='6' height='6'/%3E%3Crect x='9' y='1' width='6' height='6'/%3E%3Crect x='1' y='9' width='6' height='6'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='1' width='6' height='6'/%3E%3Crect x='9' y='1' width='6' height='6'/%3E%3Crect x='1' y='9' width='6' height='6'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3C/svg%3E");
}

.bewerber3-jobs__sidebar .bewerber3-jobs__viewbutton--list .bewerber3-jobs__viewbutton-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='2' width='14' height='2'/%3E%3Crect x='1' y='7' width='14' height='2'/%3E%3Crect x='1' y='12' width='14' height='2'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='2' width='14' height='2'/%3E%3Crect x='1' y='7' width='14' height='2'/%3E%3Crect x='1' y='12' width='14' height='2'/%3E%3C/svg%3E");
}

/* --- Filter ------------------------------------------------------------- */
.bewerber3-jobs__sidebar {
    padding: 1em;
    margin-right: 1em;
}

.bewerber3-jobs__sidebar .bewerber3-jobs__count {
    font-family: var(--font-bold);
    color: var(--primary);
    text-align: center;
}

.bewerber3-jobs__sidebar form.bewerber3-jobs__filter.lib-form fieldset {
    margin-bottom: 1em;
    margin-top: 0;
}

.bewerber3-jobs__sidebar form.bewerber3-jobs__filter.lib-form fieldset label {
    margin-bottom: .5em;
}

.bewerber3-jobs__sidebar form.bewerber3-jobs__filter.lib-form fieldset.bewerber3-jobs__filter-field--workingtime>div {
    display: flex;
    justify-content: space-between;
}

.bewerber3-jobs__sidebar form.bewerber3-jobs__filter.lib-form fieldset legend {
    font-size: var(--font-size);
    font-family: var(--font-bold);
    color: var(--tertiary);
}

.bewerber3-jobs__sidebar form.bewerber3-jobs__filter.lib-form fieldset .lib-checkbox {
    font-size: var(--font-size);
    font-family: var(--font-regular);
    align-items: center;
    display: flex;
    margin-bottom: 0;
}

.bewerber3-jobs__sidebar form.bewerber3-jobs__filter.lib-form fieldset .lib-checkbox span {
    max-height: 26px;
}

.bewerber3-jobs__sidebar .bewerber3-jobs__filter-actions {
    display: flex;
    flex-direction: column;
}

.bewerber3-jobs__sidebar .bewerber3-jobs__filter-actions .lib-button {
    width: 100%;
    margin-top: 1em;
    text-align: center;
}

/* --- Results list wrapper ---------------------------------------------- */
.bewerber3-jobs .lib-cards {
    margin-top: 0;
}

.bewerber3-jobs .lib-cards.grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    column-gap: 1em;
    row-gap: 1em;
}

/* --- Job card (shared markup, restyled per view) ----------------------- */
.bewerber3-jobs .lib-cards article {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* Positionierungs-Kontext ist .article-wrapper (die sichtbare Kachel), NICHT
   die <article>: im Grid-View ist die <article> display:contents und hat gar
   keine eigene Box, sonst würde das Overlay am großen Container hängen. */
.bewerber3-jobs .lib-cards article .article-wrapper {
    position: relative;
}

.bewerber3-jobs .lib-cards article .article-wrapper:hover,
.bewerber3-jobs .lib-cards article .article-wrapper:focus-within {
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.bewerber3-jobs .lib-cards article .article-wrapper .bewerber3-job-card__link {
    word-break: break-word;
    font-family: var(--font-bold);
    text-align: center;
    color: var(--primary);
    font-size: 1.2rem;
}

/* Ganze Kachel klickbar: der Titel-Link spannt sich als unsichtbares
   Overlay über die komplette .article-wrapper (Stretched-Link-Technik). */
.bewerber3-jobs .lib-cards article .article-wrapper .bewerber3-job-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 1;
}

/* Der Button und das Datum im Footer bleiben eigenständig klickbar/markierbar
   und liegen über dem Overlay. */
.bewerber3-jobs .lib-cards article .article-wrapper footer .lib-button,
.bewerber3-jobs .lib-cards article .article-wrapper footer small {
    position: relative;
    z-index: 2;
}

.bewerber3-jobs .lib-cards.grid article .article-wrapper .content {
    margin-top: 0;
    display: flex;
    flex-direction: column;
}

.bewerber3-jobs .lib-cards article .article-wrapper .content p {
    line-height: 1.5;
    flex: 1 1 100%;
    font-size: 1rem;
}

.bewerber3-jobs .lib-cards article .article-wrapper .content ul {
    margin-top: 1em;
    display: grid;
    grid-template-columns: 1fr;
}

.bewerber3-jobs .lib-cards article .article-wrapper .content ul li {
    display: flex;
    flex-direction: column;
}

.bewerber3-jobs .lib-cards article .article-wrapper .content ul li.long {
    grid-column: span 1;
}

.bewerber3-jobs .lib-cards article .article-wrapper .content ul strong {
    line-height: 1.5;
    font-family: var(--font-bold);
    margin-top: .5em;
}

.bewerber3-jobs .lib-cards article .article-wrapper .content ul span {
    line-height: 1.5;
}

.bewerber3-jobs .lib-cards article .article-wrapper footer {
    margin-top: 0;
    flex-direction: column;
    justify-content: flex-end;
}

.bewerber3-jobs .lib-cards article .article-wrapper footer .lib-button:not(.round) {
    margin-top: 0;
    width: 100%;
}

.bewerber3-jobs .lib-cards article .article-wrapper footer small {
    margin-top: .5em;
}

/* --- Job card (GRID) ------------------------------------------------ */
.bewerber3-jobs .lib-cards.grid article {
    display: contents;
}

.bewerber3-jobs .lib-cards.grid article .article-wrapper {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    row-gap: 0;
}

/* --- Job card (LIST) ------------------------------------------------ */
.bewerber3-jobs .lib-cards.list article {
    margin-bottom: 1em;
}

.bewerber3-jobs .lib-cards.list article .article-wrapper {
    width: 100%;
    flex-direction: row;
    padding: 0.75em 1em;
    flex-wrap: wrap;
}

.bewerber3-jobs .lib-cards.list article .article-wrapper hr.lib-divider {
    display: none;
}

.bewerber3-jobs .lib-cards.list article .article-wrapper .bewerber3-job-card__link {
    text-align: left;
    font-size: 1.2rem;
}

.bewerber3-jobs .lib-cards.list article .article-wrapper header {
    flex: 1 1 100%;
}

.bewerber3-jobs .lib-cards.list article .article-wrapper .content {
    margin-top: 0;
}

.bewerber3-jobs .lib-cards.list article .article-wrapper .content p {
    display: none;
}

.bewerber3-jobs .lib-cards.list article .article-wrapper .content ul {
    grid-template-columns: 1fr 1fr;
    margin-top: 0;
}

.bewerber3-jobs .lib-cards.list article .article-wrapper footer small {
    text-align: right;
}

/* --- Detail view -------------------------------------------------------- */
.bewerber3-job-detail {
    margin-top: 2em;
    position: relative;
}
.bewerber3-job-detail>article {
    position: sticky;
    top: 0;
    background: white;
    display: flex;
    padding: 1em 2em;
    flex-direction: column;
    z-index: 1000;
}
.bewerber3-job-detail article>header h2 {
    text-align: center;
}
.bewerber3-job-detail article>.content .lib-button {
    width: fit-content;
    margin: 0 auto;
    margin-top: 1em;
}
.bewerber3-job-detail article>.content ul {
    margin-top: 1em;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.bewerber3-job-detail article>.content ul li {
    display: flex;
    flex-direction: column;
}
.bewerber3-job-detail article>.content ul li.long {
    grid-column: span 2;
}
.bewerber3-job-detail article>.content ul strong {
    line-height: 1.5;
    font-family: var(--font-bold);
    margin-top: .5em;
}
.bewerber3-job-detail article>.content ul span {
    line-height: 1.5;
}
.bewerber3-job-detail article>.content p {
    margin-top: .5em;
}
.bewerber3-job-detail article>.content p a:not(.lib-button) {
    color: var(--accent);
    font-family: var(--font-link);
    font-weight: 400;
    text-decoration: none;
    width: 100%;
    text-align: left;
    line-height: var(--line-height);
    transition: .3s;
}
.bewerber3-job-detail article>.content p a:not(.lib-button):hover {
    color: var(--primary);
}
.bewerber3-job-detail article>footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1em;
    flex-direction: column;
}
.bewerber3-job-detail article>footer .lib-button {
    width: 100%;
    text-align: center;
}
.bewerber3-job-detail article>footer .lib-button:first-child {
    order: 2;
}
.bewerber3-job-detail section.lib-infobox.contrast {
    margin-top: 0;
}
.bewerber3-job-detail section.lib-infobox>[class*=lib-wrapper]>.content.lib-iconboxes {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 0;
}
.bewerber3-job-detail section.lib-infobox>[class*=lib-wrapper]>.content p {
    font-size: 1rem;
    text-align: left;
}
.bewerber3-job-detail section.lib-infobox .lib-iconboxes .iconbox-wrapper {
    flex: 1;
}
.bewerber3-job-detail section.lib-infobox .lib-iconboxes header {
    text-align: center;
}
.bewerber3-job-detail section.lib-infobox .lib-iconboxes .content {
    margin-top: 1em;
}
.bewerber3-job-detail section.lib-infobox .lib-iconboxes .content ul.lib-list {
    margin-top: 1em;
    margin-left: 0;
}
.bewerber3-job-detail section.lib-infobox .lib-iconboxes .content ul.lib-list li {
    font-size: 1rem;
}
.bewerber3-job-detail section.lib-infobox .lib-iconboxes .content ul.lib-list li:before {
    padding-right: 0;
}

/*
.bewerber3-job-detail article > .content {
    margin-top: 0;
    display: flex;
    flex-direction: column;
}
.bewerber3-job-detail article > .content p {
    line-height: 1.5;
    flex: 1 1 100%;
}
.bewerber3-job-detail article > .content section {
    margin-top: 3em;
}
.bewerber3-job-detail article > .content section .content {
    margin-top: 1.5em;
}
.bewerber3-job-detail article > footer {
    margin-top: 0;
    flex-direction: column;
}
.bewerber3-job-detail article > footer .lib-button:not(.round) {
    margin-top: 0;
    width: 100%;
}
.bewerber3-job-detail article > footer small {
    margin-top: .5em;
}
*/




@media (max-width: 40rem) {
    .bewerber3-jobs__filter {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bewerber3-job-card {
        transition: none;
    }
}

@media (min-width: 552px) {
    .bewerber3-job-detail article>.content ul {
        margin-top: 1em;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .bewerber3-job-detail article>.content ul li.long {
        grid-column: span 3;
    }

    .bewerber3-job-detail article>footer {
        flex-direction: row;
    }

    .bewerber3-job-detail article>footer .lib-button {
        width: fit-content;
    }

    .bewerber3-job-detail article>footer .lib-button:first-child {
        order: 1;
    }

    .bewerber3-job-detail article>footer .lib-button:last-child {
        order: 2;
    }
}




@media (min-width: 768px) {

    .bewerber3-job-detail article>.content ul {
        margin-top: 1em;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    }

    .bewerber3-job-detail article>.content ul li.long {
        grid-column: span 2;
    }

        .bewerber3-jobs .lib-cards.list article .article-wrapper .content ul {
    grid-template-columns: 1fr 1fr;
}
}

@media (min-width: 1024px) {
    .bewerber3-jobs .lib-cards.grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bewerber3-jobs .lib-cards article .article-wrapper .content ul {
    grid-template-columns: 1fr 1fr;
}
.bewerber3-jobs .lib-cards article .article-wrapper .content ul li.long {
    grid-column: span 2;
}


    .bewerber3-job-detail section.lib-infobox .lib-iconboxes article:not(:last-child) {
        border-right: 1px solid var(--primary-medium);
        padding-right: 1em;
    }

    .bewerber3-job-detail section.lib-infobox>[class*=lib-wrapper]>.content.lib-iconboxes {
        grid-template-columns: repeat(3, 1fr);
    }

    .bewerber3-jobs .lib-cards.list article .article-wrapper .content ul {
    grid-template-columns: 1fr 1fr 1fr;
}
}
@media (min-width: 1400px) {
    :root .lib-wrapper {
        width: 1200px;
    }
    .bewerber3-jobs.lib-wrapper {
        width: 1400px;
    }
    .bewerber3-jobs .lib-cards.grid {
        grid-template-columns: repeat(3, 1fr);
    }

.bewerber3-jobs .lib-cards article .article-wrapper .content p {
    font-size: var(--font-size);
}
.bewerber3-jobs .lib-cards article .article-wrapper .bewerber3-job-card__link {
    font-size: 1.5rem;
}

.bewerber3-jobs .lib-cards.list article .article-wrapper .content ul {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
}

}


/* --- Empty + pagination ------------------------------------------------- */
.bewerber3-jobs__empty {
    padding: var(--jobs-gap);
    background: var(--jobs-surface-muted);
    border-radius: var(--jobs-border-radius);
    text-align: center;
    color: var(--jobs-muted-color);
}

.bewerber3-jobs__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-block-start: var(--jobs-gap);
}

.bewerber3-jobs__page {
    display: inline-flex;
    min-width: 2.25rem;
    padding: 0.4rem 0.6rem;
    justify-content: center;
    border: 1px solid var(--jobs-border-color);
    border-radius: var(--jobs-border-radius);
    color: var(--jobs-text-color);
    text-decoration: none;
}

.bewerber3-jobs__page--current {
    background: var(--jobs-primary-color);
    color: var(--jobs-primary-contrast);
    border-color: var(--jobs-primary-color);
}