/*-----------------------------------------------------------------
  Faizi — Documentation styles
  Colors & fonts follow the Faizi theme (assets/scss/utils)
-----------------------------------------------------------------*/

@font-face {
  font-family: "Sequel Sans";
  src: url("../fonts/Sequel Sans Book Body.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Sequel Sans";
  src: url("../fonts/Sequel Sans Bold Body.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Nohemi";
  src: url("../fonts/Nohemi-Bold-BF6438cc587b5b5.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --fz-lime: #ccff33;
  --fz-periwinkle: #8181ff;
  --fz-periwinkle-2: #4734F7;
  --fz-black: #000000;
  --fz-dark: #0b0b0c;
  --fz-heading: #1c1d1f;
  --fz-body: #101214;
  --fz-white: #ffffff;
  --fz-gray: #f6f6f6;
  --fz-gray-2: #686868;
  --fz-line: rgba(0, 0, 0, .09);

  --fz-font-body: "Poppins", sans-serif;
  --fz-font-heading: "Sequel Sans", "Poppins", sans-serif;
  --fz-font-display: "Nohemi", "Poppins", sans-serif;
  --fz-font-mono: Consolas, Menlo, "Courier New", monospace;
  --fz-ease: cubic-bezier(.19, 1, .22, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--fz-font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--fz-body);
  background: var(--fz-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--fz-font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fz-heading);
}

a {
  color: var(--fz-periwinkle-2);
  text-decoration: none;
  transition: color .25s linear;
}

a:hover {
  color: var(--fz-black);
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

strong {
  font-weight: 600;
  color: var(--fz-heading);
}

code {
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f1f5;
  font-family: var(--fz-font-mono);
  font-size: .9em;
  color: var(--fz-periwinkle-2);
}

.fz-container {
  width: min(1440px, 100% - 32px);
  margin-inline: auto;
}

/*=========== header ============*/
.fz-doc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  background: var(--fz-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.fz-doc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.fz-doc-logo img {
  width: 110px;
}

.fz-doc-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fz-search {
  position: relative;
}

.fz-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .45);
}

.fz-search input {
  width: 260px;
  height: 44px;
  padding: 0 18px 0 40px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  font: inherit;
  font-size: 14px;
  color: var(--fz-white);
  outline: none;
  transition: border-color .3s ease;
}

.fz-search input::placeholder {
  color: rgba(255, 255, 255, .45);
}

.fz-search input:focus {
  border-color: var(--fz-lime);
}

.fz-doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 50px;
  border: 1px solid var(--fz-lime);
  background: var(--fz-lime);
  font-weight: 600;
  font-size: 14px;
  color: var(--fz-black);
  white-space: nowrap;
  transition: background-color .3s ease, color .3s ease;
}

.fz-doc-btn:hover {
  background: transparent;
  color: var(--fz-lime);
}

.fz-doc-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .2);
  color: var(--fz-white);
}

.fz-doc-btn--ghost:hover {
  border-color: var(--fz-lime);
  background: var(--fz-lime);
  color: var(--fz-black);
}

.fz-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  background: none;
  color: var(--fz-white);
  cursor: pointer;
}

.fz-nav-toggle svg {
  width: 18px;
  height: 18px;
  margin: 0 auto;
}

/*=========== layout ============*/
.fz-doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
  padding-block: 50px 90px;
}

/*=========== sidebar ============*/
.fz-doc-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 26px 22px;
  border-radius: 20px;
  border: 1px solid var(--fz-line);
  background: var(--fz-gray);
}

.fz-doc-sidebar h3 {
  margin-bottom: 18px;
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fz-gray-2);
}

.fz-doc-nav > li + li {
  margin-top: 4px;
}

.fz-doc-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--fz-heading);
  transition: background-color .25s ease, color .25s ease;
}

.fz-doc-nav a:hover {
  background: rgba(0, 0, 0, .05);
}

.fz-doc-nav > li > a.is-active {
  background: var(--fz-black);
  color: var(--fz-lime);
}

.fz-doc-sub {
  margin: 4px 0 6px 14px;
  padding-left: 12px;
  border-left: 1px solid var(--fz-line);
}

.fz-doc-sub a {
  padding: 7px 12px;
  font-weight: 500;
  font-size: 14px;
  color: var(--fz-gray-2);
}

.fz-doc-sub a.is-active {
  color: var(--fz-periwinkle-2);
  background: rgba(71, 52, 247, .07);
}

.fz-no-result {
  display: none;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--fz-gray-2);
}

/*=========== content ============*/
.fz-doc-main {
  min-width: 0;
}

.fz-doc-section {
  padding-bottom: 60px;
  margin-bottom: 60px;
  border-bottom: 1px solid var(--fz-line);
}

.fz-doc-section:last-child {
  border-bottom: 0;
}

.fz-doc-section > section {
  scroll-margin-top: 110px;
}

.fz-doc-section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  font-size: clamp(28px, 3.4vw, 40px);
  text-transform: uppercase;
}

.fz-doc-section h2 span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--fz-lime);
  font-family: var(--fz-font-display);
  font-size: 16px;
  color: var(--fz-black);
}

.fz-doc-section h3 {
  margin: 42px 0 16px;
  font-size: 24px;
}

.fz-doc-section h4 {
  margin: 26px 0 12px;
  font-family: var(--fz-font-body);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0;
}

.fz-doc-section p {
  margin-bottom: 16px;
  color: #3d4045;
}

.fz-doc-section section:first-of-type > h3:first-child {
  margin-top: 0;
}

.fz-lead {
  font-size: 18px;
}

/*=========== info card / lists ============*/
.fz-info-card {
  padding: 26px 28px;
  margin-bottom: 26px;
  border-radius: 18px;
  border: 1px solid var(--fz-line);
  background: var(--fz-gray);
}

.fz-info-card li + li {
  margin-top: 10px;
}

.fz-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 18px 0 24px;
}

.fz-check-list li {
  position: relative;
  padding-left: 28px;
  color: #3d4045;
}

.fz-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fz-lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.3 4.8-5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.fz-steps {
  counter-reset: step;
  margin: 18px 0 24px;
  padding: 24px 28px;
  border-radius: 18px;
  border: 1px solid var(--fz-line);
  background: var(--fz-gray);
}

.fz-steps li {
  position: relative;
  padding-left: 42px;
  color: #3d4045;
}

.fz-steps li + li {
  margin-top: 14px;
}

.fz-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 3px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--fz-black);
  font-family: var(--fz-font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--fz-lime);
}

/*=========== figures & code ============*/
figure {
  margin: 22px 0 26px;
}

figure img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--fz-line);
}

figure img.is-plain {
  border: 0;
}

figcaption {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  color: var(--fz-gray-2);
}

.fz-code {
  position: relative;
  margin: 18px 0 26px;
  border-radius: 14px;
  border: 1px solid #23232a;
  background: var(--fz-dark);
}

.fz-code pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--fz-font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: #e6e6ec;
}

.fz-code .fz-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}

.fz-code .fz-copy:hover {
  background: var(--fz-lime);
  border-color: var(--fz-lime);
  color: var(--fz-black);
}

/*=========== tables ============*/
.fz-table-wrap {
  margin: 18px 0 26px;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--fz-line);
}

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

th,
td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--fz-line);
  white-space: nowrap;
}

th {
  background: var(--fz-gray);
  font-family: var(--fz-font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

td:last-child,
th:last-child {
  white-space: normal;
}

tr:last-child td {
  border-bottom: 0;
}

td code {
  white-space: nowrap;
}

.fz-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 5px;
  border: 1px solid var(--fz-line);
  vertical-align: -4px;
}

/*=========== notes ============*/
.fz-note {
  display: flex;
  gap: 16px;
  margin: 22px 0;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid rgba(71, 52, 247, .2);
  background: rgba(71, 52, 247, .05);
}

.fz-note-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--fz-periwinkle-2);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.fz-note h5 {
  margin-bottom: 4px;
  font-family: var(--fz-font-body);
  font-size: 16px;
}

.fz-note p:last-child {
  margin-bottom: 0;
}

.fz-note--warn {
  border-color: rgba(204, 92, 51, .25);
  background: rgba(255, 138, 76, .08);
}

.fz-note--warn .fz-note-icon {
  background: #e2622c;
}

/*=========== page gallery ============*/
.fz-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0 34px;
}

.fz-page-grid--inner {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.fz-page-card {
  display: block;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--fz-line);
  background: var(--fz-white);
  transition: transform .5s var(--fz-ease), border-color .3s ease, box-shadow .5s var(--fz-ease);
}

.fz-page-card:hover {
  transform: translateY(-6px);
  border-color: rgba(71, 52, 247, .35);
  box-shadow: 0 30px 50px -32px rgba(71, 52, 247, .5);
}

.fz-page-thumb {
  display: block;
  aspect-ratio: 4 / 3.2;
  overflow: hidden;
  border-radius: 10px;
  background: var(--fz-gray);
}

.fz-page-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border: 0;
  border-radius: 0;
  transition: object-position 3s cubic-bezier(.45, 0, .25, 1);
}

.fz-page-card:hover .fz-page-thumb img {
  object-position: bottom;
}

.fz-page-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 8px 6px;
}

.fz-page-name {
  font-family: var(--fz-font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--fz-heading);
}

.fz-page-file {
  font-family: var(--fz-font-mono);
  font-size: 12px;
  color: var(--fz-gray-2);
}

/*=========== footer ============*/
.fz-doc-footer {
  padding: 34px 0;
  background: var(--fz-dark);
  color: rgba(255, 255, 255, .7);
  font-size: 15px;
}

.fz-doc-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fz-doc-footer img {
  width: 96px;
}

.fz-doc-footer a {
  color: var(--fz-lime);
}

.fz-doc-footer a:hover {
  color: var(--fz-white);
}

/*=========== back to top ============*/
.fz-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--fz-lime);
  color: var(--fz-black);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: .3s linear;
}

.fz-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fz-top svg {
  width: 14px;
  height: 14px;
}

/*=========== responsive ============*/
@media (max-width: 1199px) {
  .fz-doc-layout {
    grid-template-columns: 1fr;
  }

  .fz-doc-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: 300px;
    max-height: none;
    padding-top: 90px;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform .4s var(--fz-ease);
  }

  .fz-doc-sidebar.is-open {
    transform: translateX(0);
  }

  .fz-nav-toggle {
    display: grid;
    place-items: center;
  }

  .fz-search input {
    width: 190px;
  }

  .fz-page-grid--inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .fz-doc-btn--ghost {
    display: none;
  }

  .fz-check-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .fz-search {
    display: none;
  }

  .fz-doc-layout {
    padding-block: 34px 60px;
  }

  .fz-page-grid,
  .fz-page-grid--inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .fz-doc-section {
    padding-bottom: 40px;
    margin-bottom: 40px;
  }

  .fz-steps,
  .fz-info-card {
    padding: 20px;
  }

  .fz-doc-footer-inner {
    justify-content: center;
    text-align: center;
  }
}
