/**
 * WebRec | Html5 Screen Recording Utility For PC
 *
 * @author coders_devx
 * @link https://codecanyon.net/user/coders_devx
 * @copyright Copyright (c) 2026 coders_devx. All rights reserved.
 * @license Regular License - See LICENSE.txt for details
 */

:root {
  --doc-ink: #0e1219;
  --doc-muted: #667085;
  --doc-line: rgba(14, 18, 25, 0.1);
  --doc-accent: #0f766e;
  --doc-accent-soft: rgba(15, 118, 110, 0.12);
  --doc-font: "Manrope", system-ui, sans-serif;
  --doc-display: "Syne", sans-serif;
  --doc-code-bg: #0b0f14;
  --doc-code-panel: #12171f;
  --doc-code-edge: rgba(255, 255, 255, 0.08);
  --doc-code-text: #d7dde8;
  --doc-code-muted: #8b95a8;
  --doc-tok-keyword: #7dd3c0;
  --doc-tok-string: #f0c674;
  --doc-tok-comment: #6b7689;
  --doc-tok-tag: #8ab4f8;
  --doc-tok-attr: #c9a0dc;
  --doc-tok-fn: #e8a0a8;
}

body {
  font-family: var(--doc-font);
  color: var(--doc-ink);
  background: #f6f7f9;
}

.hero {
  background:
    radial-gradient(900px 380px at 8% -20%, rgba(15, 118, 110, 0.16), transparent 60%),
    radial-gradient(700px 320px at 92% 0%, rgba(14, 18, 25, 0.06), transparent 55%),
    linear-gradient(180deg, #fbfcfd 0%, #eef1f4 100%);
  border-bottom: 1px solid var(--doc-line);
}

.hero-brand {
  font-family: var(--doc-display);
  font-size: clamp(2.1rem, 4.2vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--doc-ink);
}

.doc-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.doc-nav a {
  text-decoration: none;
  color: var(--doc-muted);
  display: inline-block;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.doc-nav a:hover {
  color: var(--doc-accent);
  text-decoration: none;
}

.doc-nav a.is-active {
  color: var(--doc-accent);
  font-weight: 600;
  border-bottom-color: var(--doc-accent);
}

.doc-nav ul {
  margin-bottom: 0;
}

.doc-nav li {
  line-height: 1.55;
}

.sticky-side {
  position: sticky;
  top: 1rem;
}

/* Mobile toggle bar — fixed so it stays on screen while scrolling.
   Hidden from lg and up (desktop sticky sidebar unchanged). */
.doc-nav-bar {
  display: none;
}

.doc-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--doc-line);
  border-radius: 10px;
  background: #fff;
  color: var(--doc-ink);
  font-family: var(--doc-font);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(14, 18, 25, 0.04);
  cursor: pointer;
}

.doc-nav-toggle:hover {
  border-color: rgba(15, 118, 110, 0.35);
  color: var(--doc-accent);
}

.doc-nav-close {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--doc-muted);
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.doc-nav-close:hover {
  background: var(--doc-accent-soft);
  color: var(--doc-accent);
}

.doc-nav-backdrop {
  display: none;
}

@media (max-width: 991.98px) {
  .doc-nav-bar {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    margin: 0;
    padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-top, 0px));
    padding-top: calc(0.55rem + env(safe-area-inset-top, 0px));
    background: rgba(246, 247, 249, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--doc-line);
    box-shadow: 0 6px 18px rgba(14, 18, 25, 0.08);
  }

  /* Reserve space so content isn't under the fixed bar */
  body {
    padding-top: 3.6rem;
  }

  /* Drawer host only — don't occupy a layout row on mobile */
  .doc-sidebar {
    position: static;
    width: 0 !important;
    max-width: 0 !important;
    flex: 0 0 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible;
    border: 0;
    min-height: 0;
  }

  .doc-nav-close {
    display: inline-flex;
  }

  .doc-nav.sticky-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(19.5rem, 88vw);
    margin: 0;
    padding: 1.1rem 1.25rem 1.5rem;
    background: #fff;
    border-right: 1px solid var(--doc-line);
    box-shadow: 8px 0 32px rgba(14, 18, 25, 0.12);
    overflow-y: auto;
    z-index: 1055;
    transform: translateX(-105%);
    transition: transform 0.24s ease;
    visibility: hidden;
    pointer-events: none;
  }

  .doc-nav.sticky-side.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .doc-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(14, 18, 25, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .doc-nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }

  body.doc-nav-open {
    overflow: hidden;
  }

  .doc-nav a {
    display: block;
    padding: 0.4rem 0;
  }
}

/* Desktop: keep classic sticky side rail */
@media (min-width: 992px) {
  .doc-nav-bar,
  .doc-nav-close,
  .doc-nav-backdrop {
    display: none !important;
  }

  body {
    padding-top: 0;
  }

  .doc-nav.sticky-side {
    position: sticky;
    top: 1rem;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    width: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }
}

/* Inline code chips */
:not(pre) > code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  color: #0a5c56;
  background: var(--doc-accent-soft);
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 6px;
  padding: 0.12em 0.42em;
}

/* Elite code frames */
.doc-code {
  --frame-radius: 14px;
  position: relative;
  margin: 1.15rem 0 1.5rem;
  border-radius: var(--frame-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    var(--doc-code-panel);
  border: 1px solid var(--doc-code-edge);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 40px rgba(11, 15, 20, 0.28),
    0 0 0 1px rgba(15, 118, 110, 0.08);
  overflow: hidden;
}

.doc-code__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(180deg, #171c26, #12171f);
  border-bottom: 1px solid var(--doc-code-edge);
}

.doc-code__dots {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.doc-code__dots span {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset;
}

.doc-code__dots span:nth-child(1) { background: #ff5f57; }
.doc-code__dots span:nth-child(2) { background: #febc2e; }
.doc-code__dots span:nth-child(3) { background: #28c840; }

.doc-code__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.doc-code__lang {
  font-family: var(--doc-font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--doc-code-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--doc-code-edge);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

.doc-code__title {
  font-size: 0.78rem;
  color: rgba(215, 221, 232, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-code__copy {
  appearance: none;
  border: 1px solid var(--doc-code-edge);
  background: rgba(255, 255, 255, 0.04);
  color: var(--doc-code-text);
  font-family: var(--doc-font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  padding: 0.32rem 0.65rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.doc-code__copy:hover {
  background: rgba(15, 118, 110, 0.22);
  border-color: rgba(125, 211, 192, 0.35);
  color: #fff;
}

.doc-code__copy.is-copied {
  background: rgba(22, 163, 74, 0.22);
  border-color: rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}

.doc-code pre {
  margin: 0;
  padding: 1.05rem 1.15rem 1.2rem;
  background: var(--doc-code-bg);
  color: var(--doc-code-text);
  overflow-x: auto;
  tab-size: 2;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.doc-code pre code,
.doc-code code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  white-space: pre;
}

/* Tokens */
.doc-tok-comment { color: var(--doc-tok-comment); font-style: italic; }
.doc-tok-string { color: var(--doc-tok-string); }
.doc-tok-keyword { color: var(--doc-tok-keyword); font-weight: 600; }
.doc-tok-tag { color: var(--doc-tok-tag); }
.doc-tok-attr { color: var(--doc-tok-attr); }
.doc-tok-fn { color: var(--doc-tok-fn); }
.doc-tok-number { color: #9cdcfe; }
.doc-tok-punct { color: #9aa4b5; }

/* Fallback for raw pre before JS enhances */
main pre:not(.doc-code-ready) {
  margin: 1.15rem 0 1.5rem;
  padding: 1.05rem 1.15rem;
  border-radius: 14px;
  background: var(--doc-code-bg);
  color: var(--doc-code-text);
  border: 1px solid var(--doc-code-edge);
  box-shadow: 0 18px 40px rgba(11, 15, 20, 0.22);
  overflow-x: auto;
}

main pre:not(.doc-code-ready) code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: inherit;
  background: transparent;
}

@media (max-width: 575.98px) {
  .doc-code__title { display: none; }
  .doc-code pre,
  main pre:not(.doc-code-ready) {
    padding: 0.9rem;
  }
}
