/* ==========================================================================
   PassTheDay — listing results page (category archives + "All")
   Markup: ptd-listings-template.php. Colour tokens come from style.css :root.
   Everything is scoped to .ptd-results so Listeo's global form/heading rules
   can be overridden without touching other pages.
   ========================================================================== */

.ptd-listings-page { background: #FBFAF8; }

.ptd-results {
  --ptd-page-bg:   #FBFAF8;
  --ptd-line:      #ECE7DF;
  --ptd-line-soft: #F2EEE8;
  --ptd-chip:      #F3EFE8;
  --ptd-star:      #F0A232;
  --ptd-shadow:    0 2px 14px rgba(27, 42, 65, .05);
  color: var(--ptd-navy);
  font-size: 14px;
  line-height: 1.45;
  padding: 28px 0 70px;
}

.ptd-results *,
.ptd-results *::before,
.ptd-results *::after { box-sizing: border-box; }

.ptd-results__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.ptd-results p { margin: 0; color: inherit; }
.ptd-results h1,
.ptd-results h2 { margin: 0; letter-spacing: 0; }
.ptd-results a { text-decoration: none; }

.ptd-results .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Search bar ---------- */
.ptd-results .ptd-searchbar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--ptd-line-soft);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(27, 42, 65, .06);
  padding: 16px 20px 16px 8px;
  margin: 0 0 28px;
}

.ptd-results .ptd-searchbar__field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 4px 24px;
  cursor: text;
  font-weight: 400;
}
.ptd-results .ptd-searchbar__field--location { flex-grow: 1.35; }
.ptd-results .ptd-searchbar__field + .ptd-searchbar__field { border-left: 1px solid var(--ptd-line); }

.ptd-results .ptd-searchbar__icon {
  flex: 0 0 auto;
  width: 22px;
  text-align: center;
  font-size: 21px;
  color: var(--ptd-gold);
}

.ptd-results .ptd-searchbar__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }

.ptd-results .ptd-searchbar__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ptd-navy);
  line-height: 1.3;
  margin-bottom: 3px;
}

.ptd-results .ptd-searchbar input[type="text"],
.ptd-results .ptd-searchbar input[type="date"],
.ptd-results .ptd-searchbar select {
  width: 100%;
  height: 22px !important;
  min-height: 0 !important;
  line-height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13.5px !important;
  font-weight: 400;
  color: var(--ptd-text-muted) !important;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.ptd-results .ptd-searchbar input[type="text"] { cursor: text; }
.ptd-results .ptd-searchbar input::placeholder { color: #A3A9B3; opacity: 1; }

/* The native date input sits invisibly over the whole field; __value shows the formatted date. */
.ptd-results .ptd-searchbar__field--date { position: relative; cursor: pointer; }
.ptd-results .ptd-searchbar input.ptd-searchbar__date {
  position: absolute !important;
  inset: 0;
  z-index: 1;
  height: 100% !important;
  opacity: 0;
}
.ptd-results .ptd-searchbar__value {
  display: block;
  font-size: 13.5px;
  line-height: 22px;
  color: var(--ptd-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ptd-results .ptd-searchbar__value.is-placeholder { color: #A3A9B3; }

.ptd-results .ptd-searchbar__submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  margin: 0 0 0 12px;
  padding: 0 26px !important;
  border-radius: 6px !important;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.ptd-results .ptd-searchbar__submit i { font-size: 14px; }

/* ---------- Tabs + sort ---------- */
.ptd-results .ptd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 22px;
}

.ptd-results .ptd-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.ptd-results .ptd-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ptd-chip);
  color: var(--ptd-navy);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.ptd-results .ptd-tab__count { font-weight: 400; color: var(--ptd-text-muted); }
.ptd-results .ptd-tab:hover { background: #EAE3D8; color: var(--ptd-navy); }
.ptd-results .ptd-tab.is-active,
.ptd-results .ptd-tab.is-active:hover { background: var(--ptd-navy); color: #fff; }
.ptd-results .ptd-tab.is-active .ptd-tab__count { color: rgba(255, 255, 255, .85); }

.ptd-results .ptd-toolbar__actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

.ptd-results .ptd-sort { display: flex; align-items: center; gap: 14px; }
.ptd-results .ptd-sort label {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--ptd-text-muted);
  white-space: nowrap;
}
.ptd-results .ptd-sort__control { position: relative; display: block; }
.ptd-results .ptd-sort select {
  width: 156px;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 36px 0 14px !important;
  border: 1px solid var(--ptd-line) !important;
  border-radius: 6px !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 40px !important;
  color: var(--ptd-navy) !important;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.ptd-results .ptd-sort__control i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--ptd-navy);
  pointer-events: none;
}

.ptd-results .ptd-filters-toggle { display: none; }

/* ---------- Layout: filters + results share one panel ---------- */
.ptd-results .ptd-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: stretch;
  background: #FDFCFA;
  border: 1px solid var(--ptd-line-soft);
  border-radius: 14px;
}

/* ---------- Filters ---------- */
.ptd-results .ptd-filters {
  border-right: 1px solid var(--ptd-line-soft);
  padding: 30px 22px 24px;
}
.ptd-results .ptd-filters > form { position: sticky; top: 100px; }
.admin-bar .ptd-results .ptd-filters > form { top: 132px; }

.ptd-results .ptd-filters__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 30px;
}
.ptd-results .ptd-filters__title { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ptd-navy); }
.ptd-results .ptd-filters__clear { font-size: 13px; font-weight: 500; color: var(--ptd-gold); }
.ptd-results .ptd-filters__clear:hover { color: var(--ptd-navy); }
.ptd-results .ptd-filters__close,
.ptd-results .ptd-filters__apply { display: none; }

.ptd-results .ptd-filter-group {
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  min-width: 0;
}
.ptd-results .ptd-filter-group + .ptd-filter-group {
  border-top: 1px solid var(--ptd-line);
  padding-top: 30px;
  margin-top: 14px;
}
.ptd-results .ptd-filter-group__title {
  float: left; /* a non-floated legend sits in the fieldset border and adds a gap */
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ptd-navy);
}

.ptd-results .ptd-filter-group__title + .ptd-check { clear: both; }

.ptd-results .ptd-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ptd-navy);
  cursor: pointer;
}
.ptd-results .ptd-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.ptd-results .ptd-check__box {
  position: relative;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border: 1.5px solid #D3CEC6;
  border-radius: 4px;
  background: #fff;
  transition: background-color .15s ease, border-color .15s ease;
}
.ptd-results .ptd-check:hover .ptd-check__box { border-color: var(--ptd-navy); }
.ptd-results .ptd-check input:checked + .ptd-check__box { background: var(--ptd-navy); border-color: var(--ptd-navy); }
.ptd-results .ptd-check input:checked + .ptd-check__box::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ptd-results .ptd-check input:focus-visible + .ptd-check__box { outline: 2px solid var(--ptd-gold); outline-offset: 2px; }

.ptd-results .ptd-check__icon {
  flex: 0 0 22px;
  width: 22px;
  text-align: center;
  font-size: 16px;
  color: var(--ptd-navy);
  opacity: .85;
}
.ptd-results .ptd-check__icon svg { width: 18px; height: 18px; vertical-align: middle; }
.ptd-results .ptd-check__label { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.ptd-results .ptd-check__stars { display: inline-flex; gap: 1px; font-size: 12px; color: var(--ptd-star); }
.ptd-results .ptd-check__count { flex: 0 0 auto; font-size: 13.5px; color: var(--ptd-text-muted); }

.ptd-results .ptd-check.is-empty { cursor: default; opacity: .5; }
.ptd-results .ptd-check.is-empty:hover .ptd-check__box { border-color: #D3CEC6; }

/* ---------- Results header ---------- */
.ptd-results .ptd-main { min-width: 0; padding: 30px 18px 24px 32px; }

.ptd-results .ptd-main__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ptd-navy);
  margin: 0 0 18px;
}

/* ---------- Cards ---------- */
.ptd-results .ptd-cards { display: flex; flex-direction: column; gap: 20px; }

.ptd-results .ptd-card {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  min-height: 222px;
  background: #fff;
  border: 1px solid var(--ptd-line-soft);
  border-radius: 12px;
  box-shadow: var(--ptd-shadow);
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}
.ptd-results .ptd-card:hover { box-shadow: 0 10px 30px rgba(27, 42, 65, .10); }

.ptd-results .ptd-card__media { position: relative; min-height: 200px; background: var(--ptd-chip); }
.ptd-results .ptd-card__media > a { position: absolute; inset: 0; display: block; }
.ptd-results .ptd-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 0 0 12px;
  transition: transform .5s ease;
}
.ptd-results .ptd-card:hover .ptd-card__media img { transform: scale(1.03); }
.ptd-results .ptd-card__media { overflow: hidden; }

.ptd-results .ptd-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 5px;
  background: #fff;
  color: var(--ptd-navy);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
  pointer-events: none;
}

.ptd-results .ptd-card__fav {
  position: absolute;
  top: 12px;
  right: 14px;
  display: block;
  font-size: 21px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: transform .2s ease;
}
.ptd-results .ptd-card__fav:hover { transform: scale(1.1); }
.ptd-results .ptd-card__fav.fa-solid { color: #fff; }

.ptd-results .ptd-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 22px 20px 20px;
}

.ptd-results .ptd-card__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 7px;
}
.ptd-results .ptd-card__title a { color: var(--ptd-navy); }
.ptd-results .ptd-card__title a:hover { color: var(--ptd-gold); }

.ptd-results .ptd-card__location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ptd-text-muted);
  margin: 0 0 10px;
}
.ptd-results .ptd-card__location i { font-size: 11px; color: var(--ptd-text-muted); }

.ptd-results .ptd-card__rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1;
  color: #4B5563;
}
.ptd-results .ptd-card__stars { display: inline-flex; gap: 3px; font-size: 14px; color: var(--ptd-star); }
.ptd-results .ptd-card__stars .is-empty { color: #E2DCD2; }
.ptd-results .ptd-card__score { color: #4B5563; }
.ptd-results .ptd-card__reviews { color: #4B5563; }
.ptd-results .ptd-card__rating.is-unrated .ptd-card__reviews { color: var(--ptd-text-muted); font-size: 12.5px; }

.ptd-results .ptd-card__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 2px 0 16px;
  padding: 0;
  list-style: none;
}
.ptd-results .ptd-card__amenities li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.3;
  color: #4B5563;
}
.ptd-results .ptd-card__amenities li::before { display: none; }
.ptd-results .ptd-card__amenities i { font-size: 13px; color: var(--ptd-navy); opacity: .8; }
.ptd-results .ptd-card__amenities .ptd-svg-icon svg { width: 14px; height: 14px; vertical-align: middle; }

/* Two rows: offer type | price, then hours | button. Any cell may be missing. */
.ptd-results .ptd-card__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "type  price"
    "hours button";
  align-items: center;
  gap: 10px 16px;
  margin-top: auto;
}

.ptd-results .ptd-card__type { grid-area: type; font-size: 14px; font-weight: 600; color: var(--ptd-navy); }
.ptd-results .ptd-card__hours { grid-area: hours; font-size: 14px; color: var(--ptd-text-muted); }

.ptd-results .ptd-card__price {
  grid-area: price;
  justify-self: end;
  font-size: 13px;
  color: var(--ptd-text-muted);
  white-space: nowrap;
}
.ptd-results .ptd-card__price strong {
  margin: 0 2px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ptd-navy);
}

.ptd-results .ptd-card__button {
  grid-area: button;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  height: 36px;
  padding: 0 22px;
  border-radius: 5px;
  background: var(--ptd-navy);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .2s ease;
}
.ptd-results .ptd-card__button:hover,
.ptd-results .ptd-card__button:focus { background: var(--ptd-navy-hover); color: #fff; }

/* ---------- Pagination ---------- */
.ptd-results .ptd-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 26px 0 0;
}
.ptd-results .ptd-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ptd-navy);
  background: transparent;
}
.ptd-results .ptd-pagination a.page-numbers:hover { background: var(--ptd-chip); color: var(--ptd-navy); }
.ptd-results .ptd-pagination .page-numbers.current { background: var(--ptd-navy); color: #fff; }
.ptd-results .ptd-pagination .page-numbers.dots { min-width: 20px; color: var(--ptd-text-muted); }
.ptd-results .ptd-pagination .prev,
.ptd-results .ptd-pagination .next { font-size: 12px; }

/* ---------- Empty ---------- */
.ptd-results .ptd-empty {
  padding: 56px 24px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--ptd-line-soft);
  border-radius: 12px;
}
.ptd-results .ptd-empty > i { font-size: 28px; color: var(--ptd-gold); margin-bottom: 14px; }
.ptd-results .ptd-empty h2 { font-size: 19px; font-weight: 600; margin: 0 0 6px; }
.ptd-results .ptd-empty p { color: var(--ptd-text-muted); margin: 0 0 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .ptd-results .ptd-searchbar__field { padding: 4px 18px; gap: 12px; }
  .ptd-results .ptd-card { grid-template-columns: 38% minmax(0, 1fr); }
}

@media (max-width: 991px) {
  .ptd-results { padding-top: 20px; }

  .ptd-results .ptd-searchbar { flex-wrap: wrap; padding: 8px; }
  .ptd-results .ptd-searchbar__field { flex: 1 1 calc(50% - 8px); padding: 12px 14px; }
  .ptd-results .ptd-searchbar__field--location,
  .ptd-results .ptd-searchbar__field--date { flex-basis: 100%; }
  .ptd-results .ptd-searchbar__field + .ptd-searchbar__field { border-left: 0; }
  .ptd-results .ptd-searchbar__field--location { border-bottom: 1px solid var(--ptd-line); }
  .ptd-results .ptd-searchbar__submit { flex: 1 1 100%; justify-content: center; margin: 8px 0 0; }

  .ptd-results .ptd-toolbar { flex-direction: column; align-items: stretch; gap: 14px; }
  .ptd-results .ptd-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px 2px;
    scrollbar-width: none;
  }
  .ptd-results .ptd-tabs::-webkit-scrollbar { display: none; }
  .ptd-results .ptd-toolbar__actions { justify-content: space-between; }

  .ptd-results .ptd-filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid var(--ptd-line);
    border-radius: 6px;
    background: #fff;
    color: var(--ptd-navy);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }
  .ptd-results .ptd-filters-toggle__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ptd-gold); }

  .ptd-results .ptd-layout { grid-template-columns: minmax(0, 1fr); background: none; border: 0; border-radius: 0; }
  .ptd-results .ptd-main { padding: 0; }

  .ptd-results .ptd-filters {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100001;
    width: min(360px, 88vw);
    overflow-y: auto;
    background: #fff;
    border: 0;
    border-radius: 0 14px 14px 0;
    box-shadow: 0 0 40px rgba(27, 42, 65, .18);
    padding: 22px 20px 20px;
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s;
  }
  .ptd-results .ptd-filters > form,
  .admin-bar .ptd-results .ptd-filters > form { position: static; }
  .ptd-results .ptd-filters.is-open { transform: none; visibility: visible; transition: transform .3s ease; }

  .ptd-results .ptd-filters__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: auto;
    border: 0;
    border-radius: 50%;
    background: var(--ptd-chip);
    color: var(--ptd-navy);
    font-size: 15px;
    cursor: pointer;
  }
  .ptd-results .ptd-filters__head { align-items: center; }

  .ptd-results .ptd-filters__apply {
    display: block;
    position: sticky;
    bottom: 0;
    width: 100%;
    height: 46px;
    margin: 12px 0 0;
    font-size: 14.5px;
    box-shadow: 0 -14px 18px #fff !important;
  }
  .ptd-results .ptd-filters:not(.is-open) .ptd-filters__apply { display: none; }

  .ptd-results .ptd-filters-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(27, 42, 65, .45);
  }
  .ptd-results .ptd-filters-backdrop[hidden] { display: none; }
  body.ptd-filters-open { overflow: hidden; }
}

@media (max-width: 767px) {
  .ptd-results__inner { padding: 0 16px; }
  .ptd-results .ptd-tabs { margin: 0 -16px; padding: 0 16px 2px; gap: 8px; }
  .ptd-results .ptd-tab { height: 38px; padding: 0 16px; font-size: 14px; }

  .ptd-results .ptd-searchbar__field { flex-basis: 100%; }

  .ptd-results .ptd-sort { gap: 8px; }
  .ptd-results .ptd-sort select { width: 150px; }

  .ptd-results .ptd-main__title { font-size: 18px; }

  .ptd-results .ptd-card { grid-template-columns: minmax(0, 1fr); }
  .ptd-results .ptd-card__media { min-height: 0; aspect-ratio: 16 / 10; }
  .ptd-results .ptd-card__media img { border-radius: 12px 12px 0 0; }
  .ptd-results .ptd-card__body { padding: 16px; }
  .ptd-results .ptd-card__amenities { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ptd-results .ptd-card,
  .ptd-results .ptd-card__media img,
  .ptd-results .ptd-filters { transition: none; }
}
