/* Shared Flood Network nav — Classic Lab gets first-class exposure */

/* Reserve the nav's height before flood-nav.js injects it. The placeholder
   <div id="flood-nav"> is swapped via outerHTML on load; without a reserved
   height the page content jumps down by a full nav row when the script runs.
   The empty placeholder and the rendered nav share one min-height so the swap
   is shift-free (CLS = 0). */
#flood-nav,
.flood-nav {
  min-height: 46px;
}
@media (max-width: 640px) {
  #flood-nav,
  .flood-nav {
    min-height: 42px;
  }
}

.flood-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.55rem 1.25rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.85rem;
  background: linear-gradient(90deg, #070b16, #0c1326);
  border-bottom: 1px solid #22304f;
  color: #8497bd;
}
.flood-nav .brand {
  font-weight: 700;
  color: #eaf0fb;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-right: 0.15rem;
}
.flood-nav .brand .dot {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, #3ad6c5, #5b8cff);
  box-shadow: 0 0 14px rgba(58, 214, 197, 0.45);
}
.flood-nav a {
  color: #8497bd;
  text-decoration: none;
}
.flood-nav a:hover {
  color: #c7d2ec;
}
.flood-nav a.on {
  color: #eaf0fb;
  border-bottom: 2px solid #3ad6c5;
  padding-bottom: 2px;
}
.flood-nav a.classic {
  color: #04121a;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1, #2dd4bf);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border-bottom: none;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
}
.flood-nav a.classic.on {
  color: #04121a;
  border-bottom: none;
  outline: 2px solid rgba(45, 212, 191, 0.65);
  outline-offset: 2px;
}
/* ── Tab colour-coding ──────────────────────────────────────────────
   Money / merchandised apps = sharp colour chips (.mny).
   Free tools & labs = softer colour text (.lab).
   Per-tab accent set via the --c custom property on .n-<id>. */

/* Lab / tool tabs — colour-tinted text, accent underline when active */
.flood-nav a.lab {
  color: color-mix(in srgb, var(--c, #8497bd) 78%, #c7d2ec);
}
.flood-nav a.lab:hover {
  color: var(--c, #c7d2ec);
}
.flood-nav a.lab.on {
  color: #eaf0fb;
  border-bottom: 2px solid var(--c, #3ad6c5);
  padding-bottom: 2px;
}

/* Money / merchandised tabs — sharp colour chips */
.flood-nav a.mny {
  color: var(--c, #3ad6c5);
  font-weight: 600;
  padding: 0.26rem 0.66rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c, #3ad6c5) 55%, transparent);
  background: color-mix(in srgb, var(--c, #3ad6c5) 13%, transparent);
  border-bottom: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.flood-nav a.mny:hover {
  color: color-mix(in srgb, var(--c, #3ad6c5) 35%, #ffffff);
  background: color-mix(in srgb, var(--c, #3ad6c5) 24%, transparent);
  border-color: var(--c, #3ad6c5);
  box-shadow: 0 0 16px color-mix(in srgb, var(--c, #3ad6c5) 42%, transparent);
}
.flood-nav a.mny.on {
  color: #061018;
  background: var(--c, #3ad6c5);
  border-color: var(--c, #3ad6c5);
  border-bottom: none;
  box-shadow: 0 0 18px color-mix(in srgb, var(--c, #3ad6c5) 55%, transparent);
}

/* Per-tab accents */
.flood-nav a.n-console { --c: #8fb6ff; }   /* lab  · sky        */
.flood-nav a.n-shape   { --c: #c4b5fd; }   /* lab  · lilac      */
.flood-nav a.n-functor { --c: #7fe3d4; }   /* lab  · mint       */
.flood-nav a.n-monte   { --c: #9db4ff; }   /* lab  · periwinkle */
.flood-nav a.n-gpu     { --c: #2dd4bf; }   /* $    · teal       */
.flood-nav a.n-compute { --c: #f6b955; }   /* $    · amber      */
.flood-nav a.n-pods    { --c: #a78bfa; }   /* $    · violet     */
.flood-nav a.n-vps     { --c: #38bdf8; }   /* $    · cyan       */
.flood-nav a.n-market  { --c: #34d399; }   /* $    · emerald    */
.flood-nav a.n-plans   { --c: #f472b6; }   /* $    · magenta    */

.flood-nav .spacer {
  margin-left: auto;
}

.flood-nav a.n-index {
  --c: #d6b4fc;
}

/* P&L console link sits after the search box */
.flood-nav a.pnl {
  white-space: nowrap;
}

/* ── Site search ─────────────────────────────────────────────────── */
.flood-search {
  position: relative;
  margin-left: auto;
  flex: 0 1 240px;
  min-width: 150px;
}
.flood-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.34rem 0.7rem 0.34rem 1.85rem;
  font: inherit;
  font-size: 0.82rem;
  color: #eaf0fb;
  background: rgba(8, 13, 26, 0.85)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238497bd' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E")
    no-repeat 0.55rem center;
  border: 1px solid #2a3a5e;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.flood-search-input::placeholder {
  color: #6b7da3;
}
.flood-search-input:focus {
  border-color: #3ad6c5;
  box-shadow: 0 0 0 3px rgba(58, 214, 197, 0.18);
}
.flood-search-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 80;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  max-height: 60vh;
  overflow-y: auto;
  background: #0b1322;
  border: 1px solid #2a3a5e;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(2, 6, 18, 0.6);
}
.flood-search-list .head {
  padding: 0.3rem 0.6rem 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7da3;
}
.flood-search-list .empty {
  padding: 0.55rem 0.6rem;
  color: #8497bd;
  font-size: 0.82rem;
}
.flood-search-list li[role="option"] {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.42rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
}
.flood-search-list li[role="option"] .t {
  color: #eaf0fb;
  font-size: 0.85rem;
  font-weight: 500;
}
.flood-search-list li[role="option"] .g {
  color: #6b7da3;
  font-size: 0.68rem;
  white-space: nowrap;
}
.flood-search-list li[role="option"]:hover,
.flood-search-list li[role="option"].active {
  background: rgba(58, 214, 197, 0.14);
}
.flood-search-list li[role="option"].active .t {
  color: #fff;
}

@media (max-width: 640px) {
  .flood-search {
    flex: 0 0 180px;
    min-width: 140px;
    margin-left: 0.6rem;
  }
}

/* Phone widths: keep the nav one row tall as a horizontally-scrollable strip
   instead of wrapping into many rows. Desktop layout is untouched. */
@media (max-width: 640px) {
  .flood-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.6rem;
    padding: 0.5rem 0.85rem;
  }
  .flood-nav::-webkit-scrollbar {
    display: none;
  }
  .flood-nav > * {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .flood-nav .spacer {
    margin-left: 0.6rem;
  }
}
