/**
 * Northern Forge SOTA shell — shared modern surfaces for hub + tools
 * Load after nf-glass.css. Complements nf-editor.js + nf-nav.js.
 */
:root {
  --nf-sota-radius: 14px;
  --nf-sota-ease: cubic-bezier(.2, .8, .2, 1);
}

/* Inputs / selects — unified control chrome */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select {
  border-radius: 12px !important;
  border: 1px solid var(--line, #24314d) !important;
  background: linear-gradient(180deg, #0f1728, #0b1220) !important;
  color: var(--tx, #e8f1ff) !important;
  min-height: 44px;
  padding: 0.65rem 0.85rem !important;
  transition: border-color 0.15s var(--nf-sota-ease), box-shadow 0.15s var(--nf-sota-ease);
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: rgba(94, 240, 192, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(94, 240, 192, 0.12);
  outline: none;
}

/* Search wraps (catalog) */
.search-wrap,
.nf-search-wrap {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
}
.search-wrap .ico,
.nf-search-wrap .ico {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mut, #8aa0c0);
  pointer-events: none;
  font-size: 1rem;
}
.search-wrap input,
.nf-search-wrap input {
  width: 100%;
  padding-left: 2.35rem !important;
}

/* Explorer command bar */
.command-bar,
.nf-command-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 0.75rem 0;
  padding: 0.65rem;
  border-radius: 16px;
  border: 1px solid rgba(36, 49, 77, 0.95);
  background: rgba(10, 16, 28, 0.55);
  backdrop-filter: blur(10px);
}

.filter-chip,
.nf-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line, #24314d);
  background: rgba(13, 21, 38, 0.85);
  color: var(--mut, #8aa0c0);
  font: 600 12px/1.2 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.12s var(--nf-sota-ease), border-color 0.12s, color 0.12s, background 0.12s;
}
.filter-chip:hover,
.nf-filter-chip:hover {
  color: var(--tx, #e8f1ff);
  border-color: rgba(94, 184, 255, 0.35);
  transform: translateY(-1px);
}
.filter-chip.active,
.nf-filter-chip.active {
  color: var(--cyan, #5ef0c0);
  border-color: rgba(94, 240, 192, 0.4);
  background: rgba(94, 240, 192, 0.1);
}
.filter-chip .fc-count,
.nf-filter-chip .fc-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
}

/* Product cards polish */
.product-card,
.card.nf-glass {
  transition: transform 0.18s var(--nf-sota-ease), box-shadow 0.18s, border-color 0.18s;
}
.product-card:hover,
.card.nf-glass:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 184, 255, 0.28);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

/* Code / pre fallback when editor not applied */
pre,
code,
.nf-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
pre {
  background: #0a1220;
  border: 1px solid var(--line, #24314d);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
}

/* Buttons */
button.primary,
.btn-primary,
button.cta.primary {
  box-shadow: 0 6px 20px rgba(246, 183, 60, 0.22);
}
button,
.btn,
.link-btn {
  transition: transform 0.12s var(--nf-sota-ease), filter 0.12s, border-color 0.12s;
}
button:active,
.btn:active {
  transform: translateY(1px);
}

/* Page grid rhythm */
.explorer-shell {
  border-radius: 18px;
  border: 1px solid rgba(36, 49, 77, 0.9);
  background: linear-gradient(180deg, rgba(16, 24, 42, 0.55), rgba(8, 12, 22, 0.4));
  padding: 1rem 1rem 1.25rem;
}
.explorer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}
.explorer-title {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim, #5c7294);
}
.explorer-title b {
  color: var(--cyan, #5ef0c0);
  font-weight: 800;
}

/* Stats strip */
#nf-explorer-stats,
.nf-explorer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: var(--mut, #8aa0c0);
}
#nf-explorer-stats .stat b,
.nf-explorer-stats .stat b {
  color: var(--gold, #f6b73c);
  font-variant-numeric: tabular-nums;
}

/* View toggles */
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line, #24314d);
  border-radius: 11px;
  overflow: hidden;
  background: #0d1526;
}
.view-toggle button {
  min-height: 40px;
  min-width: 40px;
  border: 0;
  background: transparent;
  color: var(--mut, #8aa0c0);
  cursor: pointer;
}
.view-toggle button.active {
  background: rgba(94, 240, 192, 0.12);
  color: var(--cyan, #5ef0c0);
}

/* Pagination */
#nf-pager,
.nf-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 1.1rem;
}
.page-btn {
  min-height: 40px;
  min-width: 40px;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line, #24314d);
  background: #0d1526;
  color: var(--tx, #e8f1ff);
  cursor: pointer;
  font: 600 13px system-ui, sans-serif;
}
.page-btn.active,
.page-btn[aria-current='page'] {
  border-color: rgba(246, 183, 60, 0.45);
  color: var(--gold, #f6b73c);
  background: rgba(246, 183, 60, 0.1);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
