/* ============================================================
   RBB Job-Ergebnisse — Filter-Leiste
   Elementor controls override via inline CSS; these are defaults.
   ============================================================ */

.rbb-job-results__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 24px;
}

.rbb-job-results__filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rbb-job-results__filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

/* Einheitliche Höhe aller Filter-Eingaben (gilt in jeder Ansicht) */
.rbb-job-results__filter-select,
.rbb-job-results__search,
.rbb-job-results__filter-input,
.rbb-job-results__sort-select {
    box-sizing: border-box;
    min-height: 40px;
    line-height: 1.2;
}

.rbb-job-results__filter-select {
    min-width: 160px;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    appearance: auto;
}

.rbb-job-results__filter-select:focus {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

/* Search input — stretches to fill available space */
.rbb-job-results__filter-item--search {
    flex: 1;
    min-width: 200px;
}

.rbb-job-results__search {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    color: #333;
}

.rbb-job-results__search:focus {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

/* Number inputs (salary range) */
.rbb-job-results__filter-input {
    width: 120px;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    color: #333;
}

.rbb-job-results__filter-input:focus {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

/* Reset button — aligns to bottom of filter row */
.rbb-job-results__filter-item--reset {
    justify-content: flex-end;
}

.rbb-job-results__filter-reset {
    box-sizing: border-box;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    color: inherit;
    transition: border-color 0.15s;
}

.rbb-job-results__filter-reset:hover {
    border-color: #999;
}

/* ============================================================
   Filter-Chips (Chips + Salary-Buttons) + Homeoffice-Toggle
   ============================================================ */

.rbb-job-results__filter-item--chips,
.rbb-job-results__filter-item--salary-buttons,
.rbb-job-results__filter-item--homeoffice {
    min-width: 0;
}

.rbb-job-results__chips,
.rbb-job-results__salary-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rbb-job-results__chip {
    box-sizing: border-box;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid #e2e2e2;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #333;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.rbb-job-results__chip:hover {
    border-color: #bdbdbd;
}

.rbb-job-results__chip.is-active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.rbb-job-results__chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.07);
    color: inherit;
    font-size: 11px;
    font-weight: 700;
}

.rbb-job-results__chip.is-active .rbb-job-results__chip-count {
    background: rgba(255, 255, 255, 0.22);
}

/* Homeoffice-Toggle (iOS-Switch) */
.rbb-job-results__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.rbb-job-results__toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rbb-job-results__toggle-track {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #d0d0d0;
    transition: background-color 0.15s;
    flex-shrink: 0;
}

.rbb-job-results__toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s;
}

.rbb-job-results__toggle-input:checked + .rbb-job-results__toggle-track {
    background: #e0603a;
}

.rbb-job-results__toggle-input:checked + .rbb-job-results__toggle-track::after {
    transform: translateX(18px);
}

.rbb-job-results__toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Zweizeilige Suche: Zeile 2 als vollbreite Sub-Zeile INNERHALB derselben Box
   (die Box wächst, statt eine zweite Box darunter einzublenden). */
.rbb-job-results__row2 {
    flex-basis: 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: inherit;
    margin-top: 4px;
}

.rbb-job-results__row2[hidden] {
    display: none;
}

.rbb-job-results__filter-item--details {
    margin-left: auto;
    justify-content: flex-end;
}

.rbb-job-results__details-toggle {
    box-sizing: border-box;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #e0603a;
    white-space: nowrap;
}

.rbb-job-results__details-toggle::after {
    content: "▾";
    font-size: 12px;
    transition: transform 0.15s;
}

.rbb-job-results__details-toggle.is-open::after {
    transform: rotate(180deg);
}

/* ============================================================
   Ergebnisleiste (Zähler + Sortierung)
   ============================================================ */

.rbb-job-results__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.rbb-job-results__count {
    font-size: 20px;
    color: #777;
}

.rbb-job-results__count-num {
    color: #1a1a1a;
    font-weight: 700;
    margin-right: 6px;
}

.rbb-job-results__sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

/* ============================================================
   RBB Job-Ergebnisse — Grid
   ============================================================ */

.rbb-job-results__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
    transition: opacity 0.15s;
}

/* Loading state */
.rbb-job-results--loading .rbb-job-results__grid {
    opacity: 0.35;
    pointer-events: none;
}

/* Empty / no-results message */
.rbb-job-list-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: #777;
    margin: 0;
}

/* ============================================================
   Pagination
   ============================================================ */

.rbb-job-results__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.rbb-job-results__page-info {
    font-size: 14px;
    color: #555;
}

.rbb-job-results__prev,
.rbb-job-results__next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    transition: border-color 0.15s, background-color 0.15s;
}

.rbb-job-results__prev:hover:not(:disabled),
.rbb-job-results__next:hover:not(:disabled) {
    border-color: #999;
    background-color: #f5f5f5;
}

.rbb-job-results__prev:disabled,
.rbb-job-results__next:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ============================================================
   PHP Fallback Card
   ============================================================ */

.rbb-job-card {
    border: 1px solid #ececec;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}

.rbb-job-card:hover {
    border-color: #e0e0e0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.rbb-job-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.rbb-job-card__thumb {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
}

.rbb-job-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rbb-job-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Kopf: Logo links, Favorit rechts */
.rbb-job-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0 0 14px;
}

.rbb-job-card__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f4f1ef;
    color: #2b4bdd;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    overflow: hidden;
}

/* Logo-Grafik füllt den Avatar */
.rbb-job-card__logo--img {
    background: #fff;
    border: 1px solid #f0f0f0;
}

.rbb-job-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.rbb-job-card__fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c9c9c9;
    transition: color 0.15s;
}

.rbb-job-card__link:hover .rbb-job-card__fav {
    color: #e0603a;
}

.rbb-job-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
    line-height: 1.3;
}

.rbb-job-card__company {
    font-size: 14px;
    color: #8a8a8a;
    margin: 0 0 12px;
    line-height: 1.4;
}

.rbb-job-card__excerpt {
    font-size: 14px;
    color: #555;
    margin: 0 0 10px;
    line-height: 1.5;
}

/* Premium accent */
.rbb-job-card--premium {
    border-color: #e0603a;
    box-shadow: 0 0 0 1px #e0603a inset;
}

/* Badges (Premium / Neu) */
.rbb-job-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 8px;
}

.rbb-job-card__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.rbb-job-card__badge--premium {
    background: #e0603a;
    color: #fff;
}

.rbb-job-card__badge--new {
    background: #fce8e1;
    color: #c34a24;
}

/* Meta chips (salary etc.) */
.rbb-job-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.rbb-job-card__chip {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    background: #f2f2f0;
    color: #333;
}

/* Footer meta row: date · details — Trennlinie darüber, bündig mit dem
   übrigen Karteninhalt (kein Randüberstand). */
.rbb-job-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: auto 0 0;
    padding: 14px 0 0;
    border-top: 1px solid #ececec;
    font-size: 12px;
    color: #999;
}

.rbb-job-card__details {
    color: #e0603a;
    font-weight: 600;
}

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

@media (max-width: 1024px) {
    .rbb-job-results__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .rbb-job-results__filters,
    .rbb-job-results__row2 {
        flex-direction: column;
        align-items: stretch;
    }

    .rbb-job-results__filter-item--search,
    .rbb-job-results__filter-item {
        min-width: 0;
        width: 100%;
    }

    .rbb-job-results__filter-select,
    .rbb-job-results__search,
    .rbb-job-results__filter-input {
        width: 100%;
        min-width: unset;
    }

    /* Reset + „Mehr Filter" volle Breite, Text zentriert */
    .rbb-job-results__filter-item--reset,
    .rbb-job-results__filter-item--details {
        margin-left: 0;
        justify-content: stretch;
    }

    .rbb-job-results__filter-reset,
    .rbb-job-results__details-toggle {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .rbb-job-results__grid {
        grid-template-columns: 1fr;
    }
}
