/* nyx-ulozit.css — dialog „Uložit do Nyxium Cloudu".
   Vypadá jako Uložit jako ve Windows: cesta nahoře, seznam složek uprostřed,
   název dole. Stojí na Fluent tokenech z explorer.css, ale všechny mají
   záložní hodnotu — volá ho i aplikace, která Fluent sadu nenačítá. */

.nyxul-stin {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .5);
  font: 400 14px/1.45 var(--fnt-ui, "Segoe UI", system-ui, sans-serif);
  color: var(--tx-1, #f2f2f2);
}

.nyxul {
  position: relative;
  display: flex; flex-direction: column;
  width: min(620px, 100%); max-height: min(560px, 100%);
  border: 1px solid var(--stroke-2, rgba(255, 255, 255, .12));
  border-radius: 10px;
  background: var(--sol-sec, #202020);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}

/* Dokud se s oknem nehne, centruje ho flex. První tažení ho přibodá. */
.nyxul.volne {
  position: absolute; margin: 0;
  max-width: none; max-height: none;
}
.nyxul-stin.tahne { user-select: none; }

/* ── minimalizace ─────────────────────────────────────── */

.nyxul.mini { height: auto !important; }
.nyxul.mini .nyxul-cesta,
.nyxul.mini .nyxul-seznam,
.nyxul.mini .nyxul-p { display: none; }
.nyxul.mini .nyxul-h { border-bottom: 0; }
/* Schované okno nesmí blokovat aplikaci pod sebou. */
.nyxul-stin.mini { background: none; pointer-events: none; align-items: flex-end; }
.nyxul-stin.mini .nyxul { pointer-events: auto; }

/* ── úchopy na velikost ───────────────────────────────── */

.nyxul-uchop { position: absolute; z-index: 3; touch-action: none; }
.u-n, .u-s { left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.u-n { top: -4px; }
.u-s { bottom: -4px; }
.u-e, .u-w { top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.u-e { right: -4px; }
.u-w { left: -4px; }
.u-nw, .u-ne, .u-sw, .u-se { width: 16px; height: 16px; }
.u-nw { left: -5px; top: -5px; cursor: nwse-resize; }
.u-ne { right: -5px; top: -5px; cursor: nesw-resize; }
.u-sw { left: -5px; bottom: -5px; cursor: nesw-resize; }
.u-se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.nyxul.mini .nyxul-uchop,
.nyxul.maxim .nyxul-uchop { display: none; }

.nyxul-h {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--stroke-1, rgba(255, 255, 255, .08));
  font-size: 14.5px; font-weight: 600;
  cursor: move; user-select: none; touch-action: none;
}
.nyxul-nadpis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nyxul-tlacitka { margin-left: auto; display: flex; gap: 2px; flex: 0 0 auto; cursor: default; }
.nyxul-h .nyxul-x {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 6px;
  background: none; color: inherit; font-size: 13px; cursor: pointer;
}
.nyxul-h .nyxul-zavrit { font-size: 16px; }
.nyxul-h .nyxul-x:hover { background: var(--ctrl-hover, rgba(255, 255, 255, .09)); }
.nyxul-h .nyxul-zavrit:hover { background: #c42b1c; color: #fff; }

/* ── cesta ──────────────────────────────────────────────────────────── */

.nyxul-cesta {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  padding: 8px 12px;
  border-bottom: 1px solid var(--stroke-1, rgba(255, 255, 255, .08));
  background: var(--sol-base, #1a1a1a);
}
.nyxul-cesta button {
  min-height: 30px; padding: 0 9px;
  border: 0; border-radius: 5px;
  background: none; color: inherit;
  font: inherit; font-size: 13px; cursor: pointer;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nyxul-cesta button:hover { background: var(--ctrl-hover, rgba(255, 255, 255, .09)); }
.nyxul-cesta span { opacity: .45; font-size: 12px; }

/* ── seznam ─────────────────────────────────────────────────────────── */

.nyxul-seznam {
  flex: 1 1 auto; min-height: 180px;
  overflow-y: auto; padding: 6px;
  background: var(--sol-base, #1a1a1a);
}
.nyxul-polozka {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 36px; padding: 0 10px;
  border: 0; border-radius: 6px;
  background: none; color: inherit;
  font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
.nyxul-polozka:hover { background: var(--ctrl-hover, rgba(255, 255, 255, .08)); }
.nyxul-polozka.je { background: var(--acc-deep, #0078d4); color: #fff; }
.nyxul-polozka .ik { flex: 0 0 18px; opacity: .85; }
.nyxul-polozka b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Soubory jsou vidět kvůli přehledu, ale nejdou vybrat jako cíl. */
.nyxul-soubor { opacity: .42; cursor: default; }
.nyxul-soubor:hover { background: none; }
.nyxul-prazdno { padding: 22px 12px; color: var(--tx-3, #9a9a9a); font-size: 13px; }

/* ── patka ──────────────────────────────────────────────────────────── */

.nyxul-p {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--stroke-1, rgba(255, 255, 255, .08));
}
.nyxul-p label { font-size: 12.5px; color: var(--tx-2, #ccc); flex: 0 0 auto; }
.nyxul-nazev {
  flex: 1 1 180px; min-width: 0; min-height: 36px; padding: 0 10px;
  border: 1px solid var(--stroke-2, rgba(255, 255, 255, .14));
  border-radius: 6px;
  background: var(--sol-base, #141414);
  color: inherit; font: inherit; font-size: 13.5px;
}
.nyxul-nazev:focus { outline: 2px solid var(--acc, #4cc2ff); outline-offset: -1px; }

.nyxul-tl {
  min-height: 36px; padding: 0 15px;
  border: 1px solid var(--stroke-2, rgba(255, 255, 255, .14));
  border-radius: 6px;
  background: var(--ctrl, rgba(255, 255, 255, .06));
  color: inherit; font: inherit; font-size: 13.5px; cursor: pointer;
}
.nyxul-tl:hover { background: var(--ctrl-hover, rgba(255, 255, 255, .1)); }
.nyxul-tl.hlavni { border-color: transparent; background: var(--acc-deep, #0078d4); color: #fff; font-weight: 600; }
.nyxul-tl.hlavni:hover { filter: brightness(1.1); }
.nyxul-tl:disabled { opacity: .5; cursor: default; }

.nyxul-chyba { flex: 1 1 100%; margin: 0; font-size: 12.5px; color: #ff8a8a; min-height: 16px; }

html[data-mode="light"] .nyxul-stin { color: #121626; }
html[data-mode="light"] .nyxul-soubor { opacity: .5; }

@media (max-width: 560px) {
  .nyxul-uchop { display: none; }
  .nyxul-h { cursor: default; }
}

@media (max-width: 520px) {
  .nyxul { max-height: 100%; }
  .nyxul-p { padding: 10px 12px; }
  .nyxul-p label { flex-basis: 100%; }
  .nyxul-tl { flex: 1 1 auto; }
}
