/* =====================================================================
   Overview pages + entity cards (BEM)
   Uses the global tokens from st-global-styling.css:
     --main-background-color, --main-button-color, --main-heading-font-family,
     --main-text-font-family, --main-heading-font-size(-tablet/-mobile),
     --main-section-margin-side, --main-section-first-margin-top
   Breakpoints match the DM portal: 1023 (tablet) / 767 (mobile).
   ===================================================================== */

.entry-content {
  overflow-x: unset !important;
}

.st-ov {
  --ov-ink: #1a0f08;
  --ov-muted: #6f625c;
  --ov-line: #e6d9d5;
  --ov-field: #ffffff;
  --ov-dark: #1f0f07;              /* card body + active chips */
  --ov-cream: var(--main-background-color, #fdf4f3);
  --ov-green: var(--main-button-color, #1b4621);
  --ov-radius: 14px;
  --ov-sidebar: 290px;
  padding: var(--main-section-first-margin-top, 60px) var(--main-section-margin-side, 6%) clamp(60px, 7vw, 120px);
  color: var(--ov-ink);
  font-family: var(--main-text-font-family);
}
.st-ov *, .st-ov *::before, .st-ov *::after { box-sizing: border-box; }
.st-ov .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-ov [hidden] { display: none !important; }
.st-icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- head ---------- */
.st-ov__head { padding-bottom: clamp(18px, 2vw, 28px); margin-bottom: clamp(24px, 2.6vw, 40px); border-bottom: 1px solid var(--ov-ink); }
.st-ov__title { font-family: var(--main-heading-font-family); font-size: var(--main-heading-font-size); line-height: 1.08; margin: 0 0 .35em; color: var(--ov-ink); }
.st-ov__intro { margin: 0; font-size: clamp(16px, 1.15vw, 19px); color: var(--ov-muted); max-width: 60ch; }

/* ---------- layout ---------- */
.st-ov__layout { display: grid; grid-template-columns: var(--ov-sidebar) minmax(0, 1fr); gap: clamp(28px, 3vw, 48px); align-items: start; }
.st-ov__layout--full { grid-template-columns: minmax(0, 1fr); }
.st-ov__main { min-width: 0; }

/* ---------- search / DM bar ---------- */
.st-ov__search, .st-ov__place, .st-ov__tz {
  position: relative; display: flex; align-items: center;
  background: var(--ov-field); border: 1px solid var(--ov-line); border-radius: 999px;
  transition: border-color .15s, box-shadow .15s;
}
.st-ov__search:focus-within, .st-ov__place:focus-within, .st-ov__tz:focus-within { border-color: var(--ov-ink); }
input.st-ov__search-input:focus {
    border-style: none;
}
.st-ov__search-icon { position: absolute; left: 20px; color: var(--ov-ink); pointer-events: none; }
input.st-ov__search-input, .st-ov__tz-select {
  width: 100%; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 17px; color: var(--ov-ink);
  padding: 16px 20px 16px 52px; border-radius: 999px; transition: unset;
}
.st-ov__search-input::placeholder { color: #9b8f8a; }
.st-ov__search-input::-webkit-search-cancel-button { cursor: pointer; }
.st-ov__tz-select { appearance: none; cursor: pointer; padding-right: 28px; }

.st-ov__dmbar { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(170px, 240px); gap: 12px; align-items: center; }
.st-ov__place.is-disabled { background: #f3eceb; opacity: .6; }
.st-ov__place.is-disabled .st-ov__search-input { cursor: not-allowed; }

/* segmented control (format, age) */
.st-ov__seg { display: inline-flex; background: var(--ov-field); border: 1px solid var(--ov-line); border-radius: 999px; padding: 4px; gap: 2px; }
.st-ov__seg--block { display: flex; width: 100%; }
.st-ov__seg--block .st-ov__seg-opt { flex: 1; }
.st-ov__seg-opt { position: relative; cursor: pointer; }
.st-ov__seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.st-ov__seg-opt span { display: block; text-align: center; padding: 10px 16px; border-radius: 999px; font-size: 15px; white-space: nowrap; color: var(--ov-ink); transition: background .15s, color .15s; }
.st-ov__seg-opt input:checked + span { background: var(--ov-dark); color: #fff; }
.st-ov__seg-opt input:focus-visible + span { outline: 2px solid var(--ov-green); outline-offset: 2px; }

/* ---------- count / sort bar ---------- */
.st-ov__bar {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "count sort";
  align-items: center; gap: 12px 16px; margin: 16px 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--ov-ink);
}
.st-ov__count { grid-area: count; margin: 0; font-size: 15px; color: var(--ov-muted); }
.st-ov__sort { grid-area: sort; position: relative; display: inline-flex; align-items: center; gap: 8px; }
.st-ov__sort-label { font-size: 15px; color: var(--ov-muted); }
.st-ov__sort-select {
  appearance: none; font: inherit; font-size: 15px; color: var(--ov-ink); cursor: pointer;
  background: var(--ov-field); border: 1px solid var(--ov-line); border-radius: 999px; padding: 10px 40px 10px 16px;
}
.st-ov__sort-icon { position: absolute; right: 14px; pointer-events: none; }
.st-ov__filter-btn, .st-ov__clear--bar { display: none; }

/* ---------- sidebar ---------- */
.st-ov__sidebar {
  position: sticky; top: 24px; max-height: calc(100vh - 48px);
  overflow-y: auto; overscroll-behavior: contain; padding-right: 10px;
  /* Reserve the scrollbar's space even when it is not needed, so collapsing
     a section never makes the content jump sideways. */
  scrollbar-gutter: stable;
}
/* Slim, quiet scrollbars for every scrolling filter area. */
.st-ov__sidebar, .st-ov__groups, .st-ms__list { scrollbar-width: thin; scrollbar-color: rgba(26,15,8,.22) transparent; }
.st-ov__sidebar::-webkit-scrollbar, .st-ov__groups::-webkit-scrollbar, .st-ms__list::-webkit-scrollbar { width: 6px; background: transparent; }
.st-ov__sidebar::-webkit-scrollbar-track, .st-ov__groups::-webkit-scrollbar-track, .st-ms__list::-webkit-scrollbar-track { background: transparent; border-radius: 10px; }
.st-ov__sidebar::-webkit-scrollbar-thumb, .st-ov__groups::-webkit-scrollbar-thumb, .st-ms__list::-webkit-scrollbar-thumb { background: rgba(26,15,8,.18); border-radius: 10px; }
.st-ov__sidebar:hover::-webkit-scrollbar-thumb, .st-ms__list:hover::-webkit-scrollbar-thumb { background: rgba(26,15,8,.32); }
.st-ov__sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.st-ov__sidebar-title { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--main-text-font-family); font-weight: 600; font-size: 22px; }
.st-ov__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--ov-green); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.st-ov__clear { background: none !important; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 15px; color: var(--ov-green) !important; text-decoration: underline; text-underline-offset: 3px; }
.st-ov__sidebar-close, .st-ov__sidebar-foot { display: none; }

.st-ov__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-ov__chips:empty { display: none; }
.st-ov__chips--side { margin-bottom: 8px; }
.st-ov__chips--main { display: none; }
.st-ov__chip {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
  background: var(--ov-dark); color: #fff; border-radius: 6px; padding: 7px 10px; font: inherit; font-size: 14px;
}
.st-ov__chip-x { width: 14px; height: 14px; opacity: .8; }
.st-ov__chip:hover .st-ov__chip-x { opacity: 1; }

.st-ov__group { border-bottom: 1px solid var(--ov-line); padding: 14px 0; }
.st-ov__group-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.st-ov__group-head::-webkit-details-marker { display: none; }
.st-ov__group-title { font-family: var(--main-heading-font-family); font-size: 22px; }
.st-ov__group-icon { transition: transform .2s; }
.st-ov__group:not([open]) .st-ov__group-icon { transform: rotate(-90deg); }
.st-ov__group-body { padding-top: 12px; }
.st-ov__hint { margin: 10px 0 0; font-size: 13px; line-height: 1.4; color: var(--ov-muted); }

.st-ov__checks { display: grid; gap: 10px; }
.st-ov__check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 16px; }
.st-ov__check input { position: absolute; opacity: 0; pointer-events: none; }
.st-ov__check-box { width: 18px; height: 18px; border: 1.5px solid #b8aaa4; border-radius: 4px; background: #fff; flex: none; transition: background .15s, border-color .15s; }
.st-ov__check input:checked + .st-ov__check-box { background: var(--ov-green); border-color: var(--ov-green); }
.st-ov__check input:focus-visible + .st-ov__check-box { outline: 2px solid var(--ov-green); outline-offset: 2px; }

.st-ov__select, .st-ov__input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ov-ink);
  background: var(--ov-field); border: 1px solid var(--ov-line); border-radius: 10px; padding: 11px 12px;
}
.st-ov__select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a0f08' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.st-ov__select:focus, input.st-ov__input:focus { outline: none; border-color: var(--ov-ink); border-style: solid;}

/* ---------- multiselect ---------- */
.st-ms__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.st-ms__tags:not(:empty) { margin-bottom: 10px; }
.st-ms__tag {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
  background: var(--ov-dark); color: #fff; border-radius: 6px; padding: 6px 9px; font: inherit; font-size: 14px;
}
.st-ms__tag-x { width: 13px; height: 13px; }
.st-ms__field { position: relative; display: flex; align-items: center; }
.st-ms__icon { position: absolute; left: 12px; color: var(--ov-muted); pointer-events: none; }
input.st-ms__input { width: 100%; font: inherit; font-size: 15px; padding: 10px 12px 10px 38px; border: 1px solid var(--ov-line); border-radius: 10px; background: #fff; }
input.st-ms__input:focus { outline: none; border-color: var(--ov-ink); border-style: solid;}
.st-ms__list { list-style: none; margin: 8px 0 0; padding: 0 4px 0 0; max-height: 216px; overflow-y: auto; overscroll-behavior: contain; background: transparent; scrollbar-gutter: stable; }
.st-ms__opt { display: flex; align-items: center; gap: 10px; padding: 7px 4px; cursor: pointer; font-size: 15px; border-radius: 6px; }
.st-ms__opt:hover { background: rgba(26,15,8,.04); }
.st-ms__opt .st-ov__check-box { width: 17px; height: 17px; }
.st-ms__opt.is-selected { color: #a69894; cursor: default; }
.st-ms__opt.is-selected .st-ov__check-box { background: #c9bdb8; border-color: #c9bdb8; }
.st-ms__opt.is-disabled { opacity: .4; cursor: not-allowed; }
.st-ms__empty { padding: 7px 4px; font-size: 14px; color: var(--ov-muted); }

/* ---------- range (players) ---------- */
.st-range { --lo: 0%; --hi: 100%; }
.st-range__track { position: relative; height: 28px; }
.st-range__track::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 4px; background: var(--ov-line); }
.st-range__fill { position: absolute; top: 12px; height: 4px; border-radius: 4px; background: var(--ov-dark); left: var(--lo); right: calc(100% - var(--hi)); }
.st-range__input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; appearance: none; -webkit-appearance: none; }
.st-range__input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--ov-dark); border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: grab; }
.st-range__input::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--ov-dark); border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: grab; }
/* Native range inputs draw their own track (and in some engines a border or
   inset shadow on it) on top of .st-range__track::before. That is the "edge"
   that no box-shadow rule could remove: it belongs to the pseudo-elements
   below, so every engine gets an explicit reset. */
.st-range__input { border: 0; outline: 0; box-shadow: none; background: transparent; }
.st-range__input::-webkit-slider-runnable-track { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; border: 0; box-shadow: none; }
.st-range__input::-moz-range-track { height: 28px; background: transparent; border: 0; box-shadow: none; }
.st-range__input::-moz-range-progress { background: transparent; border: 0; }
.st-range__input::-ms-track { height: 28px; background: transparent; border-color: transparent; color: transparent; box-shadow: none; }
.st-range__input::-ms-fill-lower, .st-range__input::-ms-fill-upper { background: transparent; box-shadow: none; }
.st-range__input:focus { outline: none; }
.st-range__input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ov-green); outline-offset: 2px; }
.st-range__values { display: flex; justify-content: space-between; margin-top: 4px; font-size: 14px; font-weight: 600; }

/* ---------- grid ---------- */
/* Pages WITHOUT a sidebar: 5 → 4 → 3 (tablet) → 2 (small tablet) → 1.
   Pages WITH the filter sidebar: 4 → 3 → 2, and 2 from the tablet
   breakpoint down to mobile. */
.st-ov__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(14px, 1.3vw, 22px); }
.st-ov__layout:not(.st-ov__layout--full) .st-ov__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.st-ov__empty { padding: 60px 0; text-align: center; }
.st-ov__empty-title { font-family: var(--main-heading-font-family); font-size: 26px; margin: 0 0 6px; }
.st-ov__empty-text { margin: 0; color: var(--ov-muted); }
.st-ov__results.is-busy { opacity: .55; transition: opacity .15s; pointer-events: none; }

/* ---------- pager ---------- */
.st-ov__pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: clamp(32px, 3vw, 48px); }
.st-ov__pager-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--ov-ink); color: var(--ov-ink); background: #fff; text-decoration: none; transition: background .15s, color .15s;
}
a.st-ov__pager-btn:hover { background: var(--ov-dark); color: #fff; }
.st-ov__pager-btn.is-disabled { border-color: var(--ov-line); color: #c9bdb8; background: transparent; cursor: default; }
.st-ov__pager-status { font-size: 15px; color: var(--ov-muted); min-width: 110px; text-align: center; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1499px) {
  .st-ov__layout--full .st-ov__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-ov__layout:not(.st-ov__layout--full) .st-ov__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .st-ov__layout--full .st-ov__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-ov__layout:not(.st-ov__layout--full) .st-ov__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tablet + mobile: sidebar becomes an off-canvas panel, like the DM portal */
@media (max-width: 1023px) {
  .st-ov__title { font-size: var(--main-heading-font-size-tablet); }
  .st-ov__layout { grid-template-columns: minmax(0, 1fr); }
  .st-ov__layout:not(.st-ov__layout--full) .st-ov__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .st-ov__sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 1001; width: min(360px, 88vw); max-height: none; height: 100%;
    background: var(--ov-cream); padding: 20px 20px 0; box-shadow: 8px 0 30px rgba(0,0,0,.15);
    transform: translateX(-105%); transition: transform .25s ease; display: flex; flex-direction: column;
  }
  .st-ov__sidebar.is-open { transform: none; }
  .st-ov__groups { flex: 1; overflow: auto; }
  .st-ov__sidebar-close { display: inline-flex; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ov-ink); }
  .st-ov__sidebar-head .st-ov__clear { margin-left: auto; }
  .st-ov__chips--side { display: none; }
  .st-ov__sidebar-foot { display: block; padding: 14px 0 20px; background: var(--ov-cream); }
  .st-ov__apply { width: 100%; min-height: 50px; border: 0; border-radius: 999px; background: var(--ov-dark); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
  .st-ov__overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.35); }

  .st-ov__bar { grid-template-columns: 1fr auto; grid-template-areas: "count clear" "filter sort"; border-bottom: 0; padding-bottom: 0; }
  .st-ov__bar--simple { grid-template-areas: "count sort"; }
  .st-ov__clear--bar { display: inline; grid-area: clear; justify-self: end; }
  .st-ov__filter-btn {
    grid-area: filter; justify-self: start; display: inline-flex; align-items: center; gap: 8px;
    border: 0; border-radius: 999px; background: var(--ov-dark); color: #fff; cursor: pointer;
    padding: 11px 18px; font: inherit; font-size: 15px; font-weight: 600;
  }
  .st-ov__filter-btn .st-ov__badge { background: #fff; color: var(--ov-dark); }
  .st-ov__sort-label { display: none; }
  .st-ov__chips--main { display: flex; margin: -6px 0 18px; }
  .st-ov__dmbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .st-ov__dmbar .st-ov__seg { grid-column: 1 / -1; justify-self: start; }
}
body.st-ov-lock { overflow: hidden; }

@media (max-width: 899px) {
  .st-ov__layout--full .st-ov__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .st-ov__title { font-size: var(--main-heading-font-size-mobile); }
  .st-ov__grid,
  .st-ov__layout:not(.st-ov__layout--full) .st-ov__grid,
  .st-ov__layout--full .st-ov__grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .st-ov__dmbar { grid-template-columns: minmax(0, 1fr); }
  .st-ov__dmbar .st-ov__seg { display: flex; }
  .st-ov__dmbar .st-ov__seg-opt { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .st-ov__sidebar { transition: none; }
}
