/* Explore flight filter: a laminated checklist card beside the explore rail, plus a lit cabin-sign tag on the map. */
@font-face {
  font-family: "Aeroshow Pass";
  src: url("/fonts/ocr-b-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

.explore-filter-btn {
  position: absolute;
  right: 0;
  top: calc(2 * (var(--explore-rail-size) + 8px));
  width: var(--explore-rail-size);
  height: var(--explore-rail-size);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--explore-line);
  border-radius: 999px;
  background: var(--explore-surface);
  color: var(--explore-text);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.explore-search-dock.is-rail-above-launcher .explore-filter-btn { top: calc(-2 * (var(--explore-rail-size) + 8px)); }
.explore-filter-btn:hover { border-color: rgba(255, 255, 255, 0.32); }
.explore-filter-btn.is-open,
.explore-filter-btn.is-active {
  color: #ffc35c;
  border-color: rgba(255, 195, 92, 0.66);
  box-shadow: 0 0 0 1px rgba(255, 195, 92, 0.22), 0 6px 16px rgba(0, 0, 0, 0.32);
}
.explore-filter-btn-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffb547;
  box-shadow: 0 0 6px rgba(255, 181, 71, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.explore-filter-btn.is-active .explore-filter-btn-dot { opacity: 1; }
/* Its plan tag (when the plan does not include Explore filters) comes from airshow_plan_tags.css. */

/* The card */
.explore-filter-sheet {
  --ef-paper: #f6f3ea;
  --ef-paper-hi: #fffdf7;
  --ef-ink: #16161d;
  --ef-muted: #5d5a66;
  --ef-rule: rgba(22, 22, 29, 0.16);
  --ef-navy: #1d0d78;
  position: fixed;
  z-index: 1307;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  color: var(--ef-ink);
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 38%),
    var(--ef-paper);
  border-radius: 12px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.44), 0 3px 8px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  overflow: hidden;
  pointer-events: auto;
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.2s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.explore-filter-sheet[hidden] { display: none; }
.explore-filter-sheet.is-open { opacity: 1; transform: none; }
.explore-filter-sheet button { font: inherit; cursor: pointer; }

.explore-filter-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 11px 16px;
  background: var(--ef-navy);
  color: #fff;
}
.explore-filter-head-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.explore-filter-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}
.explore-filter-title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: 0.01em; }
.explore-filter-close {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: transparent;
  color: #fff;
}
.explore-filter-close:hover { background: rgba(255, 255, 255, 0.12); }

.explore-filter-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 22, 29, 0.3) transparent;
}
.explore-filter-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 0; }
.explore-filter-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ef-muted);
}
.explore-filter-input {
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1.25px solid rgba(22, 22, 29, 0.5);
  border-radius: 5px;
  background: var(--ef-paper-hi);
  color: var(--ef-ink);
  font-family: "Aeroshow Pass", "Pretendard Variable", monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.explore-filter-input::placeholder {
  color: rgba(22, 22, 29, 0.32);
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}
.explore-filter-input:focus { border-color: var(--ef-navy); box-shadow: 0 0 0 2px rgba(29, 13, 120, 0.18); }
.explore-filter-input.is-code { text-transform: uppercase; text-align: center; padding: 0 4px; }
.explore-filter-hint { font-size: 11px; color: var(--ef-muted); }
.explore-filter-row { display: flex; align-items: flex-end; gap: 6px; }
.explore-filter-row .explore-filter-field:last-child { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--ef-rule); }
.explore-filter-arrow { flex: 0 0 auto; padding-bottom: 8px; font-size: 14px; color: var(--ef-muted); }

/* Aircraft type checklist: box, ICAO code, name, dotted leader, live count. */
.explore-filter-checklist { display: flex; flex-direction: column; margin-top: 2px; }
.explore-filter-checklist-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--ef-ink);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.explore-filter-type-note { font-weight: 600; letter-spacing: 0.04em; text-transform: none; font-size: 11.5px; color: var(--ef-muted); }
.explore-filter-types { display: flex; flex-direction: column; padding: 3px 0 2px; }
.explore-filter-type {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid var(--ef-rule);
  background: transparent;
  color: var(--ef-ink);
  text-align: left;
  transition: background-color 0.12s ease, opacity 0.15s ease;
}
.explore-filter-type:hover { background: rgba(29, 13, 120, 0.06); }
.explore-filter-type.is-zero { opacity: 0.4; }
.explore-filter-type[hidden] { display: none; }
.explore-filter-more {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--ef-navy);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.explore-filter-more[hidden] { display: none; }
.explore-filter-box {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--ef-ink);
  border-radius: 3px;
  background: var(--ef-paper-hi);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.explore-filter-type.is-checked .explore-filter-box { background: var(--ef-navy); border-color: var(--ef-navy); }
.explore-filter-type.is-checked .explore-filter-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.explore-filter-type-code {
  flex: 0 0 42px;
  font-family: "Aeroshow Pass", monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.explore-filter-type-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.explore-filter-type.is-checked .explore-filter-type-name { font-weight: 800; }
.explore-filter-leader {
  flex: 1 1 auto;
  min-width: 12px;
  align-self: center;
  margin-top: 6px;
  border-bottom: 2px dotted rgba(22, 22, 29, 0.32);
}
.explore-filter-type-count {
  flex: 0 0 auto;
  min-width: 22px;
  text-align: right;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.explore-filter-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--ef-rule);
  background: rgba(255, 255, 255, 0.35);
}
.explore-filter-reset {
  height: 40px;
  padding: 0 12px;
  border: 1.25px solid rgba(22, 22, 29, 0.4);
  border-radius: 8px;
  background: transparent;
  color: var(--ef-ink);
  font-size: 13px;
  font-weight: 700;
}
.explore-filter-reset:disabled { opacity: 0.4; cursor: default; }
.explore-filter-apply {
  flex: 1 1 auto;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--ef-navy);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 14px rgba(29, 13, 120, 0.32);
}
.explore-filter-apply:hover { background: #2a1896; }
.explore-filter-apply-count { display: inline-block; font-variant-numeric: tabular-nums; }
.explore-filter-sheet button:focus-visible { outline: 2px solid var(--ef-navy); outline-offset: 2px; }
.is-ticking { animation: explore-filter-tick 0.22s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes explore-filter-tick {
  0% { transform: translateY(-4px); opacity: 0.2; }
  100% { transform: none; opacity: 1; }
}

/* Lit cabin sign that stays on the map while a filter is applied. */
.explore-filter-tag {
  position: fixed;
  left: 50%;
  top: 66px;
  z-index: 1306;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 6px 0 7px;
  box-sizing: border-box;
  border-radius: 10px;
  background: linear-gradient(180deg, #3b3e44, #222428);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(0, 0, 0, 0.55), 0 10px 22px rgba(0, 0, 0, 0.38);
  color: #f4f1e8;
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: explore-filter-sign-on 0.24s ease-out;
}
.explore-filter-tag[hidden] { display: none; }
.explore-filter-tag-lamp {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: radial-gradient(circle at 50% 42%, #fff1c4, #ffb547 62%, #c4770f);
  color: #3a2500;
  box-shadow: 0 0 12px rgba(255, 181, 71, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.explore-filter-tag-count {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 13px;
  color: rgba(244, 241, 232, 0.8);
  font-variant-numeric: tabular-nums;
}
.explore-filter-tag-clear {
  height: 28px;
  margin-left: 2px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.explore-filter-tag-clear:hover { background: rgba(255, 255, 255, 0.18); }
@keyframes explore-filter-sign-on {
  0% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  100% { opacity: 1; transform: translateX(-50%); }
}

html.airshow-mobile-runtime .explore-filter-tag { top: 42px; height: 32px; font-size: 10.5px; gap: 7px; }
html.airshow-mobile-runtime .explore-filter-tag-lamp { width: 22px; height: 22px; }
html.airshow-mobile-runtime .explore-filter-tag-clear { height: 24px; }
html.airshow-mobile-runtime .explore-filter-head { padding: 8px 10px 8px 14px; }
html.airshow-mobile-runtime .explore-filter-title { font-size: 15px; }
html.airshow-mobile-runtime .explore-filter-body { padding: 10px 14px 4px; gap: 8px; }
html.airshow-mobile-runtime .explore-filter-input { height: 30px; font-size: 14px; }
html.airshow-mobile-runtime .explore-filter-foot { padding: 8px 14px 10px; }
html.airshow-mobile-runtime .explore-filter-apply,
html.airshow-mobile-runtime .explore-filter-reset { height: 36px; }

@media (prefers-reduced-motion: reduce) {
  .explore-filter-sheet,
  .explore-filter-btn,
  .explore-filter-type,
  .explore-filter-btn-dot { transition: none; }
  .explore-filter-tag,
  .is-ticking { animation: none; }
}
