/* ztrClient.py documentation page (views/docs/ztrclient.ejs) */

.docs-sidebar {
  border-right: 1px solid #343a40;
  padding: 0;
}

.docs-sidebar-inner {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 2rem 1.25rem;
}

.docs-sidebar-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.docs-sidebar-sub {
  color: #8d949c;
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
}

.docs-toc {
  display: flex;
  flex-direction: column;
}

.docs-toc-group {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin: 1.25rem 0 0.4rem;
}

.docs-toc-group:first-child {
  margin-top: 0;
}

.docs-toc-link {
  color: #adb5bd;
  text-decoration: none;
  font-size: 0.86rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.3rem;
  border-left: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.docs-toc-link:hover {
  color: #fff;
  background: #16181b;
}

.docs-toc-link.active {
  color: #0dcaf0;
  border-left-color: #0dcaf0;
  background: color-mix(in srgb, #0dcaf0 10%, transparent);
}

.docs-toc-sub {
  padding-left: 1.25rem;
  font-size: 0.8rem;
}

.docs-back-link {
  display: block;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #8d949c;
  text-decoration: none;
}

.docs-back-link:hover {
  color: #fff;
}

.docs-content {
  padding: 2.5rem 2.5rem 6rem;
  max-width: 900px;
}

.docs-section {
  padding-top: 1.5rem;
  margin-top: -1.5rem;
  scroll-margin-top: 1.5rem;
  margin-bottom: 3rem;
}

.docs-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: #0dcaf0;
  font-weight: 600;
}

.docs-lead {
  color: #adb5bd;
  font-size: 1.05rem;
  max-width: 640px;
}

.docs-class-title {
  color: #e9ecef;
  margin-top: 2rem;
}

.docs-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.docs-mini-card {
  flex: 1 1 220px;
  border: 1px solid #343a40;
  border-radius: 0.6rem;
  background: #0d0f11;
  padding: 1.1rem;
}

.docs-mini-card-title {
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.docs-mini-card p {
  color: #8d949c;
  font-size: 0.86rem;
  margin: 0;
}

.docs-steps li {
  margin-bottom: 0.5rem;
  color: #adb5bd;
}

.docs-note {
  border-left: 3px solid #0dcaf0;
  background: color-mix(in srgb, #0dcaf0 8%, #0d0f11);
  padding: 0.9rem 1.1rem;
  border-radius: 0 0.4rem 0.4rem 0;
  font-size: 0.9rem;
  color: #adb5bd;
  margin-top: 1rem;
}

.docs-field-table code,
.docs-param-list code {
  color: #f78166;
}

.docs-field-table {
  margin-top: 1rem;
}

.docs-param-list {
  color: #adb5bd;
}

.docs-param-list li {
  margin-bottom: 0.4rem;
}

.docs-returns {
  color: #8d949c;
  font-size: 0.86rem;
}

.docs-raises {
  color: #8d949c;
  font-size: 0.86rem;
}

.api-card {
  border: 1px solid #343a40;
  border-radius: 0.6rem;
  padding: 1.25rem;
  margin-top: 1.5rem;
  background: #0d0f11;
}

.api-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.api-sig {
  color: #e9ecef;
  font-size: 0.95rem;
}

.docs-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #343a40;
  color: #adb5bd;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  white-space: nowrap;
}

.docs-mt {
  margin-top: 1.25rem;
}

.docs-faq dt {
  color: #e9ecef;
  font-weight: 600;
  margin-top: 1.25rem;
}

.docs-faq dt:first-child {
  margin-top: 0;
}

.docs-faq dd {
  color: #8d949c;
  margin-left: 0;
  margin-top: 0.25rem;
}

/* Code blocks — overrides the site-wide `pre { white-space: pre-wrap;
   word-break: break-all; }` in style.css, which is wrong for code samples. */
.docs-content pre {
  position: relative;
  background: #0a0c0e;
  border: 1px solid #21262d;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  white-space: pre;
  word-break: normal;
}

.docs-content pre code {
  background: transparent;
  font-size: 0.85rem;
}

.docs-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  background: #21262d;
  color: #adb5bd;
  border: 1px solid #30363d;
  border-radius: 0.3rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.docs-content pre:hover .docs-copy-btn,
.docs-copy-btn:focus-visible {
  opacity: 1;
}

.docs-copy-btn:hover {
  color: #fff;
}

/* App screenshots: a window-style frame, a caption, and a lightbox on click. */
.docs-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 1.75rem;
}

.docs-shot {
  margin: 0;
  background: #0d1014;
  border: 1px solid #21262d;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.docs-shot:hover {
  border-color: #3b434c;
  transform: translateY(-2px);
}

.docs-shot.wide {
  grid-column: 1 / -1;
}

.docs-shot-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: #161b22;
  border-bottom: 1px solid #21262d;
}

.docs-shot-bar i {
  display: block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #30363d;
}

.docs-shot-bar span {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #8d949c;
}

.docs-shot a {
  display: block;
  cursor: zoom-in;
}

.docs-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.docs-shot figcaption {
  padding: 0.7rem 0.95rem 0.9rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #9aa1a9;
}

.docs-shot figcaption strong {
  display: block;
  margin-bottom: 0.15rem;
  color: #e9ecef;
}

.docs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 7, 9, 0.93);
}

.docs-lightbox.open {
  display: flex;
}

.docs-lightbox img {
  max-width: min(1400px, 96vw);
  max-height: 78vh;
  border-radius: 0.6rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.docs-lightbox-cap {
  max-width: 900px;
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  color: #c9d1d9;
}

.docs-lightbox-cap strong {
  color: #fff;
}

.docs-lightbox button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.4rem;
  line-height: 1;
  color: #c9d1d9;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 50%;
  cursor: pointer;
}

.docs-lightbox button:hover,
.docs-lightbox button:focus-visible {
  color: #fff;
  border-color: #0dcaf0;
}

.docs-lightbox .lb-close {
  top: 1rem;
  right: 1rem;
}

.docs-lightbox .lb-prev {
  left: 1rem;
  top: 50%;
}

.docs-lightbox .lb-next {
  right: 1rem;
  top: 50%;
}

@media (max-width: 767.98px) {
  .docs-shots {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-shot {
    transition: none;
  }

  .docs-shot:hover {
    transform: none;
  }
}

@media (max-width: 991.98px) {
  .docs-sidebar-inner {
    position: static;
    max-height: none;
    padding: 1.5rem;
  }

  .docs-content {
    padding: 2rem 1.25rem 4rem;
  }
}
