/*!
 * Impression Connect SDK - documentation styles
 * Layers on top of the Impression Smart Studio site stylesheet (assets/css/site.css).
 */

:root {
  --doc-code-bg: #08192b;
  --doc-code-line: rgba(255, 255, 255, .1);
  --doc-sidebar: 244px;
}

/* ==========================================================================
   Section navigation bar
   ========================================================================== */

.docs-bar {
  position: sticky;
  z-index: 40;
  top: 75px;
  color: #fff;
  background: #0d2439;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.docs-bar-inner {
  min-height: 54px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

.docs-bar-title {
  margin: 0;
  padding-right: 20px;
  color: rgba(255, 255, 255, .5);
  border-right: 1px solid rgba(255, 255, 255, .14);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.docs-bar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}

.docs-bar-nav a {
  padding: 16px 0;
  color: rgba(255, 255, 255, .66);
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 650;
  transition: .2s;
}

.docs-bar-nav a:hover {
  color: #fff;
}

.docs-bar-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--cyan);
}

/* ==========================================================================
   Documentation hero
   ========================================================================== */

.docs-hero {
  position: relative;
  padding: 62px 0 58px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #071526, #0b3153);
}

.docs-hero .grid-bg {
  opacity: .1;
}

.docs-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.docs-hero h1 {
  margin: 0;
  font: 500 clamp(36px, 4.6vw, 52px)/1.03 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
}

.docs-hero .lede {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: 18px;
}

/* ==========================================================================
   Two-column layout
   ========================================================================== */

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--doc-sidebar);
  gap: 62px;
  align-items: start;
  padding: 54px 0 92px;
}

.docs-article {
  min-width: 0;
}

/* --- On this page --------------------------------------------------------- */

.docs-toc {
  position: sticky;
  top: 152px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.docs-toc summary {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

.docs-toc summary::-webkit-details-marker {
  display: none;
}

.docs-toc summary::after {
  float: right;
  content: "\2013";
  font-size: 14px;
}

.docs-toc details:not([open]) > summary {
  margin-bottom: 0;
}

.docs-toc details:not([open]) > summary::after {
  content: "+";
}

.docs-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-toc ul ul {
  margin: 4px 0 8px 12px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

/* Scoped to the list so these never outrank .docs-toc-top on specificity. */
.docs-toc-list a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  transition: color .15s;
}

.docs-toc-list ul a {
  font-size: 12.5px;
}

.docs-toc-list a:hover {
  color: var(--blue);
}

.docs-toc-list a.active {
  color: var(--blue);
  font-weight: 700;
}

.docs-toc-top {
  display: inline-block;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.docs-toc-top:hover {
  color: var(--blue);
}

/* ==========================================================================
   Article typography
   ========================================================================== */

.docs-article > .doc-section + .doc-section {
  margin-top: 68px;
  padding-top: 60px;
  border-top: 1px solid var(--line);
}

.doc-section > h2 {
  margin: 0 0 6px;
  font: 500 clamp(28px, 3.2vw, 38px)/1.12 Georgia, "Times New Roman", serif;
  letter-spacing: -.03em;
  scroll-margin-top: 150px;
}

.doc-section .lede-dark {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.doc-subsection {
  margin: 52px 0 14px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.015em;
  scroll-margin-top: 150px;
}

.docs-article p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.docs-article ul,
.docs-article ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.7;
}

.docs-article li {
  margin-bottom: 8px;
}

.docs-article li > ul,
.docs-article li > ol {
  margin-top: 8px;
}

.docs-article a:not(.button):not(.anchor):not(.sdk-card) {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(22, 117, 242, .35);
  text-underline-offset: 3px;
}

.docs-article a:not(.button):not(.anchor):not(.sdk-card):hover {
  text-decoration-color: currentColor;
}

.docs-article code {
  padding: 2px 6px;
  color: #0d426f;
  background: #e8eff7;
  border-radius: 5px;
  font: 600 .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: break-word;
}

.docs-article blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: #eef3f9;
  border-left: 3px solid var(--sky);
  border-radius: 0 10px 10px 0;
  overflow-wrap: break-word;
}

.docs-article blockquote a {
  font: 600 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.docs-article .text-primary {
  color: var(--blue);
  font-weight: 700;
}

/* ==========================================================================
   Method entries
   ========================================================================== */

.method-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 52px 0 12px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 150px;
}

.doc-section > .method-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.method-name {
  color: var(--ink);
  font: 700 22px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -.02em;
}

.method-kind {
  padding: 3px 9px;
  color: #0d6cd8;
  background: #e3edfa;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.method-kind.post {
  color: #7a4a06;
  background: #fbeed4;
}

.anchor {
  opacity: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  transition: opacity .15s;
}

.method-title:hover .anchor,
.anchor:focus {
  opacity: 1;
}

.spec-label {
  margin: 26px 0 8px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.spec-label + p {
  margin-top: 0;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
  margin: 0 0 18px;
  overflow-x: auto;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.spec-table td,
.spec-table th {
  padding: 11px 16px 11px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
  text-align: left;
  vertical-align: top;
}

.spec-table td:first-child {
  width: 1%;
  min-width: 150px;
  color: var(--ink);
  white-space: nowrap;
}

.spec-table td:first-child code {
  padding: 0;
  background: none;
}

.spec-table ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

/* "(identifier, required)" type hints that precede each description. */
.spec-table small {
  color: #33506c;
  font-size: 13px;
  font-weight: 700;
}

.spec-table small em {
  font-style: normal;
}

.spec-table.bordered {
  border: 1px solid var(--line);
}

.spec-table.bordered th {
  color: var(--ink);
  background: #eaf0f7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.spec-table.bordered th,
.spec-table.bordered td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  white-space: normal;
}

.spec-table.bordered td:first-child {
  width: auto;
  min-width: 0;
}

.talk-field-table {
  margin-left: 0;
  margin-right: 0;
}

/* ==========================================================================
   Code blocks
   ========================================================================== */

.code-block {
  position: relative;
  margin: 0 0 20px;
  overflow: hidden;
  background: var(--doc-code-bg);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(5, 25, 46, .14);
}

.code-block pre {
  margin: 0;
  padding: 16px 20px;
  overflow-x: auto;
  color: #d7e6f5;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  tab-size: 2;
}

.code-block pre + pre {
  padding-top: 0;
}

.code-block pre[data-request] {
  padding: 14px 20px;
  background: rgba(101, 214, 218, .07);
  border-bottom: 1px solid var(--doc-code-line);
}

.code-block pre[data-request] + pre {
  padding-top: 16px;
}

.code-block pre[data-request] code {
  color: var(--cyan);
  font-weight: 700;
}

.code-block code {
  padding: 0;
  color: inherit;
  background: none;
  border-radius: 0;
  font: inherit;
  white-space: pre;
}

.copy-button {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 6px 11px;
  color: rgba(255, 255, 255, .68);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  opacity: 0;
  transition: .15s;
}

.code-block:hover .copy-button,
.copy-button:focus-visible {
  opacity: 1;
}

.copy-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .16);
}

.copy-button[data-copied] {
  color: var(--navy);
  background: var(--cyan);
  border-color: var(--cyan);
  opacity: 1;
}

/* ==========================================================================
   Notes and example labels
   ========================================================================== */

/* Note bodies are sometimes bare text and sometimes <p>/<ul>, so the colour
   and size live on the container and are inherited by either shape. */
.doc-note {
  margin: 0 0 20px;
  padding: 16px 20px;
  color: #33506c;
  background: #eef4fb;
  border-left: 3px solid var(--sky);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  line-height: 1.65;
}

.doc-note > :last-child {
  margin-bottom: 0;
}

.doc-note p,
.doc-note li {
  color: inherit;
  font-size: inherit;
}

.doc-note-warning {
  color: #6d4d10;
  background: #fdf5e6;
  border-left-color: #e2a53a;
}

.doc-note-danger {
  color: #7c2b28;
  background: #fdeeee;
  border-left-color: #d9534f;
}

.example-note {
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.example-note p {
  margin: 0;
  font-size: inherit;
}

/* ==========================================================================
   SDK index cards
   ========================================================================== */

.sdk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

@media (max-width: 640px) {
  .sdk-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sdk-card {
  display: block;
  padding: 30px 28px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: .2s;
}

.sdk-card:hover {
  transform: translateY(-3px);
  border-color: rgba(22, 117, 242, .4);
  box-shadow: 0 20px 44px rgba(5, 25, 46, .1);
}

.sdk-card small {
  display: block;
  margin-bottom: 12px;
  color: #0d6cd8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sdk-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.sdk-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.sdk-card b {
  display: inline-block;
  margin-top: 16px;
  color: var(--blue);
  font-size: 14px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  :root {
    --doc-sidebar: 210px;
  }

  .docs-layout {
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .docs-bar {
    position: static;
  }

  .docs-bar-inner {
    padding: 12px 0;
  }

  .docs-bar-title {
    width: 100%;
    padding: 0 0 4px;
    border-right: 0;
  }

  /* Own row, and free to wrap its own links on narrow phones. */
  .docs-bar-nav {
    width: 100%;
    min-width: 0;
    gap: 4px 18px;
  }

  .docs-bar-nav a {
    padding: 6px 0;
  }

  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 32px;
  }

  .docs-toc {
    position: static;
    order: -1;
    max-height: none;
    margin-bottom: 34px;
    padding: 0;
    border-left: 0;
  }

  .docs-toc-panel {
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  .docs-toc summary {
    color: var(--ink);
  }

  .docs-toc-top {
    display: none;
  }
}

@media print {
  .site-header,
  .docs-bar,
  .docs-toc,
  .site-footer,
  .copy-button,
  .skip-link {
    display: none !important;
  }

  .docs-hero {
    color: #000;
    background: none;
  }

  .code-block {
    background: #f4f6f9;
    box-shadow: none;
  }

  .code-block pre {
    color: #10243a;
  }
}
