/* =========================================================
   XML Jobs – Frontend Styles
   Design: Figma – Krankenhaus Eisenhüttenstadt
   Colors: #111D57 (primary navy), #3772C3 (light blue)
   Font:   Roboto
   Mode:   Pure PHP / no JavaScript
   ========================================================= */


/* ── Reset & Root ── */
.xml-jobs-block,
.xml-jobs-block *,
.xml-jobs-block *::before,
.xml-jobs-block *::after {
  box-sizing: border-box;
}

:root {
  --xj-navy:   #111D57;
  --xj-blue:   #3772C3;
  --xj-white:  #ffffff;
  --xj-muted:  #6b7280;
  --xj-text:   #000000;
  --xj-border: #3772C3;
}

/* ── Block wrapper ── */
.xml-jobs-block {
  padding: 2.5rem 2rem;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--xj-white);
  color: var(--xj-text);
}

/* ── Filter form wrapper ── */
.xml-jobs-block__filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  border: none;
  padding: 0;
  margin-top: 0;
}

/* ── FILTER BOX: bordered container with search + dropdowns + action buttons ── */
.xml-jobs-block__filter-box {
  border: 1.5px solid var(--xj-border);
  border-radius: 8px;
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xml-jobs-block__filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--xj-navy);
  margin-bottom: 2px;
}

/* Search fills full width inside filter box */
.xml-jobs-block__filter-box .xml-jobs-block__search-wrap {
  position: relative;
  display: block;
  width: 100%;
  flex: 0 0 auto;
}

/* Dropdowns row — 3 equal columns */
.xml-jobs-block__filter-dropdowns {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.xml-jobs-block__filter-dropdowns .xml-jobs-block__select-wrap {
  flex: 1 1 0;
  min-width: 160px;
}

.xml-jobs-block__filter-dropdowns .xml-jobs-block__select {
  width: 100%;
  min-width: 0;
}

/* Action buttons row: Zurücksetzen + Suchen */
.xml-jobs-block__filter-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

/* ── DISPLAY ROW: Pro Seite + Sortieren (no border, no label) ── */
.xml-jobs-block__display-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0 4px;
}

/* Inline label (Pro Seite:, Sortieren:) */
.xml-jobs-block__inline-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--xj-navy);
  white-space: nowrap;
}


/* Submit / Filter button */
.xml-jobs-block__submit-btn {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.xml-jobs-block__submit-btn--visible {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 40px;
  padding: 0 22px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  border: 1.5px solid var(--xj-navy);
  border-radius: 7px;
  background: var(--xj-navy);
  color: var(--xj-white);
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.xml-jobs-block__submit-btn--visible:hover {
  background: transparent;
  color: var(--xj-navy);
  border: 1.5px solid var(--xj-navy);
}

/* Desktop: let search grow, selects stay auto */
@media (min-width: 900px) {
  .xml-jobs-block__search-wrap {
    flex: 1 1 200px;
    min-width: 160px;
  }

  .xml-jobs-block__select {
    width: auto;
  }
}

/* Search input */
.xml-jobs-block__search-wrap {
  position: relative;
  flex: 1 1 180px;
  min-width: 140px;
}

.xml-jobs-block__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--xj-blue);
  pointer-events: none;
}

.xml-jobs-block__search {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 38px;
  border: 1px solid var(--xj-border);
  border-radius: 7px;
  background: var(--xj-white);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  color: var(--xj-blue);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.xml-jobs-block__search::placeholder { color: #9ca3af; }

.xml-jobs-block__search:focus {
  border-color: var(--xj-navy);
  box-shadow: 0 0 0 2px rgba(55, 114, 195, 0.15);
}

/* Select dropdowns */
.xml-jobs-block__select-wrap {
  position: relative;
}

.xml-jobs-block__select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--xj-blue);
  pointer-events: none;
}

.xml-jobs-block__select {
  height: 40px;
  padding: 0 34px 0 16px;
  border: 1px solid var(--xj-border);
  border-radius: 7px;
  background: var(--xj-white);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  color: var(--xj-blue);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
  white-space: nowrap;
  min-width: 130px;
}

.xml-jobs-block__select:focus {
  border-color: var(--xj-navy);
  box-shadow: 0 0 0 2px rgba(55, 114, 195, 0.15);
}

/* ── Results count ── */
.xml-jobs-block__count {
  font-size: 14px;
  color: var(--xj-blue);
  margin: 0 0 16px;
}

.xml-jobs-block__count strong {
  color: var(--xj-blue);
  font-weight: 700;
}

/* ── Job list ── */
.xml-jobs-block__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Card wrapper (gradient bottom border) ──
 * The wrapper has padding-bottom: 5px and a solid accent colour background.
 * The white card sits inside, covering everything except the bottom 5px strip.
 * The top/side border comes from the wrapper's own border (light blue-grey).
 * The gradient border (blue→green→yellow) is applied inline per card via PHP.
 * ───────────────────────────────────────────────────────────────────────── */
.xj-card-wrap {
  border-radius: 15px;
  border: 1px solid #c8d4ed;
  padding-bottom: 5px;
  /* background set inline by PHP with the correct gradient */
  background: linear-gradient(90deg, #3772C3 0%, #8FD35D 50%, #F9B231 100%);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

/* ── Job card ── */
.xml-jobs-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--xj-white);
  border: none;
  border-radius: 13px;
  padding: 20px 20px 16px 24px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
  width: 100%;
  /* No hover/transition effects */
}

.xml-jobs-card:hover,
.xml-jobs-card:focus-visible {
  text-decoration: none;
  color: inherit;
  background: var(--xj-white) !important;
  opacity: 1 !important;
}

/* Force white background always — prevent theme styles bleeding through */
.xj-card-wrap .xml-jobs-card,
.xj-card-wrap .xml-jobs-card:hover,
.xj-card-wrap .xml-jobs-card:focus,
.xj-card-wrap .xml-jobs-card:active,
.xj-card-wrap .xml-jobs-card:visited {
  background: var(--xj-white) !important;
  color: var(--xj-text) !important;
  text-decoration: none !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.xml-jobs-card:focus-visible {
  outline: 2px solid var(--xj-blue);
  outline-offset: 2px;
}

/* Card body */
.xml-jobs-card__body {
  flex: 1;
  min-width: 0;
}

/* Tags */
.xml-jobs-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.xml-jobs-card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 7px;
  background: var(--xj-white);
  color: var(--xj-blue);
  border: 1px solid var(--xj-blue);
  white-space: nowrap;
}

.xml-jobs-card__tag--accent {
  color: var(--xj-blue);
  background: var(--xj-white);
  border-color: var(--xj-blue);
}

/* Title */
.xml-jobs-card__title {
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--xj-navy);
  margin: 0 0 10px;
  margin-block-start: 0;
  margin-block-end: 0;
  line-height: 1.3;
}

/* Meta row */
.xml-jobs-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 0;
  margin-top: 10px;
}

.xml-jobs-card__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--xj-text);
  font-weight: 400;
}

.xml-jobs-card__meta-item svg {
  color: var(--xj-muted);
  flex-shrink: 0;
}

/* Date */
.xml-jobs-card__date {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--xj-text);
  margin-top: 8px;
}

/* Arrow button – no hover effect */
.xml-jobs-card__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--xj-white);
  border: 1.5px solid var(--xj-blue);
  color: var(--xj-blue);
}

.xml-jobs-card__arrow svg {
  width: 18px;
  height: 18px;
}

/* ── Empty state ── */
.xml-jobs-block__empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--xj-muted);
  font-size: 15px;
  background: var(--xj-white);
  border-radius: 15px;
  border: 1px dashed var(--xj-border);
  margin-top: 10px;
}

/* ── Footer ── */
.xml-jobs-block__footer {
  font-size: 14px;
  font-weight: 500;
  color: var(--xj-navy);
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .xml-jobs-block {
    padding: 32px 16px 48px;
  }

  /* Stack filter dropdowns vertically on mobile */
  .xml-jobs-block__filter-dropdowns {
    flex-direction: column;
    align-items: stretch;
  }

  .xml-jobs-block__filter-dropdowns .xml-jobs-block__select-wrap {
    width: 100%;
  }

  /* Stack display row vertically on mobile */
  .xml-jobs-block__display-row {
    flex-direction: column;
    align-items: stretch;
  }

  .xml-jobs-block__select-wrap {
    width: 100%;
  }

  .xml-jobs-block__select {
    width: 100%;
  }

  /* Action buttons stack vertically */
  .xml-jobs-block__filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .xml-jobs-block__submit-btn--visible,
  .xml-jobs-block .xml-jobs-block__reset-btn {
    width: 100%;
    justify-content: center;
  }

  /* Per-page and sort wraps stack their inner label+select */
  .xml-jobs-block__select-wrap--perpage,
  .xml-jobs-block__select-wrap--sort {
    width: 100%;
  }

  .xml-jobs-card {
    padding: 16px 14px 14px 18px;
  }

  .xml-jobs-card__title {
    font-size: 16px;
  }

  .xml-jobs-card__meta {
    gap: 10px;
  }
}

/* ── Mild card hover effect ── */
.xj-card-wrap {
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.xj-card-wrap:hover {
  background: linear-gradient(90deg, #3772C3 0%, #8FD35D 50%, #F9B231 100%);
  box-shadow: 0px 6px 16px 0px rgba(55, 114, 195, 0.18);
}

.xj-card-wrap:hover .xml-jobs-card {
  background: #f0f4fc !important;
}

/* ── Pagination ── */
.xj-pagination {
  margin-top: 32px;
  margin-bottom: 8px;
}

.xj-pagination__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.xj-pagination__item {
  margin: 0;
  padding: 0;
}

.xj-pagination__item--ellipsis span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--xj-blue);
  font-size: 15px;
  font-weight: 500;
}

.xj-pagination__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1.5px solid #3772C3;
  background: var(--xj-white);
  color: #3772C3;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.xj-pagination__link:hover {
  background: #3772C3;
  color: var(--xj-white);
  text-decoration: none;
}

.xj-pagination__link--active {
  background: #111D57;
  border-color: #111D57;
  color: var(--xj-white);
  cursor: default;
  pointer-events: none;
}

.xj-pagination__link--active:hover {
  background: #111D57;
  color: var(--xj-white);
}

@media (max-width: 640px) {
  .xj-pagination__list {
    gap: 4px;
  }

  .xj-pagination__link {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    padding: 0 10px;
  }
}

/* ── Reset button (Zurücksetzen) — always visible in filter-box ── */
.xml-jobs-block .xml-jobs-block__reset-btn,
.xml-jobs-block .xml-jobs-block__reset-btn.xml-jobs-block__reset-btn--active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 7px;
  border: 1.5px solid #3772C3;
  background: transparent;
  color: #3772C3 !important;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}

/* Dim the reset button when no filters are active */
.xml-jobs-block .xml-jobs-block__reset-btn:not(.xml-jobs-block__reset-btn--active) {
  opacity: 0.5;
}

/* Perpage and sort wraps — label inline with select */
.xml-jobs-block__select-wrap--perpage,
.xml-jobs-block__select-wrap--sort {
  display: flex;
  align-items: center;
  gap: 6px;
}

.xml-jobs-block__select-wrap--perpage .xml-jobs-block__select,
.xml-jobs-block__select-wrap--sort .xml-jobs-block__select {
  color: var(--xj-blue);
  font-weight: 500;
  width: auto;
  min-width: 130px;
}

