/* ============================================================
   COMPONENTS
   Generated by scripts/migrate-css.php z index_2.html
   ============================================================ */

/* ------------------------------------------------------------
   PANELS — minimal, grid-aligned, SC style
   ------------------------------------------------------------ */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  position: relative;
}

.panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.panel-hd-title {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.panel-hd-title::before { content: '// '; color: var(--text-dim); }
.panel-hd-meta {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}
.panel-hd-step {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  color: var(--text-strong);
  background: var(--bg-inset);
  padding: 2px 6px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-bright);
}
.panel-bd { padding: 16px; }


/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--line-bright);
  color: var(--text);
  font-family: var(--f-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.btn:hover { border-color: var(--orange); color: var(--orange); }

.btn-primary {
  background: var(--green-cta);
  color: #0a0a0a;
  border-color: var(--green-cta);
}
.btn-primary:hover {
  background: var(--green-cta-hover);
  color: #0a0a0a;
  border-color: var(--green-cta-hover);
}

.btn-orange {
  background: var(--orange);
  color: var(--bg-base);
  border-color: var(--orange);
}
.btn-orange:hover {
  background: var(--orange-bright);
  border-color: var(--orange-bright);
}

.btn-ghost { background: transparent; }

.btn svg { width: 14px; height: 14px; }


/* ------------------------------------------------------------
   LEVELS (Low/Med/High/Extreme)
   ------------------------------------------------------------ */
.lvl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}
.lvl::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
}
.lvl[data-l="Low"] { color: var(--green-ok); border-color: rgba(123, 168, 32, 0.4); background: rgba(123, 168, 32, 0.08); }
.lvl[data-l="Medium"] { color: var(--yellow); border-color: rgba(212, 168, 42, 0.4); background: rgba(212, 168, 42, 0.08); }
.lvl[data-l="High"] { color: var(--orange); border-color: rgba(255, 106, 0, 0.4); background: rgba(255, 106, 0, 0.08); }
.lvl[data-l="Extreme"] { color: var(--red-warn); border-color: rgba(228, 58, 47, 0.45); background: rgba(228, 58, 47, 0.08); }


/* ------------------------------------------------------------
   FORM ELEMENTS
   ------------------------------------------------------------ */
.input, .select {
  background: var(--bg-panel);
  border: 1px solid var(--line-bright);
  color: var(--text-strong);
  padding: 9px 12px;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  outline: none;
  transition: border-color var(--t);
  width: 100%;
}
.input:focus, .select:focus { border-color: var(--orange); }

.select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23ff6a00' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  color: var(--orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.field-label::before { content: '// '; color: var(--text-dim); }


/* ------------------------------------------------------------
   FOOTER HEX CODES — decorative
   ------------------------------------------------------------ */
.hex-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  font-family: var(--f-mono);
  font-size: 0.625rem;
  color: var(--text-ghost);
  letter-spacing: 0.1em;
  flex-wrap: wrap;
  margin-top: 32px;
}
.hex-strip-code {
  opacity: 0.6;
  transition: opacity var(--t);
}
.hex-strip-code:hover { opacity: 1; color: var(--orange); }
.hex-strip-secure {
  margin-left: auto;
  padding: 2px 8px;
  background: repeating-linear-gradient(45deg, var(--red-deep) 0 4px, transparent 4px 7px);
  color: var(--text-mute);
  font-weight: 600;
}


/* ------------------------------------------------------------
   TABLES — compact, refinery-style
   ------------------------------------------------------------ */
.tbl-wrap {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  overflow: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.tbl thead th {
  background: var(--bg-raised);
  padding: 10px 12px;
  text-align: left;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-bright);
  position: sticky;
  top: 0;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.tbl thead th::before { content: '// '; color: var(--text-dim); }
.tbl thead th:hover { color: var(--orange-bright); }
.tbl thead th.sorted { color: var(--text-strong); }
.tbl thead th.sorted::after { content: attr(data-dir); margin-left: 6px; color: var(--orange); }
.tbl tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background var(--t);
  cursor: pointer;
}
.tbl tbody tr:hover { background: var(--orange-ghost); }
.tbl td {
  padding: 10px 12px;
  color: var(--text);
  vertical-align: middle;
}
.tbl td.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.tbl td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; }
.tbl td.dim { color: var(--text-mute); }
.ore-nm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-strong);
}
.ore-nm::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--orange);
}
.val-cell {
  font-family: var(--f-mono);
  font-weight: 600;
  color: var(--orange);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.val-cell.none { color: var(--text-dim); font-weight: 400; }


/* ------------------------------------------------------------
   FILTER BAR
   ------------------------------------------------------------ */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.search-in {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--line-bright);
  padding: 7px 12px;
  transition: border-color var(--t);
}
.search-in:focus-within { border-color: var(--orange); }
.search-in svg { width: 14px; height: 14px; color: var(--text-mute); margin-right: 8px; }
.search-in input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-strong);
  font-size: 0.8125rem;
  min-width: 0;
}
.filter-count {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}
.filter-count strong { color: var(--orange); font-weight: 600; }


/* ------------------------------------------------------------
   DETAIL DRAWER
   ------------------------------------------------------------ */
.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(480px, 100vw);
  background: var(--bg-panel);
  border-left: 3px solid var(--orange);
  padding: 22px 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--t-slow);
  z-index: 100;
  box-shadow: -16px 0 48px rgba(0,0,0,0.6);
}
.drawer.open { transform: translateX(0); }

.drawer-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.drawer-hd-meta {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  color: var(--orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.drawer-hd-meta::before { content: '// '; color: var(--text-dim); }
.drawer-hd h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin-top: 4px;
}
.drawer-close {
  background: transparent;
  border: 1px solid var(--line-bright);
  color: var(--text-mute);
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--t);
}
.drawer-close:hover { color: var(--red-warn); border-color: var(--red-warn); }
.drawer-close svg { width: 14px; height: 14px; }

.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 18px;
}
.kv {
  padding: 8px 12px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kv-lbl {
  font-family: var(--f-mono);
  font-size: 0.5625rem;
  color: var(--text-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kv-lbl::before { content: '// '; color: var(--text-ghost); }
.kv-val {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-strong);
}

.drawer-sect {
  margin-bottom: 16px;
}
.drawer-sect-title {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  color: var(--orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.drawer-sect-title::before { content: '// '; color: var(--text-dim); }

.rs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.rs-cell {
  padding: 7px 6px;
  text-align: center;
  background: var(--bg-deep);
  border: 1px solid var(--line);
}
.rs-cell-n {
  font-family: var(--f-mono);
  font-size: 0.5625rem;
  color: var(--orange);
  letter-spacing: 0.1em;
}
.rs-cell-v {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--bg-deep);
  border: 1px solid var(--line-bright);
  margin: 0 5px 5px 0;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--text);
  transition: all var(--t);
  cursor: pointer;
}
.loc-chip:hover { border-color: var(--orange); color: var(--orange); }
.loc-chip-sys {
  font-size: 0.5625rem;
  color: var(--orange);
  letter-spacing: 0.08em;
  padding-right: 6px;
  border-right: 1px solid var(--line);
  margin-right: 2px;
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   TOOLTIP — SC-themed, JS-rendered z core/tooltip.js.
   Pouziti: <span data-tt="text">Hover me</span>
   ------------------------------------------------------------ */
.tt {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: var(--bg-deep);
  color: var(--text-strong);
  border: 1px solid var(--orange-dim);
  padding: 6px 10px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  max-width: 320px;
  white-space: pre-line;       /* preserve \n line breaks z data-tt content */
  line-height: 1.5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 106, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: tt-in 120ms ease-out;
}
.tt[hidden] { display: none; }

/* "//" prefix — SC terminal aesthetic, jednotne s nav-label / config-title */
.tt::before {
  content: '// ';
  color: var(--orange);
  font-weight: 600;
}

/* Caret pointing toward anchor element */
.tt::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 5px solid transparent;
}
/* TOP placement = tooltip above element, caret DOWN */
.tt[data-placement="top"]::after {
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: var(--orange-dim);
  border-bottom: 0;
}
/* BOTTOM placement = tooltip below element, caret UP */
.tt[data-placement="bottom"]::after {
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: var(--orange-dim);
  border-top: 0;
}
/* RIGHT placement = tooltip RIGHT of element, caret LEFT (pointing toward icon) */
.tt[data-placement="right"]::after {
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: var(--orange-dim);
  border-left: 0;
}
/* LEFT placement (flipped from right when not enough space) — caret RIGHT */
.tt[data-placement="left"]::after {
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: var(--orange-dim);
  border-right: 0;
}

@keyframes tt-in {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .tt { animation: none; }
}

