/* ===== HEYGO — brand ===== */
:root {
  --navy: #0A1F35;
  --green: #48AA35;
  --yellow: #FEC40E;
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --text: #0A1F35;
  --muted: #5B6B7C;
  --line: #E4E8EE;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(10, 31, 53, .10);
  --topbar-h: 56px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* ===== Úvodní stránka ===== */
#intro {
  position: fixed; inset: 0; z-index: 3000;
  background: var(--yellow);
  overflow-y: auto;
  display: flex; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 20px 32px;
}
.intro-inner {
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  margin: auto 0;
}
.intro-logo { width: min(360px, 82%); height: auto; margin-bottom: 4px; }

.intro-modes {
  display: flex; gap: 6px; background: rgba(10, 31, 53, .10);
  padding: 5px; border-radius: 999px;
}
.intro-mode {
  border: 0; background: transparent; font: inherit; font-weight: 800; font-size: 1.02rem;
  color: rgba(10, 31, 53, .70); padding: 10px 20px; border-radius: 999px; cursor: pointer;
  transition: all .15s;
}
.intro-mode.active { background: var(--navy); color: #fff; }
.intro-hint { margin: -4px 0 0; color: var(--navy); opacity: .8; font-size: .92rem; text-align: center; }

.intro-field {
  position: relative; width: 100%;
  background: var(--card); border-radius: 999px;
  box-shadow: 0 6px 24px rgba(10, 31, 53, .14);
  padding: 8px 10px 8px 18px; min-height: 54px;
  display: flex; align-items: center; gap: 8px;
}
.intro-field:focus-within { box-shadow: 0 6px 24px rgba(10, 31, 53, .14), 0 0 0 2.5px var(--green); }
.intro-field input {
  flex: 1; min-width: 90px; font: inherit; font-weight: 600; color: var(--text);
  border: 0; outline: none; background: none; padding: 8px 0;
}
.intro-tokens { display: flex; gap: 6px; flex: none; max-width: 60%; overflow: hidden; }
.intro-tokens:empty { display: none; }
.token {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: .86rem;
  padding: 6px 8px 6px 12px; border-radius: 999px;
}
.token button {
  border: 0; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer;
  width: 20px; height: 20px; border-radius: 50%; font-size: .75rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.token button:hover { background: rgba(255, 255, 255, .35); }

.intro-list {
  list-style: none; margin: 0; padding: 8px;
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20;
  background: var(--card); border-radius: 18px;
  box-shadow: 0 10px 32px rgba(10, 31, 53, .18);
  display: flex; flex-direction: column; gap: 4px;
  max-height: 264px; overflow-y: auto;
}
.intro-list[hidden] { display: none; }

/* fáze „co?" — kategorie jako chips vedle sebe */
.intro-list.chips { flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 12px; }
.intro-list.chips li {
  display: inline-flex; width: auto; flex: none;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: .9rem;
}
.intro-list.chips li:hover { border-color: var(--yellow); background: #FFF8E1; }
.intro-list li {
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  font-size: .9rem; font-weight: 700; color: var(--text); background: var(--bg);
  display: flex; align-items: center; gap: 8px;
}
.intro-list li:hover { background: #EDF7EB; }
.intro-list .muted { color: var(--muted); font-weight: 400; font-size: .82rem; }
.intro-list .special { border: 1.5px dashed var(--green); background: #F5FBF3; }

.intro-go { width: 100%; font-size: 1.08rem; padding: 14px; border-radius: 14px; }
.intro-skip {
  border: 0; background: none; font: inherit; font-weight: 700; font-size: .88rem;
  color: rgba(10, 31, 53, .60); cursor: pointer; text-decoration: underline; padding: 4px;
}
.intro-skip:hover { color: var(--navy); }

/* ===== Topbar ===== */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--yellow);
  position: relative;
  z-index: 1200;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-icon { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-weight: 900; font-size: 1.25rem; color: var(--navy); letter-spacing: .5px; }
.brand-name em { font-style: normal; color: var(--green); }

.modes { display: flex; gap: 4px; margin-left: auto; background: rgba(10, 31, 53, .10); padding: 4px; border-radius: 999px; }
.mode-btn {
  border: 0; background: transparent; font: inherit; font-weight: 700;
  color: rgba(10, 31, 53, .70); padding: 6px 14px; border-radius: 999px; cursor: pointer;
  position: relative; transition: all .15s;
}
.mode-btn.active { background: var(--navy); color: #fff; }
.plan-badge {
  position: absolute; top: -4px; right: -2px;
  background: var(--green); color: #fff;
  font-size: .68rem; font-weight: 900; min-width: 17px; height: 17px;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.icon-btn {
  border: 0; background: rgba(255, 255, 255, .55); width: 38px; height: 38px; border-radius: 50%;
  font-size: 1.05rem; cursor: pointer; color: var(--navy); transition: all .15s;
}
.icon-btn:hover, .icon-btn.active { background: #FDECEC; color: #E5484D; }

/* ===== Layout ===== */
.app { position: relative; height: calc(100dvh - var(--topbar-h)); }
#map { position: absolute; inset: 0; z-index: 1; }

/* Panel: mobil = bottom sheet, desktop = sidebar */
.panel {
  position: absolute; z-index: 1000;
  left: 0; right: 0; bottom: 0;
  height: 46%;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 24px rgba(10,31,53,.14);
  overflow-y: auto;
  padding: 30px 14px 14px;
  transition: height .25s ease;
  overscroll-behavior: contain;
}
.panel.expanded { height: 82%; }
.panel.collapsed { height: 120px; }

.sheet-handle {
  position: absolute; z-index: 1001;
  left: 50%; transform: translateX(-50%);
  bottom: calc(46% - 24px);
  width: 72px; height: 26px;
  border: 0; background: transparent; cursor: grab;
  transition: bottom .25s ease;
}
.panel.expanded ~ .sheet-handle { bottom: calc(82% - 24px); }
.panel.collapsed ~ .sheet-handle { bottom: 96px; }
.sheet-handle span {
  display: block; width: 44px; height: 5px; border-radius: 3px;
  background: var(--line); margin: 6px auto;
}

.panel-section { display: flex; flex-direction: column; gap: 12px; }
.panel-title { margin: 0; font-size: 1.1rem; font-weight: 800; }
.hint { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }

/* ===== Chips ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: var(--card);
  font: inherit; font-weight: 700; font-size: .86rem;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); transition: all .15s;
}
.chip:hover { border-color: var(--yellow); }
.chip.active { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }

/* ===== Ovládání ===== */
.radius-row label { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.radius-row strong { color: var(--navy); }
input[type="range"] {
  width: 100%; accent-color: var(--green); height: 26px;
}
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.switch input { accent-color: var(--green); width: 17px; height: 17px; }

.btn {
  border: 0; font: inherit; font-weight: 800; cursor: pointer;
  border-radius: 12px; padding: 11px 18px; text-align: center; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s;
}
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: #3d922d; background: #3D922D; }
.btn.ghost { background: var(--bg); color: var(--navy); }
.btn.ghost:hover { background: var(--line); }
.btn.small { padding: 7px 12px; font-size: .85rem; border-radius: 10px; }

.status { font-size: .85rem; color: var(--muted); min-height: 1em; }
.status.error { color: #C0392B; font-weight: 700; }

/* ===== Kombinace ===== */
.combo-selects { display: flex; align-items: center; gap: 8px; }
.combo-selects select {
  flex: 1; font: inherit; font-weight: 700; padding: 9px 10px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text);
}
.combo-plus { font-weight: 900; color: var(--muted); }

/* ===== Seznam POI ===== */
.poi-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.poi-item {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 10px;
}
.poi-item:hover, .poi-item.selected { border-color: var(--yellow); box-shadow: var(--shadow); }
.poi-emoji {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; background: var(--bg);
}
.poi-body { flex: 1; min-width: 0; }
.poi-name { font-weight: 800; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poi-meta { font-size: .78rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.poi-dist { font-weight: 800; color: var(--green); font-size: .85rem; flex: none; }
.poi-pair-link { font-size: .78rem; color: var(--muted); }

/* ===== Plán ===== */
.plan-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.plan-step {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 12px; padding: 9px 12px;
}
.plan-step .num {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--navy); color: var(--yellow); font-weight: 900; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
.plan-step .leg { font-size: .76rem; color: var(--muted); margin-left: 36px; padding: 2px 0; }
.plan-step .name { flex: 1; font-weight: 800; font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-step .remove { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 2px 6px; }
.plan-step .remove:hover { color: #C0392B; }
.plan-leg { font-size: .76rem; color: var(--muted); padding-left: 24px; }
.plan-summary { font-weight: 800; font-size: .9rem; color: var(--navy); }
.plan-actions { display: flex; flex-direction: column; gap: 8px; }

/* ===== Leaflet ===== */
.poi-marker { background: none; border: none; }
.poi-marker .pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 6px;
  background: var(--card); border: 2.5px solid var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; box-shadow: 0 2px 8px rgba(10,31,53,.25);
  transform: rotate(-45deg);
}
.poi-marker .pin > span { transform: rotate(45deg); }
.poi-marker.selected .pin { border-color: var(--yellow); background: #FFF8E1; }
.me-marker .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--green); border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(72,170,53,.25), 0 2px 6px rgba(0,0,0,.3);
}
.dist-label {
  background: var(--navy); color: #fff; font-family: 'Nunito', sans-serif;
  font-size: .68rem; font-weight: 800; padding: 1px 7px; border-radius: 999px;
  border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.25); white-space: nowrap;
}
.leaflet-popup-content-wrapper { border-radius: 14px; font-family: 'Nunito', sans-serif; }
.leaflet-popup-content { margin: 12px 14px; min-width: 190px; }
.popup-name { font-weight: 800; font-size: .98rem; margin-bottom: 2px; }
.popup-meta { color: var(--muted); font-size: .8rem; margin-bottom: 8px; }
.popup-links { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.popup-links a { color: var(--green); font-weight: 700; font-size: .82rem; text-decoration: none; }
.popup-links a:hover { text-decoration: underline; }
.popup-actions { display: flex; gap: 6px; }
.popup-actions button {
  flex: 1; border: 0; font: inherit; font-weight: 800; font-size: .8rem;
  border-radius: 9px; padding: 7px 8px; cursor: pointer;
}
.popup-actions .p-fav { background: var(--bg); color: var(--navy); }
.popup-actions .p-fav.on { background: #FDECEC; color: #E5484D; }
.popup-actions .p-add { background: var(--yellow); color: var(--navy); }
.badge-verified {
  color: var(--green); font-weight: 800; font-size: .78rem;
  background: #EDF7EB; padding: 1px 7px; border-radius: 999px; white-space: nowrap;
}
.stars { color: var(--yellow); letter-spacing: 1px; font-size: .95rem; }
.stars .off { color: var(--line); }
.rating-num { font-weight: 800; color: var(--navy); font-size: .85rem; }
.rating-mine { color: var(--green); font-weight: 700; font-size: .78rem; }
.muted { color: var(--muted); font-weight: 400; }
.popup-note { font-style: italic; color: var(--navy); }

/* Influencerské tipy */
.badge-tip {
  color: #8A6A00; font-weight: 800; font-size: .78rem;
  background: #FFF4CC; padding: 1px 7px; border-radius: 999px; white-space: nowrap;
}
.tips-box { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.tip-row { background: #FFFBEF; border-radius: 10px; padding: 8px 10px; }
.tip-head { font-weight: 800; font-size: .82rem; color: var(--navy); }
.tip-head a { color: var(--navy); }
.tip-partner {
  margin-left: 6px; font-size: .68rem; font-weight: 800; color: #8A6A00;
  background: var(--yellow); padding: 1px 6px; border-radius: 999px;
}
.tip-text { font-size: .8rem; color: var(--muted); margin: 3px 0; }
.tip-link { font-size: .78rem; font-weight: 700; color: var(--green); text-decoration: none; }
.tip-link:hover { text-decoration: underline; }

/* ===== Desktop ===== */
@media (min-width: 900px) {
  .panel, .panel.expanded, .panel.collapsed {
    top: 0; bottom: 0; left: 0; right: auto;
    width: 400px; height: 100%;
    border-radius: 0; border-right: 1px solid var(--line);
    box-shadow: none; padding: 16px;
  }
  #map { left: 400px; }
  .sheet-handle { display: none; }
  .topbar { padding: 0 20px; }
}

/* Malé telefony */
@media (max-width: 420px) {
  .brand-name { display: none; }
  .mode-btn { padding: 6px 10px; font-size: .9rem; }
}
