/* ══════════════════════════════════════════════════════════════════════════
   discover.css — dve objavovacie lišty (Objav vľavo / Vybav vpravo).
   Desktop: kompaktné lišty „ikona + 1–2 slová", upratané podľa súvislostí
   (mapové vrstvy zvlášť od hodnotných stránok), s poľom Hľadať (obec/firma).
   Hover na položku → vysúvacia karta s detailom + pri platených „čo dostaneš".
   Mobil: dolný spúšťač + spodný panel. Vzhľad výhradne z tokenov ds.css.
   Nemodifikuje dashboard ani existujúce stránky — iba sa pripája.
   ════════════════════════════════════════════════════════════════════════ */

/* Komponent je NEZÁVISLÝ OD TÉMY stránky: vlastný scoped blok tokenov (tie isté
   hodnoty ako ds.css :root, riadky 22–30) — aby lišty fungovali aj na svetlých
   stránkach (napr. onboarding sluzba-spis.html), ktoré ds.css nenačítavajú. */
.dsc-rail, .dsc-fly, .dsc-launch, .dsc-scrim, .dsc-sheet, .dsc-light {
  --ds-bg: #0A0F1A; --ds-bg-2: #0E1626; --ds-nav: #0B1220;
  --ds-line: #1B2740; --ds-line-2: #25344F;
  --ds-tx: #E6ECF4; --ds-tx-2: #9DABBF; --ds-tx-3: #74839B;
  --ds-cyan: #4DE1C1; --ds-amber: #E8B84A; --ds-blue: #6AA6E8;
  --ds-hunt: #4DA65A; --ds-green: #6BCB77; --ds-violet: #B98CE8; --ds-orange: #E8623A;
  --ds-ink-on-cyan: #06231d;
}

/* ── kontajner lišty ─────────────────────────────────────────────────────── */
.dsc-rail {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 940;
  width: 186px; max-height: 90vh; display: flex; flex-direction: column;
  background: rgba(11, 18, 32, .84); backdrop-filter: blur(16px);
  border: 1px solid var(--ds-line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45); padding: 9px 8px;
  transition: width .2s cubic-bezier(.4, 0, .2, 1), transform .2s;
}
.dsc-rail.l { left: 12px; }
.dsc-rail.r { right: 12px; width: 176px; }

/* ── ZBALENÝ STAV = ikonový stĺpec (ikony vždy viditeľné = interaktívne) ─────
   Nabehnutie kurzora ho rozbalí na plné labely; klik na „pripnúť" (.pin) ho
   uzamkne otvorený. Minimálne prekrytie obsahu, no lišta je „živá" a pozývavá. */
.dsc-tab { display: none; }
.dsc-rail.min { width: 58px; padding: 9px 7px; }
.dsc-rail.r.min { width: 58px; }
.dsc-rail.min .dsc-lbl, .dsc-rail.min .dsc-dot, .dsc-rail.min .kick, .dsc-rail.min .dsc-min, .dsc-rail.min .dsc-search input { display: none; }
.dsc-rail.min .dsc-grp { height: 0; opacity: 0; padding: 4px 0 0; overflow: hidden; }
.dsc-rail.min .dsc-item { justify-content: center; padding: 6px 4px; }
.dsc-rail.min .dsc-ico { transition: transform .12s; }
.dsc-rail.min .dsc-item:hover .dsc-ico { transform: scale(1.08); }
.dsc-rail.min .dsc-hd { justify-content: center; padding: 0 0 7px; }
.dsc-rail.min .dsc-search { margin-bottom: 5px; }
.dsc-rail.min .dsc-search .mag { position: static; transform: none; display: block; text-align: center; width: 100%; font-size: 16px; padding: 6px 0; opacity: .75; }

/* rozbalenie: hover (peek) alebo pripnuté (.pin) */
.dsc-rail.min:hover, .dsc-rail.min.pin { width: 186px; padding: 9px 8px; }
.dsc-rail.r.min:hover, .dsc-rail.r.min.pin { width: 176px; }
.dsc-rail.min:hover .dsc-lbl, .dsc-rail.min.pin .dsc-lbl { display: block; }
.dsc-rail.min:hover .dsc-dot, .dsc-rail.min.pin .dsc-dot { display: inline; }
.dsc-rail.min:hover .kick, .dsc-rail.min.pin .kick { display: block; }
.dsc-rail.min:hover .dsc-min, .dsc-rail.min.pin .dsc-min { display: flex; }
.dsc-rail.min:hover .dsc-search input, .dsc-rail.min.pin .dsc-search input { display: block; }
.dsc-rail.min:hover .dsc-grp, .dsc-rail.min.pin .dsc-grp { height: auto; opacity: 1; padding: 9px 6px 3px; }
.dsc-rail.min:hover .dsc-item, .dsc-rail.min.pin .dsc-item { justify-content: flex-start; padding: 6px; }
.dsc-rail.r.min:hover .dsc-item, .dsc-rail.r.min.pin .dsc-item { justify-content: flex-end; }
.dsc-rail.min:hover .dsc-search .mag, .dsc-rail.min.pin .dsc-search .mag { position: absolute; transform: translateY(-50%); text-align: left; width: auto; padding: 0; display: block; }
.dsc-rail.min:hover .dsc-hd, .dsc-rail.min.pin .dsc-hd { justify-content: flex-start; padding: 2px 4px 8px; }
.dsc-rail.r.min:hover .dsc-hd, .dsc-rail.r.min.pin .dsc-hd { flex-direction: row-reverse; }

/* hlavička */
.dsc-hd { display: flex; align-items: center; gap: 6px; padding: 2px 4px 8px; border-bottom: 1px solid var(--ds-line); margin-bottom: 7px; }
.dsc-rail.r .dsc-hd { flex-direction: row-reverse; }
.dsc-hd .kick { flex: 1; font-size: 10.5px; text-transform: uppercase; letter-spacing: .11em; font-weight: 700; color: var(--ds-cyan); white-space: nowrap; }
.dsc-rail.r .dsc-hd .kick { text-align: right; }
.dsc-min { flex: none; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; border: 1px solid var(--ds-line-2);
  background: rgba(255, 255, 255, .04); color: var(--ds-tx-3); font-size: 13px; display: flex; align-items: center; justify-content: center; line-height: 1; }
.dsc-min:hover { color: var(--ds-tx); background: rgba(255, 255, 255, .09); }

/* ── pole Hľadať (len ľavá) ──────────────────────────────────────────────── */
.dsc-search { position: relative; margin-bottom: 8px; }
.dsc-search input {
  width: 100%; box-sizing: border-box; padding: 9px 11px 9px 30px; border-radius: 10px;
  border: 1px solid var(--ds-line-2); background: rgba(255, 255, 255, .04); color: var(--ds-tx);
  font-size: 12.5px; font-family: inherit; outline: none;
}
.dsc-search input::placeholder { color: var(--ds-tx-3); }
.dsc-search input:focus { border-color: rgba(77, 225, 193, .5); background: rgba(255, 255, 255, .06); }
.dsc-search .mag { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .7; pointer-events: none; }
.dsc-sres { position: absolute; left: 0; right: -70px; top: calc(100% + 5px); z-index: 3;
  background: var(--ds-bg-2); border: 1px solid var(--ds-line-2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5); display: none; }
.dsc-sres.open { display: block; }
.dsc-sres a { display: flex; align-items: center; gap: 8px; padding: 9px 11px; text-decoration: none; color: var(--ds-tx); font-size: 12.5px; }
.dsc-sres a:hover, .dsc-sres a.sel { background: rgba(255, 255, 255, .06); }
.dsc-sres .bdg { flex: none; font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }
.dsc-sres .bdg.obec { background: rgba(77, 225, 193, .14); color: var(--ds-cyan); }
.dsc-sres .bdg.firma { background: rgba(106, 166, 232, .16); color: var(--ds-blue); }
.dsc-sres .nm { min-width: 0; } .dsc-sres .nm b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsc-sres .nm i { display: block; font-style: normal; font-size: 11px; color: var(--ds-tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsc-sres .empty { padding: 11px; font-size: 12px; color: var(--ds-tx-3); }

/* ── zoznam + položky (ikona + 1–2 slová) ────────────────────────────────── */
.dsc-list { overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.dsc-list::-webkit-scrollbar { width: 5px; } .dsc-list::-webkit-scrollbar-thumb { background: var(--ds-line-2); border-radius: 6px; }
.dsc-grp { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ds-tx-3); padding: 9px 6px 3px; white-space: nowrap; }
.dsc-rail.r .dsc-grp { text-align: right; }

.dsc-item { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 11px; cursor: pointer; text-decoration: none; color: var(--ds-tx); border: 1px solid transparent; position: relative; }
.dsc-rail.r .dsc-item { flex-direction: row-reverse; text-align: right; }
.dsc-item:hover, .dsc-item:focus-visible { background: rgba(255, 255, 255, .06); border-color: var(--ds-line); outline: none; }
.dsc-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; background: rgba(255, 255, 255, .05); border: 1px solid var(--ds-line); }
.dsc-item[data-ac=cyan]   .dsc-ico { background: rgba(77, 225, 193, .14); border-color: rgba(77, 225, 193, .32); }
.dsc-item[data-ac=hunt]   .dsc-ico { background: rgba(77, 166, 90, .16);  border-color: rgba(77, 166, 90, .34); }
.dsc-item[data-ac=amber]  .dsc-ico { background: rgba(232, 184, 74, .14); border-color: rgba(232, 184, 74, .32); }
.dsc-item[data-ac=blue]   .dsc-ico { background: rgba(106, 166, 232, .14); border-color: rgba(106, 166, 232, .32); }
.dsc-item[data-ac=violet] .dsc-ico { background: rgba(185, 140, 232, .14); border-color: rgba(185, 140, 232, .32); }
.dsc-item[data-ac=green]  .dsc-ico { background: rgba(107, 203, 119, .14); border-color: rgba(107, 203, 119, .32); }
.dsc-item[data-ac=orange] .dsc-ico { background: rgba(232, 98, 58, .14);  border-color: rgba(232, 98, 58, .32); }
.dsc-lbl { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.dsc-lbl small { display: block; font-weight: 500; font-size: 10px; color: var(--ds-tx-3); margin-top: 1px; }
.dsc-dot { flex: none; font-size: 9px; }
.dsc-dot.free { color: var(--ds-cyan); } .dsc-dot.price { color: var(--ds-amber); } .dsc-dot.live { color: var(--ds-cyan); }

/* ── vysúvacia info karta (flyout) ───────────────────────────────────────── */
.dsc-fly { position: fixed; z-index: 960; width: 320px; max-width: calc(100vw - 90px);
  background: linear-gradient(180deg, var(--ds-bg-2), var(--ds-nav)); border: 1px solid var(--ds-line-2); border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55); padding: 16px; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .16s, transform .16s; }
.dsc-fly.on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.dsc-fly .fhd { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.dsc-fly .fico { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; flex: none; }
.dsc-fly h4 { font-size: 16px; font-weight: 700; color: var(--ds-tx); letter-spacing: -.01em; }
.dsc-fly .fone { font-size: 13px; color: var(--ds-tx-2); line-height: 1.5; margin-bottom: 12px; }
.dsc-fly ul { list-style: none; margin: 0 0 13px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.dsc-fly li { font-size: 12.5px; color: var(--ds-tx); line-height: 1.4; padding-left: 21px; position: relative; }
.dsc-fly li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ds-cyan); font-weight: 800; font-size: 12px; }
.dsc-cta { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 11px; border-radius: 12px; font-size: 13.5px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; }
.dsc-cta.prim { background: var(--ds-cyan); color: var(--ds-ink-on-cyan, #06231d); } .dsc-cta.prim:hover { background: #5FE9CB; }
.dsc-cta.ghost { background: rgba(255, 255, 255, .06); color: var(--ds-tx); border: 1px solid var(--ds-line-2); } .dsc-cta.ghost:hover { background: rgba(255, 255, 255, .11); }

/* platený náhľad */
.dsc-paid { margin: -2px 0 12px; border: 1px solid rgba(232, 184, 74, .32); border-radius: 13px; overflow: hidden; background: rgba(232, 184, 74, .06); }
.dsc-paid .rib { display: flex; align-items: center; gap: 7px; padding: 8px 11px; font-size: 11.5px; font-weight: 700; color: var(--ds-amber); background: rgba(232, 184, 74, .10); }
.dsc-shot { position: relative; display: block; cursor: zoom-in; margin: 0; }
.dsc-shot img { display: block; width: 100%; height: auto; border-top: 1px solid rgba(232, 184, 74, .22); }
.dsc-shot .zoom { position: absolute; right: 8px; bottom: 8px; background: rgba(7, 12, 21, .82); color: var(--ds-tx); font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--ds-line-2); }
.dsc-paid .cap { padding: 9px 11px; font-size: 11.5px; color: var(--ds-tx-3); line-height: 1.5; }

/* ── mobilný spúšťač + spodný panel (nezmenené — mobil funguje) ───────────── */
.dsc-launch { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 950; display: none; gap: 8px;
  background: rgba(11, 18, 32, .9); backdrop-filter: blur(14px); border: 1px solid var(--ds-line-2); border-radius: 999px; padding: 6px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
.dsc-launch button { display: flex; align-items: center; gap: 7px; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; font-size: 13.5px; font-weight: 800; letter-spacing: -.01em; transition: background .14s, transform .12s, box-shadow .14s; }
.dsc-launch button:hover { transform: translateY(-1px); } .dsc-launch button .e { font-size: 16px; }
.dsc-launch button[data-open="objav"] { background: rgba(77, 225, 193, .18); color: var(--ds-cyan); border-color: rgba(77, 225, 193, .5); }
.dsc-launch button[data-open="objav"]:hover { background: rgba(77, 225, 193, .3); box-shadow: 0 0 0 3px rgba(77, 225, 193, .14); }
.dsc-launch button[data-open="vybav"] { background: rgba(232, 184, 74, .18); color: var(--ds-amber); border-color: rgba(232, 184, 74, .5); }
.dsc-launch button[data-open="vybav"]:hover { background: rgba(232, 184, 74, .3); box-shadow: 0 0 0 3px rgba(232, 184, 74, .14); }
/* jemné upútanie po načítaní (3×, potom prestane) */
.dsc-launch { animation: dsc-launch-glow 2.4s ease-in-out 1.2s 3; }
@keyframes dsc-launch-glow { 0%, 100% { box-shadow: 0 14px 40px rgba(0, 0, 0, .5); } 50% { box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 0 0 5px rgba(77, 225, 193, .22); } }
.dsc-scrim { position: fixed; inset: 0; z-index: 970; background: rgba(4, 8, 15, .5); opacity: 0; pointer-events: none; transition: opacity .22s; }
.dsc-scrim.on { opacity: 1; pointer-events: auto; }
/* DESKTOP: bočný rozbaľovací panel (drawer) sprava — neprekrýva celú obrazovku */
.dsc-sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 971; width: min(440px, 94vw); overflow-y: auto;
  background: linear-gradient(180deg, var(--ds-bg-2), var(--ds-nav)); border-left: 1px solid var(--ds-line-2);
  box-shadow: -22px 0 60px rgba(0, 0, 0, .55); padding: 20px 18px 26px; transform: translateX(103%); transition: transform .28s cubic-bezier(.4, 0, .2, 1); }
.dsc-sheet.on { transform: translateX(0); }
.dsc-sheet .grab { display: none; }
.dsc-shbar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: flex-end; margin: -20px -18px 6px; padding: 10px 14px 6px; background: linear-gradient(180deg, var(--ds-bg-2) 62%, rgba(14, 22, 38, 0)); }
.dsc-close { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--ds-line-2); background: rgba(255, 255, 255, .05); color: var(--ds-tx-2); font-size: 20px; line-height: 1; cursor: pointer; }
.dsc-close:hover { color: var(--ds-tx); background: rgba(255, 255, 255, .1); }
.dsc-sheet .shd { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--ds-cyan); margin-bottom: 3px; }
.dsc-sheet .slead { font-size: 13px; color: var(--ds-tx-2); margin-bottom: 14px; line-height: 1.5; }
.dsc-acc { border: 1px solid var(--ds-line); border-radius: 14px; margin-bottom: 9px; overflow: hidden; background: rgba(255, 255, 255, .02); }
.dsc-acc > summary { display: flex; align-items: center; gap: 12px; padding: 12px; cursor: pointer; list-style: none; }
.dsc-acc > summary::-webkit-details-marker { display: none; }
.dsc-acc .aico { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex: none; background: rgba(255, 255, 255, .05); border: 1px solid var(--ds-line); }
.dsc-acc .atx { flex: 1; min-width: 0; } .dsc-acc .atx b { display: block; font-size: 14px; font-weight: 650; } .dsc-acc .atx span { display: block; font-size: 12px; color: var(--ds-tx-3); }
.dsc-acc .amet { font-size: 11.5px; font-weight: 700; } .dsc-acc .chev { color: var(--ds-tx-3); transition: transform .2s; } .dsc-acc[open] .chev { transform: rotate(90deg); }
.dsc-acc .abody { padding: 0 13px 14px; }
.dsc-acc[data-ac=cyan] .aico { background: rgba(77, 225, 193, .14); border-color: rgba(77, 225, 193, .32); }
.dsc-acc[data-ac=hunt] .aico { background: rgba(77, 166, 90, .16); border-color: rgba(77, 166, 90, .34); }
.dsc-acc[data-ac=amber] .aico { background: rgba(232, 184, 74, .14); border-color: rgba(232, 184, 74, .32); }
.dsc-acc[data-ac=blue] .aico { background: rgba(106, 166, 232, .14); border-color: rgba(106, 166, 232, .32); }
.dsc-acc[data-ac=violet] .aico { background: rgba(185, 140, 232, .14); border-color: rgba(185, 140, 232, .32); }
.dsc-acc[data-ac=green] .aico { background: rgba(107, 203, 119, .14); border-color: rgba(107, 203, 119, .32); }
.dsc-acc[data-ac=orange] .aico { background: rgba(232, 98, 58, .14); border-color: rgba(232, 98, 58, .32); }

/* ── lightbox ────────────────────────────────────────────────────────────── */
.dsc-light { position: fixed; inset: 0; z-index: 990; background: rgba(4, 8, 15, .88); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s; cursor: zoom-out; }
.dsc-light.on { opacity: 1; pointer-events: auto; }
.dsc-light img { max-width: 96vw; max-height: 90vh; border-radius: 14px; border: 1px solid var(--ds-line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.dsc-light .cls { position: absolute; top: 18px; right: 22px; color: var(--ds-tx); font-size: 30px; line-height: 1; cursor: pointer; opacity: .8; }

/* ── responzíva ──────────────────────────────────────────────────────────── */
/* COMPACT (mapové / plno-plátnové stránky): žiadne ikonové lišty pri okrajoch —
   len spúšťač „Objav/Vybav" (za kartou), ktorý otvorí spodný panel. Nič neprekrýva mapu ani filtre. */
body.dsc-compact .dsc-rail { display: none !important; }
body.dsc-compact .dsc-launch { display: flex; }
body.dsc-compact .dsc-launch { bottom: 20px; }

@media (max-width: 1240px) { .dsc-rail.l:not(.min) { width: 172px; } .dsc-rail.r:not(.min) { width: 166px; } }
@media (max-width: 980px) {
  .dsc-rail, .dsc-fly { display: none !important; }
  .dsc-launch { display: flex; }
}
/* MOBIL: panel späť ako spodný sheet (drawer sprava je len pre PC) */
@media (max-width: 640px) {
  .dsc-sheet { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 84vh;
    border-left: 0; border-top: 1px solid var(--ds-line-2); border-radius: 22px 22px 0 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .55); padding: 8px 16px 26px; transform: translateY(102%); }
  .dsc-sheet.on { transform: translateY(0); }
  .dsc-sheet .grab { display: block; width: 42px; height: 4px; border-radius: 4px; background: var(--ds-line-2); margin: 8px auto 12px; }
  .dsc-shbar { display: none; }
  .dsc-launch { left: 50%; right: auto; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .dsc-rail, .dsc-fly, .dsc-sheet, .dsc-scrim, .dsc-light, .dsc-acc .chev { transition: none; } }
