/* Shoptet overlay: WAG → NetBird migration guide (see shoptet_netbird.go).
   Reuses the design tokens from style.css. */

/* ── operations view switch ───────────────────────────────── */
.nb-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
}
.nb-seg {
  display: inline-flex;
  background: var(--base-100);
  border: 1px solid var(--base-300);
  border-radius: 999px;
  padding: 3px;
  box-shadow: var(--shadow);
}
.nb-seg a {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--base-muted);
  text-decoration: none;
  white-space: nowrap;
}
.nb-seg a:hover { color: var(--base-content); }
.nb-seg a.active { background: var(--primary); color: var(--neutral-content); }
.nb-switch-note { font-size: 0.78rem; color: var(--base-muted); }

/* ── cards & text ─────────────────────────────────────────── */
.nb-card { min-width: 0; max-width: 100%; }
.nb-card .card-body { font-size: 0.88rem; line-height: 1.6; min-width: 0; }
.nb-platform, .nb-sub, .nb-faq, .nb-steps li, .nb-code { min-width: 0; max-width: 100%; }
.nb-card p + p { margin-top: 0.5rem; }
.nb-lead { color: var(--base-muted); margin-bottom: 0.6rem; }
.nb-small { display: block; font-size: 0.78rem; color: var(--base-muted); margin-top: 0.35rem; }
.nb-card a:not(.btn) { color: var(--primary); }
.nb-card code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--base-200);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  overflow-wrap: anywhere;
}
.nb-h { font-size: 0.9rem; margin: 1rem 0 0.4rem; }

/* ── 3-step overview ──────────────────────────────────────── */
.nb-quick {
  list-style: none;
  display: grid;
  /* 3 across on desktop, stacked once a tile would get cramped. */
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
}
.nb-quick li {
  min-width: 0;
  display: flex;
  gap: 0.65rem;
  background: var(--base-200);
  border-radius: var(--radius);
  padding: 0.8rem;
}
.nb-quick li > div { min-width: 0; }
.nb-quick p { font-size: 0.82rem; color: var(--base-muted); margin-top: 0.15rem; }
.nb-quick-n {
  flex-shrink: 0;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--neutral-content);
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ── server address row ───────────────────────────────────── */
.nb-server {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  background: var(--base-100);
}
.nb-server-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--base-muted);
}
.nb-server .nb-url { margin-top: 0; }
.nb-server .nb-url code { font-size: 1rem; }

/* ── server URL with copy button ──────────────────────────── */
.nb-url {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  margin-top: 0.3rem;
  max-width: 100%;
}
.nb-url code {
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--primary-content);
  color: var(--primary-hover);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  user-select: all;
  /* Breaks at the <wbr> after "https://" first, anywhere only as a last resort. */
  overflow-wrap: anywhere;
}

/* Copy buttons only appear when the clipboard API is usable (netbird.js). */
.nb-copy {
  display: none;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--base-300);
  background: var(--base-100);
  color: var(--base-content);
  cursor: pointer;
}
.nb-copy:hover { background: var(--base-200); }
.nb-copy.nb-copied { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.nb-js .nb-copy { display: inline-block; }

/* ── before-you-start checklist ───────────────────────────── */
.nb-checklist { list-style: none; margin-top: 1rem; display: grid; gap: 0.5rem; }
.nb-checklist li {
  border-left: 3px solid;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.55rem 0.8rem;
  font-size: 0.84rem;
}
.nb-checklist li::before { font-weight: 700; margin-right: 0.4rem; }
.nb-ok   { border-color: var(--success); background: var(--success-bg); }
.nb-ok::before   { content: "✓"; color: var(--success); }
.nb-warn { border-color: #f59e0b; background: #fffbeb; }
.nb-warn::before { content: "!"; color: #b45309; }
.nb-info { border-color: var(--primary); background: var(--primary-content); }
.nb-info::before { content: "i"; color: var(--primary); }

/* ── platform guides ──────────────────────────────────────── */
.nb-platform summary { font-size: 0.9rem; padding: 0.65rem 0.85rem; }
.nb-yours {
  display: none;
  margin-left: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--neutral-content);
  background: var(--success);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  vertical-align: middle;
}
.nb-detected { border-color: var(--success-border); }
.nb-detected .nb-yours { display: inline-block; }
.nb-pad { padding: 0.75rem 0.9rem; font-size: 0.86rem; }
.nb-pad > p + p, .nb-pad > .nb-code + p { margin-top: 0.6rem; }

.nb-steps {
  padding: 0.75rem 0.9rem 0.85rem 2.2rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.86rem;
}
.nb-steps li::marker { font-weight: 700; color: var(--primary); }
.nb-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.45rem; }
.nb-actions .btn { width: auto; text-decoration: none; }
/* style.css colours every .platform-guide link with --primary, which would
   turn button text invisible on the primary background. */
.nb-platform .btn-primary { color: var(--primary-content); }
.nb-platform .btn-ghost { color: var(--base-content); }
.nb-tip {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--base-muted);
}

.nb-sub {
  border: 1px solid var(--base-300);
  border-radius: calc(var(--radius) * 0.75);
  margin-top: 0.5rem;
}
.nb-sub summary {
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.nb-sub > :not(summary) { margin: 0 0.7rem 0.6rem; }

/* ── code blocks with copy button ─────────────────────────── */
.nb-code {
  margin-top: 0.4rem;
}
.nb-code pre {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.6;
  background: var(--neutral);
  color: #e5e7eb;
  border-radius: calc(var(--radius) * 0.75);
  padding: 0.65rem 0.8rem;
  overflow-x: auto;
  white-space: pre;
}
/* Copy sits above the block, never over text that scrolls underneath. */
.nb-js .nb-code .nb-copy { display: block; margin: 0 0 0.3rem auto; }

/* ── screenshots ──────────────────────────────────────────── */
.nb-shot { margin-top: 0.6rem; }
.nb-shot img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--base-300);
}
/* Caps go on the figure so the img keeps max-width: 100% on phones. */
.nb-shot-narrow { max-width: 260px; }
.nb-shot-medium { max-width: 420px; }
.nb-shot-phone { max-width: 240px; }

/* ── daily use / FAQ ──────────────────────────────────────── */
.nb-list { padding-left: 1.2rem; display: grid; gap: 0.55rem; }
.nb-faq {
  border-bottom: 1px solid var(--base-300);
  padding: 0.55rem 0;
}
.nb-faq:last-child { border-bottom: 0; }
.nb-faq summary { font-weight: 600; cursor: pointer; }
.nb-faq[open] summary { margin-bottom: 0.4rem; }
.nb-faq p { color: var(--base-content); }

.nb-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.nb-footer-actions .nb-small { margin: 0; }
.nb-footer-actions a { color: var(--primary); }
