/* ============================================================
   LightBridge — Documentation Page Styles
   ============================================================ */

/* ---------- Docs Layout ---------- */
.docs-layout {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
  padding-top: 72px;
}

/* ---------- Sidebar ---------- */
.docs-sidebar {
  position: fixed;
  top: 72px;
  left: 0;
  width: 260px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  padding: 32px 24px;
  border-right: 1px solid var(--stroke);
  background: var(--sidebar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 200, 232, 0.15) transparent;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: rgba(0, 200, 232, 0.15); border-radius: 2px; }

.sidebar-section {
  margin-bottom: 28px;
}

.sidebar-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin: 0 0 10px;
  padding: 0;
}

.sidebar-link {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}

.sidebar-link:hover {
  color: var(--text-1);
  background: rgba(0, 200, 232, 0.04);
}

.sidebar-link.active {
  color: var(--cyan);
  background: rgba(0, 200, 232, 0.06);
  border-left-color: var(--cyan);
}

/* Mobile sidebar toggle */
.docs-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--surface-raised);
  border: 1px solid var(--stroke-hover);
  border-radius: 100px;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 24px var(--shadow-color);
  transition: all 0.2s;
}

.docs-sidebar-toggle:hover {
  border-color: var(--cyan);
  box-shadow: 0 4px 24px rgba(0, 200, 232, 0.15);
}

/* ---------- Main Content ---------- */
.docs-content {
  margin-left: 260px;
  flex: 1;
  max-width: 820px;
  padding: 48px 56px 120px;
  margin-right: auto;
  margin-left: calc(260px + ((100vw - 260px - 820px) / 2));
}

/* ---------- Typography ---------- */
.docs-page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text-1);
  margin: 0 0 20px;
  line-height: 1.15;
}

.docs-lead {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 0 32px;
}

.docs-section {
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--stroke);
}

.docs-section:last-child {
  border-bottom: none;
}

.docs-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 12px;
  scroll-margin-top: 96px;
}

.docs-section h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-1);
  margin: 28px 0 8px;
}

.docs-section p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0 0 16px;
}

.docs-section a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s;
}

.docs-section a:hover {
  color: var(--text-1);
}

.docs-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.docs-section ul li {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  padding: 6px 0 6px 20px;
  position: relative;
}

.docs-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}

.docs-section code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--cyan);
  background: rgba(0, 200, 232, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ---------- Callout ---------- */
.docs-callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(0, 200, 232, 0.04);
  border: 1px solid rgba(0, 200, 232, 0.15);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.docs-callout strong {
  color: var(--text-1);
}

.docs-callout a {
  color: var(--cyan);
  text-decoration: none;
}

.docs-callout a:hover {
  color: var(--text-1);
}

.docs-callout-icon {
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 1px;
}

.docs-callout-warn {
  background: rgba(234, 179, 8, 0.04);
  border-color: rgba(234, 179, 8, 0.2);
}

.docs-callout-warn .docs-callout-icon {
  color: #eab308;
}

/* ---------- Code Block ---------- */
.docs-code {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.docs-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--stroke);
  background: var(--code-header-bg);
}

.docs-code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.docs-code-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: none;
  border: 1px solid var(--stroke);
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.docs-code-copy:hover {
  color: var(--cyan);
  border-color: var(--stroke-hover);
}

.docs-code-body {
  padding: 20px 16px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  color: var(--text-2);
}

.docs-code-body code {
  font-family: inherit;
  background: none;
  padding: 0;
  color: inherit;
}

/* ---------- Endpoint Badge ---------- */
.docs-endpoint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 24px;
}

.docs-endpoint code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-1);
  background: none;
  padding: 0;
}

.docs-method {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
}

.docs-method-post {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.docs-method-get {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

/* ---------- Table ---------- */
.docs-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}

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

.docs-table th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--stroke);
}

.docs-table td {
  color: var(--text-2);
  padding: 12px 16px;
  border-bottom: 1px solid var(--stroke);
  vertical-align: top;
}

.docs-table td code {
  font-size: 13px;
}

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

/* ---------- Tip Wallet List ---------- */
.tip-wallet-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.tip-wallet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.tip-wallet-item:hover {
  border-color: var(--stroke-hover);
}

.tip-wallet-addr {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  background: none !important;
  padding: 0 !important;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.tip-wallet-copy {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s;
}

.tip-wallet-copy:hover {
  color: var(--cyan);
  border-color: var(--stroke-hover);
  background: rgba(0, 200, 232, 0.04);
}

.tip-wallet-copy.copied {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.06);
}

@media (max-width: 640px) {
  .tip-wallet-addr {
    font-size: 11.5px;
  }
}

/* ---------- Placeholder ---------- */
.docs-placeholder {
  border: 1px dashed rgba(136, 71, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  background: rgba(136, 71, 255, 0.03);
}

.docs-placeholder-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  background: rgba(136, 71, 255, 0.1);
  border: 1px solid rgba(136, 71, 255, 0.2);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.docs-placeholder p {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
  font-style: italic;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .docs-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    padding-top: 90px;
    z-index: 90;
    transition: left 0.3s var(--ease-out);
  }

  .docs-sidebar.open {
    left: 0;
  }

  .docs-sidebar-toggle {
    display: flex;
  }

  .docs-content {
    margin-left: 0;
    margin-right: auto;
    padding: 32px 20px 120px;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .docs-content {
    padding: 24px 16px 120px;
  }

  .docs-page-title {
    font-size: 1.8rem;
  }

  .docs-endpoint {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .docs-table {
    font-size: 13px;
  }

  .docs-table th,
  .docs-table td {
    padding: 8px 10px;
  }
}

/* ---------- Light Theme Docs Overrides ---------- */
html[data-theme="light"] .docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 100, 140, 0.15);
}

html[data-theme="light"] .docs-callout-warn {
  background: rgba(234, 179, 8, 0.06);
  border-color: rgba(200, 150, 0, 0.25);
}

html[data-theme="light"] .docs-placeholder {
  background: rgba(136, 71, 255, 0.04);
  border-color: rgba(117, 53, 240, 0.2);
}

html[data-theme="light"] .docs-sidebar,
html[data-theme="light"] .docs-content,
html[data-theme="light"] .docs-code {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
