/* Styly pro nové features (auth picker, favorites, sort, saved filters,
   polygon, watchers, PWA banner). Nevkládáno do <style> v index.html, aby
   se daly upravovat bez editace hlavního souboru. */

/* ─── Grid layout: 2 karty vedle sebe v list-panelu ─────────── */
#venue-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 8px;
}
/* Empty state přes celou šířku gridu, centrovaný */
#venue-list .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}
#venue-list .empty-state .icon { font-size: 48px; margin-bottom: 12px; }
#venue-list .empty-state h3 { margin: 0 0 6px; color: #1e293b; font: 700 16px Inter; }
#venue-list .empty-state p { margin: 0; font: 500 13.5px Inter; }
@media (max-width: 480px) {
  #venue-list { grid-template-columns: 1fr; gap: 8px; padding: 8px; }
}
/* Override list-panel padding na desktopu aby karty zabraly víc šířky */
@media (min-width: 1024px) {
  .list-panel { padding: 8px !important; }
}

/* Override original .venue-card (může mít row-layout v media query) */
.venue-card.venue-card-grid {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  border-radius: 14px;
  background: white;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  margin-bottom: 0 !important;
}
.venue-card.venue-card-grid:hover {
  box-shadow: 0 8px 24px rgba(15,23,42,0.10);
  border-color: #cbd5e1;
  transform: none !important;
}
.venue-card.venue-card-grid .venue-photo {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  flex-shrink: 1 !important;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0 !important;
  display: block !important;
}
/* Skryjeme původní gradient ::after */
.venue-card.venue-card-grid .venue-photo::after { display: none !important; }
.venue-card-grid .venue-photo.is-placeholder { /* fialový fallback s logem */
  background-color: #f5f3ff !important;
}
.venue-card-grid .venue-photo-badges {
  position: absolute; top: 8px; left: 8px;
  display: flex; gap: 4px; z-index: 2;
}
.venue-mini-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px;
  background: rgba(255,255,255,0.95);
  border-radius: 999px;
  font: 600 11px Inter, system-ui;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(15,23,42,0.12);
  backdrop-filter: blur(4px);
}
.venue-mini-badge.live   { background: rgba(22,163,74,0.95); color: white; }
.venue-mini-badge.phone  { background: rgba(245,158,11,0.95); color: white; }
.venue-mini-badge.login  { background: rgba(100,116,139,0.95); color: white; }
.venue-mini-badge.ms     { color: #e30613; font-weight: 800; }

.venue-card.venue-card-grid .venue-body-compact {
  padding: 10px 12px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
  min-width: 0;
}
.venue-name-below {
  margin: 0;
  font: 700 14px Inter, system-ui;
  line-height: 1.25;
  color: #1e293b;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.venue-meta-below {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font: 600 12px Inter;
  color: #64748b;
}
.venue-meta-below .venue-rating { color: #1e293b; }
.venue-meta-below .venue-rating .star { color: #fbbf24; margin-right: 2px; }
.venue-meta-below .venue-rating .count { color: #94a3b8; font-weight: 500; }
.venue-meta-below .venue-dist { color: #64748b; }
/* Sport tagy nově na fotce vlevo dole — kompaktní s blur backdropem */
.venue-photo-sports {
  position: absolute; left: 8px; bottom: 8px; right: 8px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.venue-photo-sport {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  font: 700 10.5px Inter, system-ui;
  color: #1e293b;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.venue-photo-sport .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted-2);
}
.venue-photo-sport.tenis .dot      { background: var(--tenis); }
.venue-photo-sport.badminton .dot  { background: var(--badminton); }
.venue-photo-sport.squash .dot     { background: var(--squash); }
.venue-photo-sport.padel .dot      { background: var(--padel); }
.venue-photo-sport.pickleball .dot { background: var(--pickleball); }

/* Favorite button na grid kartě — top right */
.venue-card-grid .rez-fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
}

/* ─── Count pilly (volné / obsazené / bez online) ───────────── */
.list-count {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.count-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font: 600 12px Inter, system-ui;
  white-space: nowrap;
}
.count-pill b { font-weight: 700; }
.count-pill.count-green { background: #ecfdf5; color: #166534; }
.count-pill.count-red   { background: #fef2f2; color: #991b1b; }
.count-pill.count-amber { background: #fffbeb; color: #92400e; }

/* ─── Smart location filter ──────────────────────────────────── */
.rez-loc-trigger.active {
  background: #ede9fe; color: #6d28d9; border-color: #c4b5fd;
}
.rez-loc-modal { max-width: 520px; }
.rez-loc-body { display: flex; flex-direction: column; gap: 8px; }
.rez-loc-mode {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; cursor: pointer;
  font: 600 14px Inter, system-ui; color: #1e293b;
}
.rez-loc-mode input[type="radio"] {
  width: 18px; height: 18px; accent-color: #8b5cf6; cursor: pointer;
}
.rez-loc-section {
  margin-left: 28px; margin-bottom: 4px;
  display: none; /* JS přepne na "" pro vybraný mode */
  flex-direction: column; gap: 8px;
}
.rez-loc-districts {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 140px; overflow-y: auto;
  padding: 8px; background: #f8fafc; border-radius: 10px;
}
.rez-loc-input-wrap { position: relative; }
.rez-loc-input-wrap input {
  width: 100%; padding: 10px 14px;
  border: 1px solid #e2e8f0; border-radius: 12px;
  font: 500 14px Inter; color: #1e293b;
}
.rez-loc-input-wrap input:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.2); }
.rez-loc-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 100;
  background: white; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15,23,42,0.10);
  max-height: 220px; overflow-y: auto;
}
.rez-loc-suggest:empty { display: none; }
.rez-loc-sug-item {
  display: block; width: 100%; padding: 10px 14px;
  background: white; border: none; text-align: left;
  font: 500 13.5px Inter; color: #1e293b; cursor: pointer;
}
.rez-loc-sug-item:hover { background: #f8fafc; }
.rez-loc-sug-empty { padding: 12px; color: #94a3b8; font: 500 13px Inter; text-align: center; }
.rez-loc-radius { display: flex; flex-wrap: wrap; gap: 6px; }
.rez-loc-point {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: #f8fafc; border-radius: 10px;
}
.rez-loc-point-num { font: 700 12px Inter; color: #6d28d9; flex-shrink: 0; }
.rez-loc-point-name { font: 500 13px Inter; color: #1e293b; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Pull-to-refresh indicator (mobile/PWA) ────────────────── */
.rez-ptr {
  position: fixed; top: calc(-60px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2500;
  display: none;
  flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 22px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.15);
  font: 600 12px Inter, system-ui;
  color: #475569;
  transition: opacity .2s;
  pointer-events: none;
  user-select: none;
}
.rez-ptr.active { display: flex; }
.rez-ptr-spinner {
  color: #8b5cf6;
  transition: transform .2s ease;
}
.rez-ptr.ready .rez-ptr-spinner {
  color: #16a34a;
  transform: rotate(180deg);
}
.rez-ptr.refreshing .rez-ptr-spinner {
  animation: rezPtrSpin 0.8s linear infinite;
}
@keyframes rezPtrSpin {
  to { transform: rotate(360deg); }
}
.rez-ptr-label { white-space: nowrap; }

/* ─── Watch CTA banner (zobrazuje se když preset aktivní + 0 volných) ─── */
.rez-watch-cta-banner {
  margin: 0 8px 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fef3f2, #fff7ed);
  border: 1.5px solid #fdba74;
  border-radius: 14px;
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  animation: rezFadeIn .2s ease;
}
/* Info varianta — jen telefonická venues (žádný watcher) */
.rez-watch-cta-banner.rez-watch-cta-info {
  background: linear-gradient(135deg, #fefce8, #fef3c7);
  border-color: #facc15;
}
.rez-watch-cta-text {
  flex: 1; min-width: 0;
  font: 500 13.5px Inter, system-ui;
  color: #7c2d12;
  line-height: 1.4;
}
.rez-watch-cta-text strong { color: #9a3412; font-weight: 700; }
.rez-watch-cta-hint {
  font-size: 12.5px; color: #9a3412; font-weight: 500;
}
.rez-watch-cta-banner #rez-watch-cta-btn {
  flex-shrink: 0;
  font-size: 13px; padding: 9px 14px;
}

/* ─── Status coloring po aktivaci presetu ─────────────────── */
/* Karta zabarvená napříč celým boxem (jemně) + viditelný border */
.venue-card[data-status="green"] {
  background: #ecfdf5 !important;  /* emerald-50 */
  border: 1.5px solid #16a34a;
  box-shadow: 0 1px 4px rgba(22,163,74,0.10);
}
.venue-card[data-status="amber"] {
  background: #fffbeb !important;  /* amber-50 */
  border: 1.5px solid #f59e0b;
  box-shadow: 0 1px 4px rgba(245,158,11,0.10);
}
.venue-card[data-status="red"] {
  background: #fef2f2 !important;  /* red-50 */
  border: 1.5px solid #dc2626;
  box-shadow: 0 1px 4px rgba(220,38,38,0.08);
  opacity: 0.82;
}
.venue-card[data-status="red"]:hover { opacity: 1; }
/* Markers na mapě — status barva přebije sport barvu */
.venue-marker.status-green { background: #16a34a !important; border-color: white !important; }
.venue-marker.status-amber { background: #f59e0b !important; border-color: white !important; }
.venue-marker.status-red   { background: #dc2626 !important; border-color: white !important; }

/* ─── Zarovnání: Oblíbené/Oblast/Filtry vpravo, hlavní filtry vlevo ─── */
/* První z user-feature trojice (Oblíbené) dostane auto margin → strčí vpravo
   spolu se sourozenci (polygon + filters dropdown) */
.desktop-filters #rez-only-favorites { margin-left: auto; }

/* ─── Schovat prefix label pokud filtr má hodnotu ─────────── */
/* .f-trig[data-empty="false"] = filtr je nastavený, prefix nepotřebujeme */
.desktop-filters .f-trig[data-empty="false"] .f-lbl {
  display: none;
}
.desktop-filters .f-trig[data-empty="false"] .f-val {
  /* lehce navýšíme font, ať to vypadá vyváženě */
  font-weight: 700;
}

/* ─── Filters dropdown (jeden trigger v topbaru) ─────────── */
.rez-sf-wrap { position: relative; }
.rez-sf-trigger.active {
  background: #ede9fe !important; border-color: #c4b5fd !important; color: #6d28d9 !important;
}
.rez-sf-trigger.active .f-lbl { color: #6d28d9 !important; }
.rez-sf-trigger.active .f-val { font-weight: 700; }
.rez-sf-menu {
  position: absolute; top: calc(100% + 6px); right: 0;  /* zarovnáno k pravé hraně triggru, ne přes viewport */
  min-width: 240px; max-width: 320px; padding: 6px;
  background: white; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 8px 30px rgba(15,23,42,0.14);
  display: none; flex-direction: column; gap: 2px;
  z-index: 1600;
  max-height: 70vh; overflow-y: auto;
}
/* Mobile: full-width drop, mid-screen */
@media (max-width: 640px) {
  .rez-sf-menu {
    position: fixed;
    top: auto; bottom: 20px;
    left: 12px; right: 12px;
    max-width: none; min-width: 0;
    max-height: 60vh;
  }
}
.rez-sf-menu.open { display: flex; animation: rezFadeIn .12s ease; }
.rez-sf-add {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  background: transparent; border: none; cursor: pointer;
  font: 700 14px Inter; color: #6d28d9;
  transition: background .12s;
}
.rez-sf-add:hover { background: #f5f3ff; }
.rez-sf-add-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: #ede9fe; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; line-height: 1;
}
.rez-sf-divider { height: 1px; background: #f1f5f9; margin: 4px 0; }
.rez-sf-empty {
  padding: 14px 12px; font: 500 13px Inter; color: #94a3b8; text-align: center;
}
.rez-sf-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  transition: background .12s;
}
.rez-sf-item:hover { background: #f8fafc; }
.rez-sf-item.active {
  background: #ede9fe;
}
.rez-sf-item-name { font: 600 13.5px Inter; color: #1e293b; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rez-sf-item.active .rez-sf-item-name { color: #6d28d9; }
.rez-sf-item-actions { display: inline-flex; gap: 2px; flex-shrink: 0; }
.rez-sf-icon {
  width: 26px; height: 26px; border-radius: 6px;
  background: transparent; border: none; cursor: pointer;
  color: #94a3b8; font-size: 14px; line-height: 1;
  transition: all .12s;
}
.rez-sf-icon:hover { background: #f1f5f9; color: #1e293b; }
.rez-sf-icon-danger:hover { background: #fef2f2; color: #dc2626; }
.rez-sf-deactivate {
  padding: 8px 12px; border-radius: 8px;
  background: transparent; border: none; cursor: pointer;
  font: 600 13px Inter; color: #dc2626; text-align: left;
}
.rez-sf-deactivate:hover { background: #fef2f2; }

/* ─── Weekday row v save dialogu ─────────────────────────── */
.rez-weekday-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px;
}
.rez-weekday-row .rez-chip {
  padding: 6px 10px; font-size: 12.5px;
}

/* ─── Saved filter dialog: location mode radio ──────────────── */
.rez-sf-loc-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 8px;
}
.rez-sf-loc-mode {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; cursor: pointer;
  font: 600 13px Inter; color: #1e293b;
}
.rez-sf-loc-mode input[type="radio"] {
  width: 16px; height: 16px; accent-color: #8b5cf6;
}
.rez-sf-loc-content { display: none; margin-top: 4px; }
.rez-sf-details summary {
  cursor: pointer; padding: 6px 10px;
  font: 600 13px Inter; color: #6d28d9;
  background: #f5f3ff; border-radius: 8px;
  list-style: none;
}
.rez-sf-details summary::after { content: " ▾"; opacity: 0.5; }
.rez-sf-details[open] summary::after { content: " ▴"; }
.rez-sf-details .rez-sf-districts {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 6px;
  max-height: 200px; overflow-y: auto;
}

/* ─── Saved filter dialog ──────────────────────────────────── */
.rez-sf-modal { max-width: 520px; }
.rez-form-section {
  padding: 12px; background: #f8fafc; border-radius: 14px;
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid #f1f5f9;
}
.rez-form-section-label { font: 600 12.5px Inter; color: #64748b; }
.rez-sf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rez-sf-multilabel { font: 600 12.5px Inter; color: #64748b; flex: 0 0 100%; }
.rez-sf-districts {
  display: flex; flex-wrap: wrap; gap: 6px; flex: 1;
  max-height: 90px; overflow-y: auto;
}
.rez-chip-edit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(15,23,42,.05); font-size: 11px; line-height: 1;
  margin-left: 4px;
}
.rez-chip-edit:hover { background: rgba(139,92,246,.18); color: #6d28d9; }

/* ─── Venue picker modal ────────────────────────────────── */
.rez-vp-modal { max-width: 560px; max-height: 85vh; display: flex; flex-direction: column; }
.rez-vp-modal .rez-modal-body { display: contents; }
.rez-vp-quick {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 24px 8px;
}
.rez-vp-quick .rez-chip { font-size: 12px; }
.rez-chip-danger { color: #dc2626; }
.rez-vp-search { padding: 4px 24px 8px; }
.rez-vp-search input {
  width: 100%; padding: 10px 14px; border-radius: 999px;
  border: 1px solid #e2e8f0; background: #f8fafc;
  font: 500 14px Inter;
}
.rez-vp-search input:focus { outline: none; border-color: #8b5cf6; background: white; }

.rez-vp-district { padding: 0 24px 8px; }
.rez-vp-district-toggle {
  width: 100%; padding: 8px 12px; background: transparent;
  border: 1px solid #e2e8f0; border-radius: 12px;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font: 600 13px Inter; color: #475569;
}
.rez-vp-district-toggle:hover { background: #f8fafc; }
.rez-vp-district-summary {
  margin-left: auto; font: 600 12px Inter; color: #6d28d9;
  background: #ede9fe; padding: 2px 10px; border-radius: 999px;
}
.rez-vp-district-toggle svg { transition: transform .15s; }
.rez-vp-district-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.rez-vp-district-body {
  display: none; flex-wrap: wrap; gap: 6px;
  padding: 10px; margin-top: 6px;
  background: #f8fafc; border-radius: 12px;
  max-height: 140px; overflow-y: auto;
}
.rez-vp-district-body.open { display: flex; }

.rez-vp-list {
  flex: 1; overflow-y: auto;
  padding: 6px 24px 12px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 200px; max-height: 50vh;
}
.rez-vp-empty { padding: 40px 0; text-align: center; color: #94a3b8; font: 500 14px Inter; }
.rez-vp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
  transition: background .12s;
}
.rez-vp-item:hover { background: #f8fafc; }
.rez-vp-item.checked { background: #f5f3ff; }
.rez-vp-item input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; cursor: pointer;
  accent-color: #8b5cf6;
}
.rez-vp-item-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rez-vp-item-name { font: 600 13.5px Inter; color: #1e293b; }
.rez-vp-item-meta { display: flex; gap: 6px; flex-wrap: wrap; font: 500 11.5px Inter; color: #94a3b8; }
.rez-vp-sport-tag {
  font-size: 10.5px; padding: 1px 6px; border-radius: 4px;
  background: #f1f5f9; color: #475569; font-weight: 600;
}
.rez-vp-sport-tag.tenis      { background: #fef3c7; color: #92400e; }
.rez-vp-sport-tag.badminton  { background: #d1fae5; color: #065f46; }
.rez-vp-sport-tag.squash     { background: #dbeafe; color: #1e40af; }
.rez-vp-sport-tag.padel      { background: #ede9fe; color: #6d28d9; }
.rez-vp-sport-tag.pickleball { background: #fce7f3; color: #9d174d; }

/* ─── User-features row (chip rail s presety pod topbarem) ──── */
.rez-user-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0 2px;
  overflow-x: auto; scrollbar-width: none;
  flex-wrap: nowrap;
}
.rez-user-row::-webkit-scrollbar { display: none; }
.rez-user-row:empty { display: none; }

/* ─── Modal backdrop (auth picker, watcher sheet) ────────────── */
.rez-modal-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  animation: rezFadeIn .15s ease;
}
@keyframes rezFadeIn { from { opacity: 0 } to { opacity: 1 } }
.rez-modal {
  background: #fff; border-radius: 20px;
  max-width: 460px; width: 100%; max-height: 90vh; overflow: auto;
  box-shadow: 0 20px 60px rgba(15,23,42,0.25);
  display: flex; flex-direction: column;
}
.rez-modal-header { padding: 24px 24px 8px; }
.rez-modal-header h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.rez-modal-header p  { margin: 0; color: #64748b; font-size: 14px; }
.rez-modal-body { padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.rez-modal-footer { padding: 16px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.rez-modal-hint { padding: 0 24px 20px; font-size: 12.5px; color: #94a3b8; }

.rez-btn {
  border: 1px solid transparent; border-radius: 999px;
  padding: 10px 18px; font: 600 14px Inter, system-ui, sans-serif;
  cursor: pointer; transition: background .15s, border-color .15s, transform .1s;
}
.rez-btn:active { transform: scale(.97); }
.rez-btn.primary { background: #8b5cf6; color: white; }
.rez-btn.primary:hover { background: #7c3aed; }
.rez-btn.ghost { background: transparent; color: #1e293b; border-color: #e2e8f0; }
.rez-btn.ghost:hover { background: #f1f5f9; }
.rez-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Auth picker buttons ───────────────────────────────────── */
.rez-user-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 16px;
  background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 14px;
  cursor: pointer; transition: all .15s;
}
.rez-user-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.rez-user-btn.primary { background: #f5f3ff; border-color: #a78bfa; }
.rez-user-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #6d28d9);
  color: white; display: flex; align-items: center; justify-content: center;
  font: 700 16px Inter; flex-shrink: 0;
}
.rez-user-name { font: 600 16px Inter; color: #1e293b; }

/* ─── Favorite button ───────────────────────────────────────── */
.rez-fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.95);
  border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
  color: #94a3b8; font-size: 18px;
  z-index: 5;
}
.rez-fav-btn:hover { background: white; border-color: #cbd5e1; }
.rez-fav-btn.on { color: #f59e0b; background: #fffbeb; border-color: #fcd34d; }
.rez-fav-btn.on::before { content: "★"; }
.rez-fav-btn:not(.on)::before { content: "☆"; }

.rez-fav-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 999px;
  font: 600 13px Inter, system-ui; color: #64748b;
  cursor: pointer; transition: all .15s;
}
.rez-fav-pill:hover { border-color: #cbd5e1; color: #1e293b; }
.rez-fav-pill.active { background: #fffbeb; border-color: #fcd34d; color: #b45309; }
.rez-fav-pill .rez-star { font-size: 14px; color: #f59e0b; }

/* ─── Sort jako kompaktní dropdown v list-header vedle počtu ───── */
/* Vynucujeme aby list-header byl flex row: count vlevo, sort vpravo */
.list-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
}
.list-header .list-count { flex: 0 0 auto; }
.rez-sort-inline { position: relative; }
.rez-sort-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: transparent; border: 1px solid #e2e8f0;
  font: 600 12.5px Inter, system-ui; color: #475569;
  cursor: pointer; transition: all .12s;
}
.rez-sort-trigger:hover { background: #f8fafc; border-color: #cbd5e1; color: #1e293b; }
.rez-sort-trigger[aria-expanded="true"] { background: #ede9fe; border-color: #c4b5fd; color: #6d28d9; }
.rez-sort-lbl { color: #94a3b8; font-weight: 600; }
.rez-sort-val { font-weight: 700; }
.rez-sort-trigger svg { color: currentColor; flex-shrink: 0; }

.rez-sort-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  min-width: 180px; padding: 6px;
  background: white; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 8px 30px rgba(15,23,42,0.12);
  display: none; flex-direction: column; gap: 2px;
  z-index: 1600;
}
.rez-sort-menu.open { display: flex; animation: rezFadeIn .12s ease; }
.rez-sort-menu button {
  padding: 9px 12px; border-radius: 10px;
  background: transparent; border: none; text-align: left;
  font: 600 13.5px Inter; color: #1e293b;
  cursor: pointer; transition: background .12s;
}
.rez-sort-menu button:hover { background: #f8fafc; }
.rez-sort-menu button.active { background: #ede9fe; color: #6d28d9; }

/* ─── User-trigger styled as f-trig (Oblíbené, Vykreslit oblast) ─── */
.rez-fav-trig.active {
  background: #fffbeb !important;
  border-color: #fcd34d !important;
}
.rez-fav-trig.active .f-lbl { color: #f59e0b !important; opacity: 1 !important; }
.rez-fav-trig.active .f-val { color: #b45309 !important; }
.rez-poly-trig.active {
  background: #ede9fe !important;
  border-color: #c4b5fd !important;
}
.rez-poly-trig.active .f-val { color: #6d28d9 !important; }
.rez-poly-trig.drawing {
  background: #fef3c7 !important;
  border-color: #fcd34d !important;
}
.rez-poly-trig .rez-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(109,40,217,.18); margin-left: 4px;
  font-size: 12px; line-height: 1;
}

/* ─── Collapsible field-group ve Filtry sheetu ─────────────── */
.rez-collapsible {
  border-top: 1px solid #f1f5f9;
  padding-top: 8px !important;
}
.rez-collapsible-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 8px 0;
  background: none; border: none; cursor: pointer;
  font: inherit; text-align: left;
}
.rez-collapsible-trigger:hover { color: #6d28d9; }
.rez-collapsible-trigger .field-label { margin: 0; cursor: pointer; }
.rez-collapsible-summary {
  margin-left: auto; margin-right: 8px;
  font: 600 13px Inter; color: #6d28d9;
  background: #ede9fe; padding: 3px 10px; border-radius: 999px;
  max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rez-collapsible-chev {
  color: #94a3b8;
  transition: transform .15s ease;
}
.rez-collapsible-trigger[aria-expanded="true"] .rez-collapsible-chev {
  transform: rotate(180deg);
}
/* Force-skryjeme body, dokud trigger není expanded (přebíjíme .field-row {display:flex}) */
.rez-collapsible > .rez-collapsible-body { display: none !important; margin-top: 8px; }
.rez-collapsible > .rez-collapsible-trigger[aria-expanded="true"] + .rez-collapsible-body {
  display: flex !important; flex-wrap: wrap; gap: 8px;
  animation: rezFadeIn .15s ease;
}

/* ─── User avatar trigger v topbaru ───────────────────────── */
.rez-user-trigger { padding: 0 !important; }
.rez-user-avatar-mini {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #6d28d9);
  color: white; display: inline-flex; align-items: center; justify-content: center;
  font: 700 13px Inter, system-ui;
}

/* ─── Saved filters chip rail ───────────────────────────────── */
.rez-chip-rail {
  display: flex; gap: 8px; padding: 6px 0 2px;
  overflow-x: auto; scrollbar-width: none;
}
.rez-chip-rail::-webkit-scrollbar { display: none; }
/* Inline varianta — uvnitř .desktop-filters mezi ostatními pillami */
.rez-chip-rail-inline {
  padding: 0; gap: 6px;
  display: inline-flex; flex-wrap: wrap;
  align-items: center;
}
.rez-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; flex-shrink: 0;
  background: #f1f5f9; border: 1px solid transparent; border-radius: 999px;
  font: 600 12.5px Inter; color: #475569;
  cursor: pointer; transition: all .15s;
}
.rez-chip:hover { background: #e2e8f0; }
.rez-chip.active { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
.rez-chip-x {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.06); font-size: 14px; line-height: 1;
}
.rez-chip-x:hover { background: rgba(220,38,38,.15); color: #dc2626; }
.rez-chip-add { background: transparent; border: 1px dashed #cbd5e1; color: #64748b; }
.rez-chip-add:hover { border-color: #8b5cf6; color: #8b5cf6; background: #f5f3ff; }

/* ─── Polygon pill ──────────────────────────────────────────── */
.rez-poly-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 999px;
  font: 600 13px Inter; color: #64748b;
  cursor: pointer; transition: all .15s;
}
.rez-poly-pill:hover { border-color: #cbd5e1; color: #1e293b; }
.rez-poly-pill.active { background: #ede9fe; border-color: #c4b5fd; color: #6d28d9; }
.rez-poly-pill.drawing { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.rez-poly-pill .rez-x {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(109,40,217,.12); margin-left: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
}

/* ─── Watchers button + badge ───────────────────────────────── */
.rez-watchers-btn { position: relative; }
.rez-watchers-btn .rez-bell { font-size: 18px; }
.rez-watchers-btn .rez-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #dc2626; color: white;
  border-radius: 999px;
  font: 700 11px Inter, system-ui;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.rez-watchers-btn:not(.has-active) .rez-badge { display: none; }

/* ─── Watcher sheet form ───────────────────────────────────── */
.rez-form label {
  display: flex; flex-direction: column; gap: 6px;
  font: 600 12.5px Inter; color: #64748b;
}
.rez-form input, .rez-form select {
  padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px;
  font: 500 14px Inter; color: #1e293b; background: white;
}
.rez-form input:focus, .rez-form select:focus {
  outline: none; border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}
.rez-row { display: flex; gap: 10px; }
.rez-row label { flex: 1; }
.rez-form-hint { font: 500 12.5px Inter; color: #94a3b8; }
.rez-venue-pick ul {
  list-style: none; padding: 8px 12px; margin: 4px 0 0;
  background: #f8fafc; border-radius: 12px; max-height: 120px; overflow: auto;
  font: 500 12px Inter; color: #475569;
}
.rez-venue-pick li { padding: 2px 0; }
.rez-empty { padding: 30px 10px; text-align: center; color: #94a3b8; font: 500 14px Inter; }

/* ─── Watcher: presety quick-pick ─────────────────────────── */
.rez-watch-presets {
  padding: 10px 12px; background: #f5f3ff; border-radius: 12px;
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid #ede9fe;
}
.rez-watch-preset-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rez-watch-preset-chips .rez-chip.active {
  background: #8b5cf6; color: white; border-color: transparent;
}

/* ─── Watcher list items ───────────────────────────────────── */
.rez-watch-item {
  padding: 14px; background: #f8fafc; border-radius: 14px;
  display: flex; flex-direction: column; gap: 4px; position: relative;
}
.rez-watch-line { font: 500 14px Inter; color: #1e293b; }
.rez-watch-meta { font: 500 11.5px Inter; color: #94a3b8; }
.rez-muted { color: #94a3b8; }
.rez-watch-del { align-self: flex-end; margin-top: 6px; padding: 6px 12px; font-size: 12px; }

/* Quick "Pohlídat slot" button (inline na detail venue / kartě) */
.rez-watch-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: #ede9fe; color: #6d28d9; border: 1px solid #c4b5fd;
  border-radius: 999px; font: 600 12px Inter; cursor: pointer;
  transition: all .15s;
}
.rez-watch-cta:hover { background: #ddd6fe; }

/* ─── Add to Home Screen banner (iOS) ──────────────────────── */
.rez-a2hs {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1800;
  animation: rezSlideUp .25s ease;
}
@keyframes rezSlideUp { from { transform: translateY(20px); opacity: 0 } to { transform: none; opacity: 1 } }
.rez-a2hs-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: white; border-radius: 16px;
  box-shadow: 0 8px 30px rgba(15,23,42,.18);
  border: 1px solid #e2e8f0;
}
.rez-a2hs-icon { font-size: 28px; }
.rez-a2hs-text { flex: 1; font: 500 13px Inter; color: #1e293b; line-height: 1.4; }
.rez-a2hs-share {
  display: inline-flex; padding: 0 4px; background: #f1f5f9; border-radius: 4px;
  font-weight: 700;
}
.rez-a2hs-close {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: #f1f5f9; border: none; color: #64748b;
  font-size: 18px; cursor: pointer;
}
.rez-a2hs-close:hover { background: #e2e8f0; }

/* ─── Mobile tweaks ────────────────────────────────────────── */
@media (max-width: 480px) {
  .rez-modal { border-radius: 20px 20px 0 0; max-height: 95vh; align-self: flex-end; }
  .rez-modal-backdrop { align-items: flex-end; padding: 0; }
}
