/* TSSAI/WebUsersGuide/TSAIAgent/styles.css */
:root {
  /* ChatGPT koyu tema benzeri palet */
  --bg: #0a0d14;
  --panel: #101524;
  --text: #f0f4ff;
  --muted: #c0cbe2;
  --link: #18e1b9;
  --brand: #18e1b9;
  --border: #2A2B31;
  --shadow: 0 6px 18px rgba(0, 0, 0, .35);
  --sidebar-w: 280px;
  --topbar-h: 58px;
  --radius: 16px;
  --hero-max-width: 1200px;
  --hero-aspect-width: 1620;
  --hero-aspect-height: 677;
  --hero-intrinsic-width: 1620px;
  --hero-intrinsic-height: 677px;
}

body.doc-tsai {
  --hero-max-width: 836px;
  --hero-aspect-width: 836;
  --hero-aspect-height: 197;
  --hero-intrinsic-width: 836px;
  --hero-intrinsic-height: 197px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --panel: #ffffff;
    --text: #111827;
    --muted: #475467;
    --link: #0b7d5c;
    --brand: #0b7d5c;
    --border: #e6e8ef;
    --shadow: 0 6px 16px rgba(15, 23, 42, .08);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  padding-top: var(--topbar-h);
  scrollbar-gutter: stable both-edges;
}

body.sidebar-open,
body.lightbox-open {
  overflow: hidden;
}

.content a {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.content a:visited {
  color: var(--link);
}

.content a:hover {
  color: color-mix(in srgb, var(--link) 80%, #ffffff 20%);
}

.content a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.text-email {
  font-weight: 600;
  color: var(--link);
  word-break: break-all;
  cursor: pointer;
  user-select: all;
  letter-spacing: .01em;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 10px 18px;
  background: color-mix(in srgb, var(--bg) 60%, #222836 40%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand a {
  color: var(--text);
  text-decoration: none;
}

.brand__logo {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 2px 6px;
  border: 1px solid transparent;
  transition: border-color .15s ease, background .15s ease;
}

.brand__logo:hover,
.brand__logo:focus-visible {
  border-color: var(--border);
  background: rgba(255, 255, 255, .04);
}

.brand__logo img {
  display: block;
  height: 30px;
  width: auto;
  aspect-ratio: 836 / 156;
}

.brand__link {
  font-weight: 600;
}

.brand small {
  color: color-mix(in srgb, var(--text) 70%, var(--muted) 30%);
  font-weight: 500;
}

.toggle-btn {
  display: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.toggle-btn:focus-visible,
.toggle-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.wrap {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  padding: 18px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - var(--topbar-h));
}

.wrap>.side {
  flex: 0 0 clamp(220px, var(--sidebar-w), 100%);
  max-width: 100%;
}

.wrap>.content {
  flex: 1 1 0;
  min-width: 0;
}

.side {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px 14px;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - var(--topbar-h) - 32px);
  min-height: calc(100vh - var(--topbar-h) - 32px);
  overflow: hidden;
}

#top > nav#sidebar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sidebar-placeholder {
  visibility: hidden;
  width: var(--sidebar-w);
  min-height: calc(100vh - var(--topbar-h) - 32px);
  flex-shrink: 0;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  margin: 0 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.nav {
  overflow-y: auto;
  padding: 0 6px 12px;
  flex: 1;
}

.nav ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.nav li {
  margin: 4px 0;
}

.nav>ul>li {
  padding-left: 2px;
}

.nav a {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--text);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease;
}

.nav a:hover {
  background: rgba(77, 163, 255, .08);
  border-color: var(--border);
}

.nav a[aria-current="page"] {
  background: rgba(77, 163, 255, .12);
  border-color: var(--border);
}

.nav li.has-children {
  padding-right: 4px;
}

.nav-parent {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-parent>a {
  flex: 1;
}

.nav-toggle {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, .04);
}

.nav-toggle .chevron {
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 4px;
  transform: rotate(45deg);
  transition: transform .2s ease;
}

.nav li.expanded>.nav-parent .chevron {
  transform: rotate(225deg);
}

.nav li.has-children>ul {
  padding-left: 16px;
  margin-top: 6px;
}

.nav ul ul {
  display: none;
}

.nav li.expanded>ul {
  display: block;
}

.nav li ul li>a {
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  max-width: 100%;
  overflow-wrap: anywhere;
  min-height: calc(100vh - var(--topbar-h) - 28px);
}

.content h1 {
  margin-top: 0;
  font-size: 28px;
}

.content h2 {
  margin-top: 28px;
  border-top: 1px dashed var(--border);
  padding-top: 18px;
}

.content :is(h1, h2, h3)[id],
.doc-section {
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}

.content pre,
.content code {
  background: #0c1220;
  color: #dfe8ff;
  padding: .2em .4em;
  border-radius: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.content pre {
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note {
  border-left: 4px solid var(--brand);
  background: rgba(77, 163, 255, .08);
  padding: 12px 14px;
  border-radius: 8px;
  margin: 12px 0;
}

.note.warning {
  border-left-color: #d64545;
  background: rgba(214, 69, 69, .1);
}

/* Figure and image styles */
figure {
  margin: 18px 0;
}

figure img {
  width: 100%;
  max-width: 900px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  display: block;
}

figure figcaption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.hero-image {
  width: min(100%, var(--hero-max-width));
  aspect-ratio: var(--hero-aspect-width) / var(--hero-aspect-height);
  height: auto;
  display: block;
  contain-intrinsic-size: var(--hero-intrinsic-width) var(--hero-intrinsic-height);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.faq-accordion details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(77, 163, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
  overflow: hidden;
}

.faq-accordion summary {
  list-style: none;
  margin: 0;
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
}

.faq-accordion summary::-webkit-details-marker {
  display: none;
}

.faq-accordion summary::after {
  content: '';
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s ease, border-color .2s ease;
  flex-shrink: 0;
}

.faq-accordion details[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--brand);
}

.faq-body {
  border-top: 1px solid var(--border);
  padding: 18px 22px 22px;
  background: rgba(0, 0, 0, .12);
}

.table-wrapper {
  overflow-x: auto;
  margin: 10px 0 16px;
}

.faq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.faq-table th,
.faq-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.faq-table th {
  background: rgba(77, 163, 255, .12);
  color: var(--text);
  font-weight: 600;
}

.faq-table a {
  color: var(--link);
}

figure {
  margin: 18px 0;
}

figure img {
  width: 100%;
  max-width: 900px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  display: block;
}

figure figcaption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.hero-image {
  width: min(100%, var(--hero-max-width));
  aspect-ratio: var(--hero-aspect-width) / var(--hero-aspect-height);
  height: auto;
  display: block;
  contain-intrinsic-size: var(--hero-intrinsic-width) var(--hero-intrinsic-height);
}

.site-footer {
  margin: 24px auto 40px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  max-width: 1400px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.footer-brand img {
  opacity: .9;
  height: 28px;
  width: auto;
  aspect-ratio: 836 / 156;
  display: block;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
}

.pager-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease-in-out, background .15s ease;
  width: 100%;
  flex: 1;
}

.pager-card:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(171, 104, 255, .35) inset;
  background: rgba(171, 104, 255, .06);
}

.pager-card:active {
  transform: translateY(1px);
}

.pager-card small {
  color: var(--muted);
  font-weight: 700;
}

.pager-card span {
  font-weight: 700;
}

.pager .previous,
.pager .next {
  display: flex;
}

.pager-card.disabled {
  pointer-events: none;
  border-style: dashed;
  background: var(--panel);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 25;
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1180px) {
  .wrap {
    flex-direction: column;
  }

  .wrap>.side {
    flex: 1 1 auto;
    max-width: 100%;
  }

  .wrap>.content {
    flex-basis: 100%;
  }
}

@media (max-width: 980px) {
  .wrap {
    padding: 16px;
  }

  .toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .side {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(var(--topbar-h) + 12px);
    width: auto;
    min-height: auto;
    max-height: calc(100vh - var(--topbar-h) - 36px);
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .2s ease;
    z-index: 30;
  }

  body.sidebar-open .side {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-placeholder {
    display: none;
  }
}

@media (max-width:700px) {
  .topbar {
    padding: 8px 14px;
  }

  .wrap {
    padding: 14px 12px;
  }

  .content {
    padding: 20px;
  }

  .pager {
    gap: 12px;
  }

  .pager-card {
    padding: 12px 14px;
    font-size: 15px;
  }

  .pager-card span {
    font-size: 16px;
  }

  .pager-card small {
    font-size: 11px;
  }
}

@media (max-width:480px) {
  .pager {
    align-items: flex-start;
    gap: 10px;
  }

  .pager-card {
    width: auto;
    align-self: flex-start;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
  }

  .pager-card span {
    font-size: 15px;
  }

  .pager-card small {
    font-size: 10px;
    letter-spacing: .02em;
  }
}

.media.two-up {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.media.two-up>* {
  flex: 1 1 220px;
}

.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 100;
}

.page-loader.visible {
  opacity: 1;
  pointer-events: auto;
}

.page-loader .loader-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .25);
  border-top-color: var(--brand);
  animation: loader-spin 1s linear infinite;
}

@keyframes loader-spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

.time-to-done-sample {
  margin: 24px auto 28px;
  text-align: center;
  max-width: 360px;
}

.time-to-done-sample__trigger {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 80%, #121826 20%);
  padding: 12px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
  width: 100%;
}

.time-to-done-sample__trigger:hover,
.time-to-done-sample__trigger:focus-visible {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.time-to-done-sample__trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 70%, #ffffff 30%);
  outline-offset: 3px;
}

.time-to-done-sample__thumb {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

.time-to-done-sample__hint {
  font-size: 0.875rem;
  color: var(--muted);
}

.time-to-done-sample figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 2000;
}

.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox__img {
  max-width: min(1200px, 92vw);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
}

.image-lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  border: none;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease;
}

.image-lightbox__close:hover,
.image-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, .25);
}
