/**
 * Reseller documentation — editorial layout (readable column, rich cards)
 * with StixBNK portal tokens: Segoe/system UI, #2152ff, #e5e5e5 borders, 4px radius, #f8f9fa surfaces.
 * (Standalone: do not load assets/css/style.css here to avoid conflicting scales.)
 */

:root {
  --rd-primary: #2152ff;
  --rd-primary-dark: #a02bb8;
  --rd-hover-bg: #f0f0f0;
  --rd-hover-bg-soft: #f5f5f5;
  --rd-border: #e5e5e5;
  --rd-page-bg: #f8fafc;
  --rd-card: #ffffff;
  --rd-text: #333333;
  --rd-muted: #666666;
  --rd-soft: #999999;
  --rd-sidebar-bg: #f8f9fa;
  --rd-sidebar-w: 260px;
  --rd-topbar-h: 56px;
  --rd-code-bg: #0f172a;
  --rd-code-head: #1e293b;
  --rd-code-text: #e2e8f0;
  --rd-info-bg: #eff6ff;
  --rd-info-text: #1e40af;
  --rd-info-border: #3b82f6;
  --rd-radius: 4px;
  --rd-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
  --rd-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.reseller-docs,
.reseller-docs.doc-home-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--rd-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--rd-text);
  background: var(--rd-page-bg);
}

/* Body links: neutral (nav / TOC have their own rules) */
.reseller-docs .doc-main a,
.reseller-docs .doc-lead a,
.reseller-docs .doc-card-body a {
  color: var(--rd-text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(51, 51, 51, 0.35);
  text-underline-offset: 2px;
}
.reseller-docs .doc-main a:hover,
.reseller-docs .doc-lead a:hover,
.reseller-docs .doc-card-body a:hover {
  color: #111;
  text-decoration-color: #999;
  background-color: var(--rd-hover-bg-soft);
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.reseller-docs code {
  font-family: var(--rd-mono);
  font-size: 0.88em;
  background: var(--rd-sidebar-bg);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--rd-border);
  color: var(--rd-text);
}

/* ——— Top bar ——— */
.reseller-docs .doc-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--rd-topbar-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 24px 0 calc(var(--rd-sidebar-w) + 20px);
  background: var(--rd-card);
  border-bottom: 1px solid var(--rd-border);
  box-shadow: none;
  z-index: 100;
}

.reseller-docs .doc-topbar--home {
  padding-left: 24px;
  justify-content: space-between;
}

.reseller-docs.doc-home-body .doc-topbar--home {
  padding-left: calc(var(--rd-sidebar-w) + 20px);
}

.reseller-docs .doc-search {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
}

.reseller-docs .doc-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f8f9fa
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E")
    10px center no-repeat;
}

.reseller-docs .doc-search input:focus {
  border-color: #ccc;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04);
}

.reseller-docs .doc-search input::placeholder {
  color: var(--rd-soft);
}

.reseller-docs .doc-topbar-link {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #dddddd;
  border-radius: 6px;
  color: var(--rd-muted);
}
.reseller-docs .doc-topbar-link:hover {
  color: var(--rd-text);
  border-color: #ccc;
  background: var(--rd-hover-bg-soft);
  text-decoration: none;
}

/* ——— Sidebar ——— */
.reseller-docs .doc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rd-sidebar-w);
  height: 100vh;
  padding: var(--rd-topbar-h) 0 32px;
  background: var(--rd-sidebar-bg);
  border-right: 1px solid var(--rd-border);
  overflow-y: auto;
  z-index: 90;
}

.reseller-docs .doc-brand {
  padding: 16px 18px 18px;
  border-bottom: 1px solid var(--rd-border);
  margin-bottom: 8px;
}

.reseller-docs .doc-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--rd-radius);
  background: linear-gradient(135deg, var(--rd-primary) 0%, var(--rd-primary-dark) 100%);
  border: 1px solid rgba(160, 43, 184, 0.35);
  margin-bottom: 10px;
  box-shadow: none;
}

/* Wordmark: assets/img/logo-black.png (paths differ per HTML location) */
.reseller-docs .doc-brand-home {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  margin-bottom: 10px;
}

.reseller-docs .doc-brand-home:focus-visible {
  outline: 2px solid var(--rd-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

.reseller-docs .doc-brand-logo {
  display: block;
  height: 32px;
  width: auto;
  object-fit: contain;
}

.reseller-docs .doc-brand-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--rd-text);
}

.reseller-docs .doc-brand-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--rd-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.reseller-docs .doc-nav-section {
  margin-top: 18px;
}

.reseller-docs .doc-nav-label {
  padding: 8px 18px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--rd-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reseller-docs .doc-nav a {
  display: block;
  padding: 10px 18px;
  margin: 0 8px;
  border-radius: var(--rd-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--rd-muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.reseller-docs .doc-nav a:hover {
  background: var(--rd-hover-bg);
  color: var(--rd-text);
  text-decoration: none;
}

.reseller-docs .doc-nav a.is-active {
  background: #e8e8e8;
  color: #111;
  border-left-color: #64748b;
  font-weight: 600;
}

/* ——— Main shell (guide): centered article ——— */
.reseller-docs .doc-main-wrap {
  margin-left: var(--rd-sidebar-w);
  margin-top: var(--rd-topbar-h);
  min-height: calc(100vh - var(--rd-topbar-h));
  padding: 36px 40px 48px;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

.reseller-docs .doc-main {
  width: 100%;
  max-width: 720px;
  flex: 0 1 720px;
}

/* ——— Home main ——— */
.reseller-docs .doc-home-main {
  margin-left: var(--rd-sidebar-w);
  margin-top: var(--rd-topbar-h);
  padding: 36px 40px 56px;
  min-height: calc(100vh - var(--rd-topbar-h));
  max-width: calc(100vw - var(--rd-sidebar-w));
  box-sizing: border-box;
}

/* ——— Typography ——— */
.reseller-docs .reseller-docs-page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #111;
  margin: 0 0 12px;
}

.reseller-docs .doc-lead {
  font-size: 15px;
  color: var(--rd-muted);
  margin: 0 0 28px;
  line-height: 1.55;
  max-width: 42em;
}

.reseller-docs .doc-section-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--rd-text);
  margin: 40px 0 14px;
  padding-top: 28px;
  padding-left: 14px;
  border-top: 1px solid var(--rd-border);
  border-left: 3px solid #d1d5db;
  scroll-margin-top: calc(var(--rd-topbar-h) + 12px);
}

.reseller-docs .doc-section-heading:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  padding-left: 14px;
}

.reseller-docs .doc-main h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--rd-text);
  margin: 22px 0 8px;
}

.reseller-docs .doc-main p,
.reseller-docs .doc-main ul,
.reseller-docs .doc-main ol {
  margin: 0 0 14px;
  color: var(--rd-text);
}

.reseller-docs .doc-main ul,
.reseller-docs .doc-main ol {
  padding-left: 1.35rem;
}

.reseller-docs .doc-main li {
  margin-bottom: 6px;
}

/* ——— Callout (portal-style info strip) ——— */
.reseller-docs .rd-callout {
  padding: 14px 16px;
  margin: 16px 0 20px;
  background: var(--rd-info-bg);
  border: 1px solid var(--rd-border);
  border-left: 4px solid var(--rd-info-border);
  border-radius: var(--rd-radius);
  font-size: 14px;
  color: var(--rd-info-text);
  line-height: 1.5;
}

.reseller-docs .rd-callout strong {
  color: var(--rd-info-text);
}

.reseller-docs .rd-callout a {
  color: var(--rd-info-text);
  font-weight: 600;
}

/* ——— Steps ——— */
.reseller-docs .doc-steps {
  list-style: none;
  padding: 0;
  margin: 16px 0 28px;
  counter-reset: rdstep;
}

.reseller-docs .doc-steps li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
  counter-increment: rdstep;
}

.reseller-docs .doc-steps li::before {
  content: counter(rdstep);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rd-hover-bg-soft);
  border: 2px solid #d1d5db;
  color: var(--rd-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ——— Tables (portal data-table look) ——— */
.reseller-docs .rd-table-wrap {
  margin: 16px 0 24px;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  overflow: hidden;
  background: var(--rd-card);
}

.reseller-docs table.rd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.reseller-docs .rd-table th,
.reseller-docs .rd-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rd-border);
  vertical-align: top;
}

.reseller-docs .rd-table thead th {
  background: var(--rd-sidebar-bg);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rd-muted);
}

.reseller-docs .rd-table tbody tr:last-child td {
  border-bottom: none;
}

.reseller-docs .rd-table tbody tr:hover {
  background: #fafafa;
}

/* ——— Code panels (structured like product docs; brand accent) ——— */
.reseller-docs .reseller-docs-code-panel {
  margin: 18px 0 28px;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  overflow: hidden;
  box-shadow: none;
  border-left: 3px solid #94a3b8;
}

.reseller-docs .reseller-docs-code-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--rd-code-head);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reseller-docs .reseller-docs-code-panel__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.reseller-docs .reseller-docs-code-panel pre {
  margin: 0;
  padding: 18px 16px;
  font-family: var(--rd-mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--rd-code-text);
  background: var(--rd-code-bg);
  overflow-x: auto;
}

.reseller-docs .reseller-docs-code-panel pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ——— Buttons (match portal .btn-secondary) ——— */
.reseller-docs .rd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--rd-radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  border: 1px solid transparent;
}

.reseller-docs .rd-btn--secondary {
  background: var(--rd-card);
  border-color: var(--rd-border);
  color: var(--rd-text);
}

.reseller-docs .rd-btn--secondary:hover {
  background: var(--rd-hover-bg);
  border-color: #d1d5db;
  color: #111;
}

.reseller-docs .code-copy.is-done {
  border-color: #10b981 !important;
  color: #065f46 !important;
}

/* ——— Home cards ——— */
.reseller-docs .doc-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 40px 0 16px;
}

.reseller-docs .doc-section-title:first-of-type {
  margin-top: 0;
}

.reseller-docs .doc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.reseller-docs a.doc-card {
  display: flex;
  flex-direction: column;
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: none;
}

.reseller-docs a.doc-card:hover {
  border-color: #d1d5db;
  box-shadow: none;
  text-decoration: none;
}

.reseller-docs .doc-card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: linear-gradient(180deg, #f3f4f6 0%, var(--rd-sidebar-bg) 100%);
  border-bottom: 1px solid var(--rd-border);
  position: relative;
}

.reseller-docs .doc-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--rd-radius);
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.reseller-docs .doc-card-icon svg {
  width: 28px;
  height: 28px;
  stroke: #64748b;
  fill: none;
  stroke-width: 1.8;
}

.reseller-docs .doc-card-body {
  padding: 18px 20px 22px;
}

.reseller-docs .doc-card-body h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--rd-text);
  margin: 0 0 8px;
}

.reseller-docs .doc-card-body p {
  font-size: 13px;
  color: var(--rd-muted);
  line-height: 1.5;
  margin: 0;
}

/* ——— Responsive ——— */
@media (max-width: 768px) {
  .reseller-docs .doc-sidebar {
    transform: translateX(-100%);
  }
  .reseller-docs .doc-topbar,
  .reseller-docs.doc-home-body .doc-topbar--home {
    padding-left: 20px;
  }
  .reseller-docs .doc-main-wrap,
  .reseller-docs .doc-home-main {
    margin-left: 0;
    max-width: 100%;
    padding: 24px 18px 40px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
