/* NEXORA · Reseller API documentation. Scoped to .fx-rd and built on storefront tokens. */
.fx-account.fx-rd {
  --rd-panel: var(--fx-panel, #151518);
  --rd-tint: var(--fx-soft, #202024);
  --rd-line: var(--fx-line, #313036);
  --rd-ink: var(--fx-ink, #eeeaf0);
  --rd-muted: var(--fx-muted, #afabb6);
  --rd-accent: var(--fx-primary, #cfcbce);
  --rd-on-accent: var(--fx-on-primary, #151417);
  display: grid;
  gap: 18px;
  max-width: 1180px;
}

.fx-rd :where(h1, h2, h3, h4, p, ul, figure, dl) { margin: 0; }
.fx-rd :where(h1, h2, h3, h4) { color: var(--rd-ink); line-height: 1.3; }
.fx-rd :where(p, li, dd, small) { color: var(--rd-muted); }
.fx-rd code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; overflow-wrap: anywhere; }

.fx-rd-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid var(--rd-line);
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--rd-accent) 18%, transparent), transparent 55%),
    var(--rd-panel);
}
.fx-rd-hero__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fx-rd-hero__brand img { flex: none; width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--rd-line); border-radius: 12px; background: var(--fx-field, #101012); }
.fx-rd-hero__eyebrow { color: var(--rd-muted); font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.fx-rd-hero h1 { margin-top: 2px; font-size: clamp(1.55rem, 4vw, 2.15rem); }
.fx-rd-hero__sub { margin-top: 4px; font-size: .92rem; max-width: 62ch; }

.fx-rd-grid { display: grid; gap: 18px; min-width: 0; }
.fx-rd-side {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--rd-line);
  border-radius: 14px;
  background: var(--rd-panel);
}
.fx-rd-side__brand { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--rd-line); }
.fx-rd-side__brand img { flex: none; width: 38px; height: 38px; object-fit: contain; border-radius: 10px; border: 1px solid var(--rd-line); background: var(--fx-field, #101012); }
.fx-rd-side__brand strong { display: block; color: var(--rd-ink); font-size: .98rem; }
.fx-rd-side__brand small { display: block; color: var(--rd-muted); font-size: .76rem; }

.fx-rd-nav { display: grid; gap: 2px; margin-top: 10px; }
.fx-rd-nav__group { margin: 12px 0 4px; padding-inline: 10px; color: var(--rd-muted); font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.fx-rd-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border-inline-start: 3px solid transparent;
  border-radius: 8px;
  color: var(--rd-ink) !important;
  text-decoration: none;
  font-size: .92rem;
}
.fx-rd-nav__link .fx-rd-icon { color: var(--rd-muted); }
.fx-rd-nav__link:hover { background: var(--rd-tint); }
.fx-rd-nav__link.is-active { border-inline-start-color: var(--rd-accent); background: var(--rd-tint); font-weight: 700; }
.fx-rd-nav__link.is-active .fx-rd-icon { color: var(--rd-accent); }

.fx-rd-main { display: grid; gap: 18px; min-width: 0; }
.fx-rd-section { display: grid; gap: 12px; scroll-margin-top: calc(var(--fx-header-height, 88px) + 14px); }
.fx-rd-head { display: grid; gap: 4px; }
.fx-rd-head h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
.fx-rd-head p { font-size: .92rem; max-width: 70ch; }

.fx-rd-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: clamp(14px, 2.6vw, 20px);
  border: 1px solid var(--rd-line);
  border-radius: 14px;
  background: var(--rd-panel);
}
.fx-rd-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fx-rd-card__head h2 { font-size: 1.05rem; }

.fx-rd-field {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--rd-line);
  border-radius: 10px;
  background: var(--fx-field, #101012);
}
.fx-rd-field__label { color: var(--rd-muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fx-rd-field__value { color: var(--rd-ink); font-size: 1rem; overflow-wrap: anywhere; }
.fx-rd-field__value--money { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.45rem; font-weight: 700; }
.fx-rd-unit { color: var(--rd-muted); font-size: .85rem; font-weight: 500; }
.fx-rd-field__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }

.fx-rd-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.fx-rd-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--rd-line);
  border-radius: 99px;
  background: var(--rd-tint);
  color: var(--rd-ink);
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.fx-rd-chip--ok { border-color: color-mix(in srgb, var(--fx-positive, #98ddba) 55%, var(--rd-line)); color: var(--fx-positive, #98ddba); }
.fx-rd-chip--muted { color: var(--rd-muted); }

.fx-rd-keyrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fx-rd-keytag {
  flex: none;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--rd-accent);
  color: var(--rd-on-accent);
  font: 700 .8rem ui-monospace, monospace;
}
.fx-rd-key {
  flex: 1 1 220px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--rd-line);
  border-radius: 8px;
  background: var(--fx-field, #101012);
  color: var(--rd-ink);
  overflow-wrap: anywhere;
}
.fx-rd-key--full { user-select: all; }
.fx-rd-copy { display: inline-flex; align-items: center; gap: 6px; }

/* Full endpoint URL row with its own copy button (visible on every endpoint card). */
.fx-rd-url {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 10px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--rd-line);
  border-radius: 10px;
  background: var(--fx-field, #101012);
}
.fx-rd-url .fx-rd-method { grid-column: 1; grid-row: 1; }
.fx-rd-url .fx-rd-copy { grid-column: 2; grid-row: 1; flex: none; }
.fx-rd-url code {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  font: 500 .84rem ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--rd-ink);
  overflow-wrap: anywhere;
  word-break: break-all;
}
@media (min-width: 720px) {
  .fx-rd-url { grid-template-columns: auto 1fr auto; }
  .fx-rd-url .fx-rd-method { grid-column: 1; }
  .fx-rd-url code { grid-column: 2; grid-row: 1; }
  .fx-rd-url .fx-rd-copy { grid-column: 3; }
}

/* One-time key block: full-width key on its own line, big copy button below. */
.fx-rd-secret { display: grid; gap: 10px; min-width: 0; }
.fx-rd-secret .fx-rd-key--full {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font: 600 .95rem ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .01em;
  word-break: break-all;
}
.fx-rd-copy--big {
  justify-content: center;
  width: 100%;
  min-height: 46px;
  font-weight: 700;
}
@media (min-width: 640px) {
  .fx-rd-secret { grid-template-columns: 1fr auto; align-items: center; }
  .fx-rd-copy--big { width: auto; padding-inline: 20px; }
}

.fx-rd-ips {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 12px;
  border: 1px dashed var(--rd-line);
  border-radius: 10px;
  background: var(--rd-tint);
}
.fx-rd-ips[hidden] { display: none; }
.fx-rd-ips label { color: var(--rd-ink); font-size: .86rem; font-weight: 700; }
.fx-rd-ips textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--rd-line);
  border-radius: 8px;
  background: var(--fx-field, #101012);
  color: var(--rd-ink);
  font: .92rem/1.5 ui-monospace, monospace;
  resize: vertical;
}
.fx-rd-ips textarea:focus-visible { outline: 2px solid var(--rd-accent); outline-offset: 1px; }
.fx-rd-hint { color: var(--rd-muted); font-size: .8rem; }
.fx-rd-hint--warn { color: var(--fx-warn, #f3c98b); }
.fx-rd-feedback { min-height: 1.1em; color: var(--rd-muted); font-size: .82rem; }

.fx-rd-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fx-rd-inline { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; }
/* app.css forces #app a:not([style*="color"]){color:#e5e5e7}; links styled as buttons must keep their own foreground. */
#app .fx-rd a.fx-account__button { color: inherit; }
#app .fx-rd a.fx-account__button--primary { color: var(--fx-on-accent, #141416); }
#app .fx-rd a.fx-account__button--danger { color: var(--fx-danger); }

.fx-rd-note {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--rd-line);
  border-inline-start: 3px solid var(--rd-accent);
  border-radius: 10px;
  background: var(--rd-tint);
}
.fx-rd-note h3 { font-size: .95rem; }
.fx-rd-note--warn { border-inline-start-color: var(--fx-negative, #f0a9b4); }
.fx-rd-note--secret { border-inline-start-color: var(--fx-positive, #98ddba); }
.fx-rd-note--secret[hidden] { display: none; }

.fx-rd-list { display: grid; gap: 8px; padding-inline-start: 1.25rem; list-style: disc; }
.fx-rd-list li { font-size: .9rem; }

.fx-rd-endpoint { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fx-rd-method { flex: none; color: var(--fx-positive, #98ddba); font: 800 .8rem ui-monospace, monospace; }
.fx-rd-endpoint code { color: var(--rd-ink); font-size: .9rem; overflow-wrap: anywhere; }

.fx-rd-example { display: grid; gap: 6px; min-width: 0; }
.fx-rd-example figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: var(--rd-muted); font-size: .82rem; }
.fx-rd-example pre {
  min-width: 0;
  max-width: 100%;
  max-height: 24rem;
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre;
  border: 1px solid var(--rd-line);
  border-radius: 8px;
  background: var(--fx-field, #101012);
}
.fx-rd-example pre code { color: var(--rd-ink); font-size: .84rem; }
.fx-rd :is(summary, pre, a, button, textarea):focus-visible { outline: 2px solid var(--rd-accent); outline-offset: 2px; }

@media (min-width: 900px) {
  .fx-rd-grid { grid-template-columns: 264px minmax(0, 1fr); align-items: start; }
  .fx-rd-side { position: sticky; top: calc(var(--fx-header-height, 88px) + 14px); max-height: calc(100dvh - var(--fx-header-height, 88px) - 28px); overflow: auto; }
}

@media (max-width: 899.98px) {
  .fx-rd-hero { align-items: flex-start; }
  .fx-rd-side { padding: 10px; }
  .fx-rd-side__brand { padding-bottom: 8px; }
  .fx-rd-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .fx-rd-nav__group { display: none; }
  .fx-rd-nav__link { min-height: 40px; border-inline-start: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .fx-rd-nav__link.is-active { border-bottom-color: var(--rd-accent); }
  .fx-rd-field__value--money { font-size: 1.25rem; }
}
