/* ski2.bambx.com — Travelex síút-választó.
   Paletta: zöld-fenyves (mélyzöld alap, meleg homok akcentus).
   Szándékosan egyetlen sötét megjelenés, mint a ski.bambx.com-nál. */

:root {
  color-scheme: dark;

  --bg:        #0e1611;
  --bg-2:      #121d16;
  --surface:   #16241b;
  --surface-2: #1c2e22;
  --line:      #26402f;
  --line-soft: rgba(238, 244, 239, .085);

  --ink:       #eef4ef;
  --ink-2:     #c2d2c7;
  --muted:     #8ba394;

  --accent:    #d8b878;   /* meleg homok */
  --accent-2:  #ecd09a;
  --accent-ink:#17200f;

  --pine:      #4e9c6b;   /* második akcentus — fenyő */
  --good:      #62c98a;
  --bad:       #e58f77;

  /* Ár-hőtérkép: egy hue, olcsó (sötétzöld) -> drága (világos homok) */
  --h1: #1b3324;  --h2: #2b4f31;  --h3: #4a6b39;
  --h4: #7d8b43;  --h5: #b5a259;  --h6: #e6c884;

  --radius: 13px;
  --maxw: 1240px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

a { color: var(--accent); }

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }

/* ---------- fejléc ---------- */

header.top {
  background: linear-gradient(160deg, #16281c, var(--bg));
  border-bottom: 1px solid var(--line-soft);
  padding: 26px 0 20px;
}

.brandrow { display: flex; align-items: baseline; gap: 13px; flex-wrap: wrap; }

h1 { font-size: 25px; font-weight: 700; }

.brandrow .src {
  font-size: 13px;
  color: var(--muted);
}

.sub { margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; max-width: 74ch; }

#statline {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12.8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
}

#statline b { color: var(--accent); font-weight: 600; }

/* ---------- szűrők ---------- */

.filters {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 15px 18px;
  margin: 20px 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px 18px;
  align-items: end;
}

.filters label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

select, input[type="number"], input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

select:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

input[type="range"] { width: 100%; accent-color: var(--accent); }

#fcount { color: var(--ink-2); font-size: 13px; align-self: center; }

/* ---------- fülek ---------- */

#tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

#tabs button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  padding: 10px 13px;
  cursor: pointer;
  margin-bottom: -1px;
  border-radius: 8px 8px 0 0;
}

#tabs button:hover { color: var(--ink); background: var(--surface); }

#tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 650;
}

.tab { display: none; }
.tab.on { display: block; }

/* ---------- kártyák ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 15px;
}

.card h3 { font-size: 16.5px; font-weight: 650; }

.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* ---------- döntéssegítő ---------- */

#weights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  gap: 15px 22px;
  margin-bottom: 20px;
}

.wrow label { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
.wrow label span { color: var(--accent); font-variant-numeric: tabular-nums; }

.rank {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.rank:last-child { border-bottom: none; }

.rank .pos {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.rank .body { flex: 1; min-width: 0; }

.rank .nm { font-weight: 650; font-size: 16px; }

.rank .meta { color: var(--muted); font-size: 13px; margin-top: 3px; }

.bar {
  height: 7px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 9px;
}

.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.rank .price { text-align: right; flex: none; }
.rank .price b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.rank .price small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- táblázat ---------- */

.tablewrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }

th {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom-color: var(--line);
  cursor: pointer;
  user-select: none;
  position: sticky; top: 0; background: var(--surface);
}

th:hover { color: var(--accent); }
th.sorted::after { content: " ↓"; color: var(--accent); }
th.sorted.asc::after { content: " ↑"; }

td { font-variant-numeric: tabular-nums; }
td:first-child { font-variant-numeric: normal; }
tbody tr:hover { background: rgba(216, 184, 120, .06); }

/* ---------- térkép ---------- */

#map { height: 540px; border-radius: var(--radius); border: 1px solid var(--line); }

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--surface-2); color: var(--ink);
}
.leaflet-popup-content { font: 13.5px/1.5 system-ui, sans-serif; }
.leaflet-popup-content b { color: var(--accent); }

/* ---------- ár-naptár (hőtérkép) ---------- */

.heat { overflow-x: auto; }
.heat table { font-size: 12.5px; }
.heat td { text-align: center; padding: 7px 8px; border: 2px solid var(--surface); border-radius: 4px; }
/* A hőtérkép-cellák háttere és szövegszíne EGYÜTT, osztályonként.
   Korábban egyetlen sötét szövegszín volt minden cellán — a ramp alsó,
   sötétzöld végén (h1-h3) az gyakorlatilag olvashatatlan volt. */
.heat td.v { font-weight: 650; }
.heat td.h1 { background: var(--h1); color: #dfe9e0; }
.heat td.h2 { background: var(--h2); color: #e4efe4; }
.heat td.h3 { background: var(--h3); color: #f0f6ea; }
.heat td.h4 { background: var(--h4); color: #14180c; }
.heat td.h5 { background: var(--h5); color: #14180c; }
.heat td.h6 { background: var(--h6); color: #14180c; }
.heat td.na { color: var(--muted); background: var(--surface-2); }
.heat th { white-space: nowrap; }

.legend { display: flex; gap: 5px; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { width: 26px; height: 13px; border-radius: 3px; display: inline-block; }

/* ---------- összehasonlítás ---------- */

#comparepick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 13px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

/* ---------- szállások ---------- */

.hcard {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 11px;
}

.hcard .top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.hcard .nm { font-weight: 650; font-size: 15.5px; }
.hcard .loc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.hcard .pr { text-align: right; flex: none; }
.hcard .pr b { font-size: 18px; font-weight: 700; }
.hcard .pr small { display: block; color: var(--muted); font-size: 12px; }

.stars { color: var(--accent); font-size: 13px; letter-spacing: 1px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.tag {
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 8px;
}

.empty { color: var(--muted); padding: 26px 0; text-align: center; font-size: 14px; }

footer.site {
  border-top: 1px solid var(--line-soft);
  margin-top: 34px;
  padding: 22px 0 48px;
  color: var(--muted);
  font-size: 12.8px;
}

footer.site a { color: var(--ink-2); }

/* A szállás-nézet belső szűrősora. Külön osztály, mert a szigorú CSP
   (`style-src 'self'`) az inline style attribútumot is tiltja. */
.sub-filters { margin-top: 14px; }

/* Figyelmeztetés azokról a terepekről, amikre egyáltalán nincs ár. */
.noprice {
  margin: -6px 0 16px;
  padding: 9px 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13px;
}
.noprice[hidden] { display: none; }
