/* Herz-Button */
.job-card__fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: #ccc;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .2s, background .2s, border-color .2s;
}
.job-card__fav:hover {
    color: #e05a5a;
    border-color: #e05a5a;
}
.job-card__fav.is-active {
    color: #fff;
    background: #e05a5a;
    border-color: #e05a5a;
}
.job-card__fav.is-active .job-card__fav-icon {
    fill: #fff;
}
.job-card__fav-icon {
    transition: fill .2s;
}

/* SVG nie als Klick-Ziel, immer der Button */
.job-card__fav-icon,
.job-card__fav-icon * {
    pointer-events: none;
}

/* ============================================================
   Jobs Watchlist — Merkliste
   Pfad: files/cto_layout/css/jobs_watchlist.css
   ============================================================ */

/* ── Merkliste-Modul: Trigger-Button ──────────────────────────────────────── */
.jobs-watchlist {
    position: relative;
    display: flex;
    margin-left: auto;  /* schiebt den Trigger nach rechts */
}
.jobs-watchlist__trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 6px;
    position: relative;
    justify-content: flex-end;
    margin-left: auto;
}
.jobs-watchlist__trigger:hover .jobs-watchlist__icon {
    color: #e05a5a;
}
.jobs-watchlist__badge {
    position: absolute;
    top: 0;
    left: -15px;
    background: #e05a5a;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
}

/* ── Merkliste-Popup ──────────────────────────────────────────────────────── */
@keyframes watchlistFadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}
@keyframes watchlistFadeOutDown {
    from { opacity: 1; transform: translateY(0);    }
    to   { opacity: 0; transform: translateY(10px); }
}

.jobs-watchlist__popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    max-width: 520px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .15);
    z-index: 9999;
    overflow: hidden;
}
.jobs-watchlist__popup[hidden] {
    display: none;
}
.jobs-watchlist__popup.is-opening {
    animation: watchlistFadeInUp .25s ease forwards;
}
.jobs-watchlist__popup.is-closing {
    animation: watchlistFadeOutDown .2s ease forwards;
}

.jobs-watchlist__popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}
.jobs-watchlist__popup-title {
    font-weight: 700;
    font-size: 1rem;
}
.jobs-watchlist__close {
border: none;
  cursor: pointer;
  font-size: 0.7rem;
  color: #f8f8f8;
  line-height: 1;
  padding: 2px 6px;
  background: var(--secondColor);
  border-radius: 50%;
  height: 24px;
  width: 24px;
  transition: all 0.4s ease;
}
.jobs-watchlist__close:hover {
    background: var(--accentColor);
    transition: all 0.4s ease;
}

.jobs-watchlist__popup-body {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px 0;
}
.jobs-watchlist__empty {
    padding: 20px 16px;
    color: #999;
    font-size: .9rem;
    text-align: center;
}
.jobs-watchlist__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jobs-watchlist__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid #f5f5f5;
}
.jobs-watchlist__item:last-child {
    border-bottom: none;
}
.jobs-watchlist__item-link {
    flex: 1;
  font-size: .7rem;
  color: inherit;
  text-decoration: underline;
  line-height: 1.1;
}
.jobs-watchlist__item-link:hover {
    text-decoration: underline;
}
.jobs-watchlist__item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    font-size: 1rem;
    padding: 2px 4px;
    flex-shrink: 0;
}
.jobs-watchlist__item-remove:hover {
    color: #e05a5a;
}
