/*
Theme Name: Chasing Horizons (custom)
Template: elyspace_horizon
Description: Custom changes for Chasing Horizons, on top of the ElySpace Horizon theme. Add styles below and functions in functions.php.
Version: 1.0.2
Text Domain: elyspace_horizon-child
*/

/* ---------- Packages left filter sidebar & calendar ---------- */
.pk-catalog { display: grid; grid-template-columns: 284px minmax(0, 1fr); gap: 28px; align-items: start; }
.pk-sidebar { position: sticky; top: 84px; z-index: 25; transition: top 0.4s var(--ease); }
.header-hidden .pk-sidebar { top: 16px; }
.fbar { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--sh-1); }
.fbar__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.fbar__head h2 { display: flex; align-items: center; gap: 7px; font-size: 0.98rem; letter-spacing: -0.01em; }
.fbar__head .ico { width: 16px; height: 16px; color: var(--deep); }
.fbar__reset { font-size: 0.8rem; font-weight: 600; color: var(--sun-ink); padding: 3px 7px; border-radius: 6px; transition: background-color 0.2s; }
.fbar__reset:hover { background: var(--sand); }
.fbar__sec { padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line); }
.fbar__head + .fbar__sec { margin-top: 0; border-top: 0; }
.fbar__title { font-family: var(--font-body); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--deep-900); margin-bottom: 7px; }
.fbar__title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.fbar__title-row .fbar__title { margin-bottom: 0; }
.fbar__sub { font-size: 0.76rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.fbar__note { font-size: 0.74rem; color: var(--muted); margin-top: 5px; line-height: 1.3; }
.fbar__list { display: grid; gap: 3px; }
.fbar__list--grid { grid-template-columns: 1fr 1fr; gap: 5px; }

.fcheck { position: relative; display: flex; align-items: center; gap: 7px; min-height: 29px; padding: 3px 6px; margin: 0 -4px; border-radius: 8px; cursor: pointer; font-size: 0.84rem; color: var(--ink); transition: background-color 0.18s; }
.fbar__list--grid .fcheck { margin: 0; padding: 5px 7px; border: 1px solid var(--line); background: #fff; font-size: 0.79rem; gap: 6px; min-height: 32px; }
.fbar__list--grid .fcheck:has(input:checked) { border-color: var(--deep); background: var(--mist); }
.fcheck:hover { background: var(--sand); }
.fcheck.is-empty { opacity: 0.45; }
.fcheck input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fcheck__box { width: 15px; height: 15px; flex: none; border-radius: 5px; border: 1.5px solid var(--line-strong); background: #fff; display: grid; place-items: center; color: #fff; transition: background-color 0.18s, border-color 0.18s; }
.fcheck__box .ico { width: 10px; height: 10px; opacity: 0; transform: scale(0.7); transition: opacity 0.15s, transform 0.15s; }
.fcheck input:checked + .fcheck__box { background: var(--deep); border-color: var(--deep); }
.fcheck input:checked + .fcheck__box .ico { opacity: 1; transform: scale(1); }
.fcheck input:focus-visible + .fcheck__box { outline: 2px solid var(--sun); outline-offset: 2px; }
.fcheck__text { flex: 1; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcheck input:checked ~ .fcheck__text { font-weight: 600; color: var(--deep-900); }
.fcheck__count { font-size: 0.74rem; color: var(--muted); font-weight: 600; }

.fbar__cats { display: flex; flex-wrap: wrap; gap: 5px; }
.fcat { display: inline-flex; align-items: center; gap: 5px; min-height: 29px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-align: left; font-size: 0.8rem; font-weight: 500; color: var(--ink); line-height: 1.2; transition: background-color 0.18s, color 0.18s, border-color 0.18s; }
.fcat:hover { border-color: var(--deep); background: var(--sand); }
.fcat__count { font-size: 0.72rem; font-weight: 600; color: var(--muted); opacity: 0.85; }
.fcat[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: #fff; font-weight: 600; }
.fcat[aria-pressed="true"] .fcat__count { color: rgba(255, 255, 255, 0.85); }

.fdate { position: relative; }
.fdate__trigger { width: 100%; min-height: 38px; padding: 6px 34px 6px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--sand); display: flex; align-items: center; gap: 8px; text-align: left; font-size: 0.84rem; color: var(--muted); transition: border-color 0.2s, background-color 0.2s; }
.fdate__trigger:hover, .fdate__trigger[aria-expanded="true"] { border-color: var(--deep); background: #fff; }
.fdate__trigger.has-value { background: #fff; border-color: var(--deep); color: var(--deep-900); font-weight: 600; }
.fdate__trigger .ico:first-child { width: 15px; height: 15px; color: var(--deep); flex: none; }
.fdate__text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdate__trigger .ico:last-child { width: 15px; height: 15px; color: var(--muted); flex: none; transition: transform 0.2s; }
.fdate__trigger[aria-expanded="true"] .ico:last-child { transform: rotate(180deg); }
.fdate__trigger.has-value .ico:last-child { opacity: 0; pointer-events: none; }
.fdate__clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background-color 0.2s, color 0.2s; }
.fdate__clear:hover { background: var(--mist); color: var(--deep-900); }
.fdate__clear .ico { width: 13px; height: 13px; }

.cal-pop { position: absolute; left: calc(100% + 12px); top: -110px; z-index: 40; width: 296px; max-width: calc(100vw - var(--gutter) * 2); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-2); padding: 13px; }
.cal-pop__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-pop__month { font-family: var(--font-display); font-size: 0.96rem; font-weight: 650; color: var(--deep-900); }
.cal-pop__nav { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--deep-900); transition: background-color 0.18s, border-color 0.18s; }
.cal-pop__nav:hover:not([disabled]) { background: var(--mist); border-color: var(--deep); }
.cal-pop__nav[disabled] { opacity: 0.35; cursor: not-allowed; }
.cal-pop__nav .ico { width: 15px; height: 15px; }
.cal-pop__week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 0.72rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.cal-pop__days { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 3px; }
.cal-day { height: 34px; border-radius: 8px; font-size: 0.84rem; font-weight: 500; color: var(--ink); display: grid; place-items: center; transition: background-color 0.14s, color 0.14s; }
.cal-day:hover:not([disabled]):not(.is-start):not(.is-end) { background: var(--sand); }
.cal-day[disabled] { opacity: 0.3; cursor: not-allowed; }
.cal-day.is-today:not(.is-start):not(.is-end) { box-shadow: inset 0 0 0 1.5px var(--sun); font-weight: 700; color: var(--deep-900); }
.cal-day.is-in-range, .cal-day.is-hover-range { background: var(--mist); color: var(--deep-900); border-radius: 0; }
.cal-day.is-start { background: var(--deep); color: #fff; font-weight: 700; border-radius: 8px 0 0 8px; }
.cal-day.is-end { background: var(--deep); color: #fff; font-weight: 700; border-radius: 0 8px 8px 0; }
.cal-day.is-start.is-end, .cal-day.is-single { border-radius: 8px; }
.cal-pop__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.cal-pop__hint { font-size: 0.76rem; color: var(--muted); }
.cal-pop__btns { display: flex; gap: 6px; }
.cal-pop__btn { padding: 5px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: var(--muted); transition: background-color 0.18s, color 0.18s; }
.cal-pop__btn:hover { background: var(--sand); color: var(--deep-900); }
.cal-pop__btn--done { background: var(--deep); color: #fff; }
.cal-pop__btn--done:hover { background: var(--deep-900); color: #fff; }

.pk-results__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; min-height: 32px; }
.pk-results__count { font-size: 0.92rem; color: var(--muted); }
.pk-results__count strong { color: var(--deep-900); }
.pk-results__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pk-filter-toggle { display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; font-size: 0.9rem; font-weight: 600; color: var(--deep-900); }
.pk-filter-toggle .ico { width: 16px; height: 16px; color: var(--deep); }
.pk-filter-toggle__badge { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sun); color: var(--deep-900); font-size: 0.76rem; font-weight: 700; display: inline-grid; place-items: center; }
.pk-empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--sand); }
.pk-empty p { color: var(--muted); font-size: 1.02rem; margin-bottom: 16px; }

@media (max-width: 1024px) {
  .pk-catalog { grid-template-columns: 1fr; gap: 20px; }
  .pk-sidebar { position: static; display: none; }
  .pk-sidebar.is-open { display: block; }
  .pk-filter-toggle { display: inline-flex; }
  .cal-pop { left: 0; top: calc(100% + 8px); }
}
@media (max-width: 760px) {
  .pk-results__grid { grid-template-columns: 1fr; gap: 18px; }
  .cal-pop { width: 100%; min-width: 268px; }
}
