/*
 * Reading surface and header bar, every page of both products.
 *
 * Brought over from the parked Dexter theme, in the Kloudfuse palette and
 * type: quieter article furniture (headings, code blocks, notes, tabs, list
 * numbers, previous / next cards) and the restyled header bar. The page
 * chrome around the article (sidebar, contents list, version bar) is in
 * dexter-space.css; the dark versions are in dark-theme.css.
 */

/* ── Reading surface ──────────────────────────────────────────────── */

/* Headings without bars, a lead paragraph, bordered rounded code blocks and
   notes as tinted cards. */
body.article .body .doc .sect1 > h2 {
  border-top: 0;
  padding-top: 0;
}

body.article .body .doc .sect1 .sect2 > h3 {
  border-left: 0;
  padding-left: 0;
}

/* Title and section headings: spacing carries the structure, not rules. */
body.article .body .doc h1.page,
body.article .body .doc h1 {
  font-weight: 700;
  padding-bottom: 0;
  border-bottom: 0;
  margin-bottom: 14px;
}

body.article .body .doc .sect1 > h2 {
  font-weight: 650;
  padding-bottom: 0;
  border-bottom: 0;
  margin-top: 3rem;
}

/* The opening paragraph reads as the page's lead. */
body.article .body .doc #preamble > .sectionbody > .paragraph:first-child p {
  font-size: 1.08em;
  line-height: 1.6;
  color: #5b6472;
}

/* Code blocks: bordered and rounded on a near-white ground. */
body.article .body .doc .listingblock pre,
body.article .body .doc .literalblock pre {
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  background: #fbfbfd;
  box-shadow: none;
}

/* Notes: a rounded tinted card, with the label as a small heading inside it
   instead of a tab hanging off the corner. --adm is the type's color. */
body.article .body .doc .admonitionblock { --adm: 242, 80, 34; }
body.article .body .doc .admonitionblock.tip { --adm: 22, 163, 74; }
body.article .body .doc .admonitionblock.warning { --adm: 217, 119, 6; }
body.article .body .doc .admonitionblock.caution,
body.article .body .doc .admonitionblock.important { --adm: 220, 38, 38; }

body.article .body .doc .admonitionblock > table {
  border-collapse: separate;
  border-spacing: 0;
}

body.article .body .doc .admonitionblock td.content {
  border: 1px solid rgba(var(--adm), 0.25);
  border-radius: 12px;
  background: rgba(var(--adm), 0.045);
  padding: 40px 18px 14px;
}

body.article .body .doc .admonitionblock td.icon {
  top: 15px;
  left: 19px;
  transform: none;
}

body.article .body .doc .admonitionblock td.icon i {
  height: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  color: rgb(var(--adm));
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ── Heading anchors: a "#" in the margin on hover ────────────────── */

body.article .body .doc h2 .anchor::before,
body.article .body .doc h3 .anchor::before,
body.article .body .doc h4 .anchor::before {
  content: "#";
}

body.article .body .doc h2 .anchor,
body.article .body .doc h3 .anchor,
body.article .body .doc h4 .anchor {
  width: 1.2em;
  margin-left: -1.2em;
  font-size: 0.85em;
  font-weight: 500;
  color: #9aa1ad;
}

body.article .body .doc h2 .anchor:hover,
body.article .body .doc h3 .anchor:hover,
body.article .body .doc h4 .anchor:hover {
  color: var(--kf-accent, #F25022);
}

/* ── Code blocks: language label and copy button always in view ───── */

body.article .body .doc .listingblock .source-toolbox {
  visibility: visible;
  top: 8px;
  right: 10px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #8a90a0;
}

body.article .body .doc .source-toolbox > :not(:last-child)::after {
  content: none;
}

body.article .body .doc .source-toolbox .source-lang {
  letter-spacing: 0.06em;
}

body.article .body .doc .source-toolbox .copy-button {
  padding: 4px;
  border-radius: 6px;
  opacity: 0.75;
}

body.article .body .doc .source-toolbox .copy-button:hover {
  background: rgba(22, 27, 36, 0.06);
  opacity: 1;
}

/* Code: smaller and regular weight (styles.css bolds shell blocks and YAML
   keys). Long lines scroll sideways instead of wrapping: a wrapped command
   breaks mid-token, which reads as two commands. */
body.article .body .doc .listingblock pre,
body.article .body .doc .literalblock pre,
body.article .body .doc .listingblock pre > code,
body.article .body .doc .listingblock pre.highlightjs > code,
body.article .body .doc .listingblock pre.highlight > code {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  color: #161b24;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

body.article .body .doc .listingblock pre .hljs-attr {
  font-weight: 400;
}

/* The toolbox sits over the top-right corner; give it the block's ground so
   a long first line passes underneath it instead of through it. */
body.article .body .doc .listingblock .source-toolbox {
  top: 1px;
  right: 1px;
  padding: 7px 9px 7px 12px;
  background: #fbfbfd;
  border-radius: 0 11px 0 8px;
}

/* ── Tabs: underlined text tabs ───────────────────────────────────── */

body.article .body .doc .tabs .tablist > ul {
  gap: 22px;
  border-bottom: 1px solid #e5e8ef;
}

body.article .body .doc .tabs .tablist > ul li {
  margin: 0 0 -1px;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  font-size: 14.5px;
  font-weight: 500;
  color: #5b6472;
}

body.article .body .doc .tabs .tablist > ul li::before,
body.article .body .doc .tabs .tablist > ul li::after {
  content: none;
}

body.article .body .doc .tabs .tablist > ul li:hover {
  color: #161b24;
}

body.article .body .doc .tabs .tablist > ul li.is-selected {
  border-bottom-color: var(--kf-accent, #F25022);
  color: var(--kf-accent-deep, #C2390F);
  background: none;
}

body.article .body .doc .tabs .tabpanel,
body.article .body .doc .tabs.is-loading .tablist li:not(:first-child),
body.article .body .doc .tabs:not(.is-loading) .tabpanel {
  border: 0;
  background: none;
}

body.article .body .doc .tabs .tabpanel {
  padding: 16px 0 0;
}

/* ── Previous / next (bundle partials/pagination.hbs) ─────────────── */

body.article .body .doc nav.pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 0;
  line-height: 1.4;
}

body.article .body .doc nav.pagination span {
  display: block;
  flex: none;
  margin: 0;
  padding: 0;
}

body.article .body .doc nav.pagination .next {
  grid-column: 2;
  text-align: right;
}

body.article .body .doc nav.pagination span::before {
  content: none;
}

body.article .body .doc nav.pagination a {
  display: block;
  padding: 14px 16px;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  color: #161b24;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.article .body .doc nav.pagination a:hover {
  border-color: var(--kf-accent, #F25022);
  box-shadow: 0 4px 14px rgba(22, 27, 36, 0.06);
}

body.article .body .doc nav.pagination a::before,
body.article .body .doc nav.pagination a::after {
  position: static;
  display: block;
  width: auto;
  margin-bottom: 3px;
  transform: none;
  color: #6b7280;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
}

body.article .body .doc nav.pagination .prev a::before {
  content: "\2190  Previous";
}

body.article .body .doc nav.pagination .next a::after {
  content: none;
}

body.article .body .doc nav.pagination .next a::before {
  content: "Next  \2192";
}

@media screen and (max-width: 720px) {
  body.article .body .doc nav.pagination {
    grid-template-columns: minmax(0, 1fr);
  }

  body.article .body .doc nav.pagination .next {
    grid-column: 1;
  }
}

body.article .body .doc .source-toolbox .copy-button,
body.article .body .doc .source-toolbox .copy-icon {
  width: 15px;
  height: 15px;
  box-sizing: content-box;
}

/* ── Ordered lists: plain numbers ─────────────────────────────────── */

/* styles.css draws every list number as an accent-colored badge. Here list
   numbers are plain grey figures. */
body.article .body .doc .olist > ol > li {
  padding-left: 30px;
  min-height: 0;
}

body.article .body .doc .olist > ol > li::before {
  content: counter(kf-step) ".";
  top: 0;
  left: 2px;
  display: block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #8a90a0;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  font-variant-numeric: tabular-nums;
}

/* ── Header bar ───────────────────────────────────── */

/* Same parts as every page (js/website-link.js adds the links), restyled:
   the search box sits in the middle as a white bordered field, Playground and
   Dexter Labs are white squared boxes, Free Download is a gradient button,
   and the wordmark at the far right reads "by kloudfuse". */
body.article .navbar-brand {
  box-shadow: none;
}

body.article .navbar-brand .navbar-item.search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  padding: 0 14px 0 6px;
}

/* Auto margins centre the field in the space between the brand and the links. */
body.article .navbar-brand .navbar-item.search > #search-field {
  margin: 0 auto;
}

body.article .navbar #search-input {
  width: 380px !important;
  height: 40px;
  padding: 0 52px 0 38px !important;
  border: 1px solid #dfe3ea;
  border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 13px 50% / 16px;
  font-size: 14.5px;
}

body.article .navbar #search-input:hover {
  background-color: #fff;
  border-color: #c9ced9;
}

body.article .navbar #search-input:focus {
  width: 380px !important;
  border-color: var(--kf-accent, #F25022);
  box-shadow: 0 0 0 3px rgba(242, 80, 34, 0.16);
}

body.article .navbar .kf-search-hint {
  right: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: #8a90a0;
  font-size: 12.5px;
}

/* Playground and Dexter Labs: white squared boxes with a grey border. */
body.article .navbar .navbar-item.is-cta-ghost {
  margin: 0 10px 0 0;
  padding: 0 14px;
  border: 1px solid #e3e6ec;
  border-radius: 10px;
  background: #fff;
  color: #3b4252;
  font-weight: 600;
  font-size: 14.5px;
}

body.article .navbar .navbar-item.is-cta-ghost:hover {
  border-color: #c9ced9;
  background: #f7f8fa;
  color: #14171f;
}

/* Free Download: the Kloudfuse orange-to-pink gradient, squared to match. */
body.article .navbar .navbar-item.is-cta {
  margin: 0 !important;
  padding: 0 15px;
  border-radius: 10px;
  background: linear-gradient(90deg, #e8753a 0%, #d9456f 100%);
  box-shadow: none;
  color: #fff;
  font-size: 14.5px;
}

body.article .navbar .navbar-item.is-cta:hover {
  background: linear-gradient(90deg, #dd6a30 0%, #cc3a64 100%);
  box-shadow: none;
  transform: none;
}

body.article .navbar .navbar-item.is-cta:focus-visible,
body.article .navbar .navbar-item.is-cta-ghost:focus-visible {
  box-shadow: 0 0 0 3px rgba(242, 80, 34, 0.3);
}

/* "by kloudfuse": a hairline, then the wordmark in slate, smaller. */
body.article .navbar-brand .navbar-item.search > a.navbar-brand__website-link {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  width: auto;
  height: 22px;
  margin: 0 0 0 18px !important;
  padding: 0 0 0 18px;
  border-left: 1px solid #dfe3ea;
  text-decoration: none;
}

body.article .navbar-brand__website-link::before {
  content: "by";
  color: #9aa1ad;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
}

body.article .navbar-brand__website-link img {
  width: 92px;
  height: auto;
  opacity: 0.72;
}

@media screen and (max-width: 1180px) {
  body.article .navbar #search-input,
  body.article .navbar #search-input:focus {
    width: 260px !important;
  }
}
