@import url("https://fonts.googleapis.com/css2?family=Lusitana:wght@400;700&display=swap");

.iws-job-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin: 24px 0;
  width: 100%;
}

.iws-job-sidebar {
  min-width: 0;
}

.iws-job-content {
  min-width: 0;
  width: 100%;
}

/* Desktop: sticky sidebar (whole column), internal scroll if tall — adjust top for your theme header */
@media (min-width: 901px) {
  .iws-job-sidebar {
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
  }
}

.iws-filter-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.iws-filter-header h3 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
}

.iws-filter-header p {
  margin: 0 0 20px;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

.iws-filter-group {
  margin-bottom: 22px;
}

.iws-filter-title {
  display: block;
  font-weight: 700;
  margin-bottom: 12px;
  color: #222;
  font-size: 15px;
}

.iws-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.iws-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s ease;
}

.iws-checkbox-item:hover {
  background: #f2f7ff;
  border-color: #b9d2f5;
}

.iws-checkbox-item input {
  margin: 3px 0 0;
  flex-shrink: 0;
}

.iws-checkbox-item span {
  font-size: 14px;
  color: #222;
  line-height: 1.5;
}

.iws-filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.iws-btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.iws-btn-primary {
  background: #0a3875;
  color: #fff;
}

.iws-btn-primary:hover {
  background: #0c458f;
}

.iws-btn-secondary {
  background: #f3f4f6;
  color: #222;
}

.iws-btn-secondary:hover {
  background: #e5e7eb;
}

.iws-job-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 16px;
  width: 100%;
}

.iws-job-toolbar h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  font-family: "Lusitana", serif !important;
  color: #3b92cf;
}

.iws-job-count {
  color: #666;
  font-size: 14px;
  white-space: nowrap;
  padding-top: 6px;
}

/* Title row + (job count | mobile Subscribe/Filter) — grid keeps one row on narrow screens */
.iws-job-toolbar-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.iws-job-results {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.iws-job-row {
  display: block !important;
  position: relative;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: #4b4b4b;
}

.iws-job-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Full-card hit target; content layer uses pointer-events: none so clicks reach this link */
.iws-job-row-stretch {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  text-decoration: none;
}

.iws-job-row-stretch:focus-visible {
  outline: 2px solid #2f6db5;
  outline-offset: 3px;
}

.iws-job-row-body {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.iws-job-title {
  display: block;
  width: 100%;
  min-width: 0;
}

.iws-job-title-heading {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.6;
  color: #2d87c4;
  font-family: "Lusitana", serif;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.iws-job-row:hover .iws-job-title-heading {
  color: #2472a8;
}

.iws-job-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.iws-tag {
  display: inline-block;
  background: #eef4ff;
  color: #2f6db5;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-right: 6px;
}

.iws-tag.program {
  background: #f0fdf4;
  color: #166534;
}

.iws-tag.type {
  background: #f3f4f6;
  color: #4b4b4b;
}

.iws-job-title-icons {
  display: inline;
  margin-right: 6px;
  white-space: nowrap;
}

.iws-tag-job {
  background: #fff7e6;
  color: #b26a00;
}

.iws-tag-job--featured {
  background: #fff7e6;
  color: #b26a00;
}

.iws-tag-job--hot {
  background: #fff1f0;
  color: #cf1322;
}

.iws-tag-job--urgent {
  background: #f0f5ff;
  color: #1d39c4;
}

.iws-empty-state,
.iws-loading {
  padding: 18px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  color: #666;
  background: #fafafa;
}

.iws-job-results > .iws-empty-state,
.iws-job-results > .iws-loading {
  color: #4b4b4b;
}

@media (max-width: 900px) {
  .iws-job-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .iws-job-sidebar {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    align-self: stretch;
  }

  .iws-job-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .iws-job-count {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .iws-filter-card {
    padding: 16px;
  }

  .iws-filter-header h3 {
    font-size: 26px;
  }

  .iws-job-row {
    padding: 18px;
  }

  .iws-job-title-heading {
    font-size: 19px;
  }

  .iws-btn {
    width: 100%;
  }

  .iws-filter-actions {
    flex-direction: column;
  }
}

/* ===== Force job list layout to stay horizontal and full width ===== */
.iws-job-content {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  writing-mode: horizontal-tb !important;
}

.iws-job-results {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  writing-mode: horizontal-tb !important;
}

.iws-job-results > .iws-job-row {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  inline-size: 100% !important;
  min-inline-size: 100% !important;
  box-sizing: border-box !important;
  writing-mode: horizontal-tb !important;
}

.iws-job-results > .iws-job-row .iws-job-title {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  writing-mode: horizontal-tb !important;
}

.iws-job-results > .iws-job-row .iws-job-title-heading {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  font-size: 19px !important;
  font-weight: 400 !important;
  writing-mode: horizontal-tb !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  line-height: 1.6 !important;
  color: #2d87c4 !important;
  font-family: "Lusitana", serif !important;
}

.iws-job-results > .iws-job-row:hover .iws-job-title-heading {
  color: #2472a8 !important;
}

.iws-job-results > .iws-job-row .iws-job-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: none !important;
  writing-mode: horizontal-tb !important;
}

.iws-job-results > .iws-job-row .iws-tag {
  writing-mode: horizontal-tb !important;
  white-space: normal !important;
}

.iws-job-layout {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  gap: 32px !important;
  width: 100% !important;
}

.iws-job-layout > .iws-job-content {
  width: 100% !important;
  min-width: 0 !important;
}

.iws-job-results > .iws-job-row {
  margin-bottom: 10px !important;
}

.iws-job-results > .iws-job-row:last-child {
  margin-bottom: 0 !important;
}

.iws-job-posted {
  margin-top: 8px;
  font-size: 13px;
  color: #4b4b4b;
  font-weight: 500;
}

.iws-job-posted-inner {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  max-width: 100%;
}

.iws-job-posted-date {
  color: #4b4b4b;
}

.iws-job-posted-sep {
  margin: 0 0.35em;
  color: #aaa;
  font-weight: 400;
}

.iws-job-posted-relative {
  color: #4b4b4b;
  font-weight: 500;
}

.iws-job-preview {
  margin-top: 10px;
  color: #4b4b4b;
  font-size: 14px;
  line-height: 1.7;
}

.iws-job-preview a {
  color: #4b4b4b;
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: auto;
}

.iws-job-preview a.iws-job-preview-more,
.iws-job-preview .iws-job-preview-more {
  color: #2d87c4;
  font-weight: 700;
  text-decoration: none;
  pointer-events: auto;
}

.iws-job-preview a.iws-job-preview-more:hover,
.iws-job-preview .iws-job-preview-more:hover {
  color: #2472a8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Filter mount + custom selects */
.iws-filter-mount {
  min-width: 0;
}

.iws-filter-widget.iws-checkbox-list {
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.iws-select {
  position: relative;
  width: 100%;
}

.iws-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.iws-select-trigger:hover {
  background: #f2f7ff;
  border-color: #b9d2f5;
}

.iws-select.is-open .iws-select-trigger {
  border-color: #2f6db5;
  background: #fff;
}

.iws-select-trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.iws-select-caret {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #666;
  transition: transform 0.2s ease;
}

.iws-select.is-open .iws-select-caret {
  transform: rotate(180deg);
}

.iws-select-summary {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  min-height: 1.25em;
}

.iws-select-panel {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 40;
  margin-top: 6px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.iws-select-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.iws-select-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #222;
  line-height: 1.45;
}

.iws-select-option:hover {
  background: #f2f7ff;
}

.iws-select-option input {
  margin: 3px 0 0;
  flex-shrink: 0;
}

.iws-select-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.iws-select-footer .iws-select-apply {
  width: 100%;
}

.iws-date-range {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.iws-date-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.iws-date-field label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.iws-date-field input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: #222;
}

.iws-date-field input[type="date"]:focus {
  outline: none;
  border-color: #2f6db5;
  box-shadow: 0 0 0 3px rgba(47, 109, 181, 0.12);
}

.iws-featured-shortcut {
  margin: 0 0 18px;
}

.iws-featured-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f5b942, #d38a00);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(211, 138, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.iws-featured-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(211, 138, 0, 0.28);
  opacity: 0.98;
}

.iws-featured-btn:active {
  transform: translateY(0);
}

.iws-featured-btn-icon {
  font-size: 16px;
  line-height: 1;
}

.iws-featured-btn-text {
  line-height: 1;
}

/* Careers top tabs — underlined navigation */
.iws-careers-tabs-wrap {
  width: 100%;
  min-width: 0;
}

.iws-careers-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
  padding-top: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
}

/* ===== Careers tabs row with right-side subscribe CTA ===== */

.iws-careers-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  padding-top: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

/*
 * Desktop / tablet: keep the tab row + “Get Job Alerts” pinned like a toolbar once scrolled into view.
 * Not applied at ≤768px — there .iws-job-toolbar is already sticky; two stickies at top:0 would overlap.
 * Fixed site header: set on a parent, e.g. body { --iws-careers-tabs-sticky-top: 96px; }
 */
@media (min-width: 769px) {
  .iws-careers-tabs-row {
    position: sticky;
    top: var(--iws-careers-tabs-sticky-top, 0px);
    z-index: 40;
    background: #fff;
  }
}

.iws-careers-tabs-row .iws-careers-tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* 只负责布局，不改基础按钮皮肤 */
.iws-careers-tabs-row .job-alert-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

/* ===== Floating subscribe button for jobs page ===== */

.job-alert-fab {
  position: fixed;
  right: 32px;
  bottom: max(32px, env(safe-area-inset-bottom, 0px));
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.job-alert-fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* 圆形 FAB：黑底白线图标，克制尺寸，减少继承 popup 长条按钮形态 */
.job-alert-fab a,
.job-alert-fab button {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
}

.job-alert-fab a:hover,
.job-alert-fab button:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.24);
}

.job-alert-fab a:active,
.job-alert-fab button:active {
  transform: translateY(0);
}

.job-alert-fab a svg,
.job-alert-fab button svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 1200px) {
  .job-alert-fab {
    right: 64px;
    bottom: max(36px, env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 1400px) {
  .job-alert-fab {
    right: 90px;
  }
}

@media (max-width: 900px) {
  .iws-careers-tabs-row {
    gap: 12px;
  }

  .iws-careers-tabs-row .job-alert-btn {
    display: none;
  }

  .job-alert-fab {
    right: 16px;
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
  }

  .job-alert-fab a,
  .job-alert-fab button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .job-alert-fab a svg,
  .job-alert-fab button svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 640px) {
  .iws-careers-tabs-row {
    margin-bottom: 24px;
  }
}

.iws-careers-tab {
  appearance: none;
  background: none;
  border: none;
  padding: 18px 0;
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: #0F3875;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.iws-careers-tab:hover {
  color: #111827;
}

.iws-careers-tab.is-active {
  color: #111827;
  font-weight: 600;
}

.iws-careers-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 3px;
  background: #2f6db5;
}

.iws-careers-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2f6db5;
  border-radius: 2px;
}

.iws-careers-panel[hidden] {
  display: none !important;
}

.iws-tab-loading,
.iws-static-page-content {
  padding: 8px 0 24px;
}

.iws-tab-page-title {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #111;
}

.iws-tab-page-body {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
}

.iws-tab-page-body > *:first-child {
  margin-top: 0;
}

/*
 * Mobile: tabs scroll horizontally only.
 * touch-action: pan-x — browser won’t treat the same gesture as vertical page scroll (reduces “上下晃动”).
 * overscroll-behavior — limits scroll chaining / rubber-band to the page while dragging tabs.
 */
@media (max-width: 768px) {
  .iws-careers-tabs-row {
    touch-action: pan-x;
  }

  .iws-careers-tabs {
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
  }

  .iws-careers-tabs .iws-careers-tab {
    touch-action: pan-x;
    white-space: nowrap;
  }
}

/* ========== Mobile filter drawer (≤768px): Filter button + slide-over panel ========== */
.iws-mobile-toolbar-actions {
  display: none;
}

.iws-mobile-subscribe-btn {
  display: none;
}

.iws-mobile-filter-bar {
  display: none;
  margin: 0;
}

.iws-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.iws-filter-toggle:hover {
  background: #f9fafb;
  border-color: #c4cbd4;
}

.iws-filter-toggle:active {
  transform: translateY(1px);
}

.iws-filter-toggle-icon {
  font-size: 13px;
  line-height: 1;
}

.iws-filter-toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #2f6db5;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.iws-filter-toggle-badge[hidden] {
  display: none !important;
}

.iws-filter-drawer[hidden] {
  display: none !important;
}

.iws-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  pointer-events: none;
}

.iws-filter-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.iws-filter-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.iws-filter-drawer.is-open .iws-filter-drawer-backdrop {
  opacity: 1;
}

.iws-filter-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(92vw, 380px);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  will-change: transform;
}

.iws-filter-drawer.is-open .iws-filter-drawer-panel {
  transform: translateX(0);
}

.iws-filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.iws-filter-drawer-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.iws-filter-drawer-close {
  appearance: none;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #374151;
  padding: 4px 8px;
}

.iws-filter-drawer-close:hover {
  color: #111827;
}

.iws-filter-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.iws-no-scroll {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .iws-filter-drawer-backdrop,
  .iws-filter-drawer-panel {
    transition: none !important;
  }
}

@media (max-width: 768px) {
  /* Sticky bar chrome (both markup variants) */
  .iws-job-toolbar {
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    padding-top: 8px;
    padding-bottom: 10px;
  }

  /*
   * New markup: .iws-job-toolbar-meta-row wraps #iws-job-count + .iws-mobile-toolbar-actions
   */
  .iws-job-toolbar:has(.iws-job-toolbar-meta-row) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .iws-job-toolbar:has(.iws-job-toolbar-meta-row) .iws-job-toolbar-main {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  /*
   * Legacy markup (still common on live sites): .iws-job-toolbar-main contains h3 + #iws-job-count,
   * and .iws-mobile-toolbar-actions is a *sibling* of main. Flatten main with display:contents
   * and use a 2-column grid so count and actions share row 2.
   */
  .iws-job-toolbar:not(:has(.iws-job-toolbar-meta-row)) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    row-gap: 8px;
    align-items: center;
  }

  .iws-job-toolbar:not(:has(.iws-job-toolbar-meta-row)) .iws-job-toolbar-main {
    display: contents;
  }

  .iws-job-toolbar:not(:has(.iws-job-toolbar-meta-row)) .iws-job-toolbar-main > h3 {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .iws-job-toolbar:not(:has(.iws-job-toolbar-meta-row)) .iws-job-toolbar-main > .iws-job-count {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    padding-top: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .iws-job-toolbar:not(:has(.iws-job-toolbar-meta-row)) > .iws-mobile-toolbar-actions {
    grid-column: 2;
    grid-row: 2;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: auto !important;
    max-width: none !important;
    justify-self: end;
  }

  .iws-job-toolbar:not(:has(.iws-job-toolbar-meta-row)) > .iws-mobile-toolbar-actions > * {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none !important;
  }

  .iws-job-toolbar-meta-row {
    gap: 10px;
  }

  .iws-job-toolbar-meta-row .iws-job-count {
    min-width: 0;
    padding-top: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .iws-job-toolbar-meta-row .iws-mobile-toolbar-actions {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    justify-self: end;
    width: auto !important;
    max-width: none !important;
    flex-shrink: 0;
  }

  .iws-job-toolbar-meta-row .iws-mobile-toolbar-actions > * {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none !important;
  }

  /*
   * Toolbar title: theme headings often use .entry-content h3 etc. with equal/higher
   * specificity or !important — scope under layout + content and force size on small screens.
   */
  .iws-job-layout .iws-job-content .iws-job-toolbar h3 {
    margin: 0 0 4px !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
    color: #3b92cf !important;
  }

  .iws-job-layout .iws-job-content .iws-job-toolbar .iws-job-count {
    font-size: 13px !important;
    padding-top: 0;
  }

  .iws-mobile-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .iws-mobile-subscribe-btn {
    display: block;
    flex-shrink: 0;
  }

  /* Match desktop .job-alert-btn: dark pill + ↗ (popup.css), compact for toolbar */
  .iws-mobile-subscribe-btn .iws-popup-trigger {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    height: auto;
    padding: 0 14px 0 16px;
    border: 1px solid rgba(10, 56, 117, 0.22);
    border-radius: 10px;
    background: #0a3875;
    color: #ffffff !important;
    font-size: clamp(11px, 2.9vw, 13px);
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    box-shadow:
      0 8px 20px rgba(10, 56, 117, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    overflow: hidden;
    transition:
      transform 0.22s ease,
      box-shadow 0.22s ease,
      background 0.22s ease,
      border-color 0.22s ease;
  }

  .iws-mobile-subscribe-btn .iws-popup-trigger::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0) 20%,
      rgba(255, 255, 255, 0.12) 50%,
      rgba(255, 255, 255, 0) 80%
    );
    transform: translateX(-140%);
    transition: transform 0.7s ease;
    pointer-events: none;
  }

  .iws-mobile-subscribe-btn .iws-popup-trigger::after {
    content: "↗";
    position: relative;
    z-index: 1;
    font-size: 12px;
    line-height: 1;
    opacity: 0.88;
    flex-shrink: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .iws-mobile-subscribe-btn .iws-popup-trigger:hover {
    transform: translateY(-1px);
    background: #0c458f;
    border-color: rgba(10, 56, 117, 0.35);
    box-shadow:
      0 12px 28px rgba(10, 56, 117, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  .iws-mobile-subscribe-btn .iws-popup-trigger:hover::before {
    transform: translateX(140%);
  }

  .iws-mobile-subscribe-btn .iws-popup-trigger:hover::after {
    transform: translate(2px, -1px);
    opacity: 1;
  }

  .iws-mobile-subscribe-btn .iws-popup-trigger:active {
    transform: translateY(0);
    box-shadow:
      0 6px 16px rgba(10, 56, 117, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .iws-mobile-subscribe-btn .iws-popup-trigger:focus-visible {
    outline: none;
    box-shadow:
      0 0 0 3px rgba(10, 56, 117, 0.28),
      0 8px 20px rgba(10, 56, 117, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .iws-mobile-filter-bar {
    display: block;
    flex-shrink: 0;
    margin: 0;
  }

  .iws-careers-tabs-row .job-alert-btn {
    display: none !important;
  }

  .job-alert-fab {
    display: none !important;
  }

  .iws-job-layout {
    display: block !important;
    width: 100% !important;
    margin: 24px 0 !important;
  }

  .iws-job-sidebar {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
  }

  .iws-job-content {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 12px;
    box-sizing: border-box;
  }

  .iws-job-results {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .iws-job-results > .iws-job-row {
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 18px !important;
    padding: 18px 16px;
  }

  .iws-job-results > .iws-job-row:last-child {
    margin-bottom: 0 !important;
  }

  .iws-filter-drawer-body .iws-filter-card {
    position: static !important;
    top: auto !important;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }
}

@media (max-width: 640px) {
  .iws-job-layout .iws-job-content .iws-job-toolbar h3 {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }
}

@media (min-width: 769px) {
  .iws-filter-drawer {
    display: none !important;
  }
}

/* Last: overrides `.iws-job-layout` grid !important so mobile does not reserve 280px track */
@media (max-width: 768px) {
  .iws-job-layout {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    width: 100% !important;
    margin: 24px 0 !important;
  }

  .iws-job-sidebar {
    display: none !important;
  }

  .iws-job-content {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .iws-job-results {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .iws-job-row {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}