/* ============================================================
   Hayot Birja — Docsify brand theme
   Brand colors: #ff6201 (orange), #02676c (teal)
   ============================================================ */

/* --- Google Fonts: Inter (matches platform UI) ------------- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap");

/* --- CSS variables ----------------------------------------- */
:root {
  --theme-color: #ff6201;
  --theme-color-dark: #d95200;
  --accent-teal: #02676c;
  --sidebar-width: 30%;
  --sidebar-bg: #ffffff;
  --text-primary: #1a2633;
  --text-secondary: #505d6b;
  --content-max-width: 95%;
  --content-margin-inline: 5px;
  --font-size-xxxl: 1.8rem;
  --font-size-xxl: 1.5rem;
  --sidebar-name-margin: none;
}

/* --- Base typography --------------------------------------- */
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: var(--text-primary);
}

.app-sub-sidebar li::before {
    content: "";
}

/* --- Top progress bar -------------------------------------- */
.progress {
  background-color: var(--theme-color);
  height: 3px;
}

/* --- Sidebar ----------------------------------------------- */
.sidebar {
  background-color: var(--sidebar-bg);
  border-right: 1px solid #ebebeb;
  width: var(--sidebar-width);
  padding-top: 0;
}

/* Logo area */
.sidebar > h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0px;
}

.sidebar > h1 a {
  color: var(--theme-color);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.sidebar > h1 img {
  display: block;
  height: 36px;
  width: auto;
}

/* Sidebar nav */
.sidebar .sidebar-nav {
  padding: 0px 10px 10px 10px;
}

.sidebar ul {
  margin: 0;
  padding: 0;
}

.sidebar ul li {
  color: var(--accent-teal);
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
}

.sidebar ul li a {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  padding: 3px 0px;
  display: block;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  border-right: none;
  transition: color 0.2s;
}

.sidebar ul li a:hover {
  color: var(--theme-color);
  text-decoration: none;
}

/* Active link */
.sidebar ul li.active > a {
  color: var(--theme-color);
  font-weight: 500;
  border-right: 3px solid var(--theme-color);
  background-color: #fff5f0;
}

/* Section headers level 1 (top-level, no link) */
.sidebar-nav > ul > li > p {
  color: var(--theme-color) !important;
  font-size: 1.25rem;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 12px 0 2px;
  padding: 0 7px;
}

/* Section headers level 2 (nested group titles, no link) */
.sidebar-nav > ul > li > ul > li > p {
  color: var(--accent-teal) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0;
  text-transform: none;
  margin: 8px 0 1px;
  padding: 0 20px;
}

/* Nested lists */
.sidebar ul li ul {
  padding: 0 0 0 16px;
}

article#main > ul:first-of-type, 
article#main > ul:first-of-type ul {
    list-style: none;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
  background: #d0d4d8;
}

/* Sidebar toggle button */
.sidebar-toggle span {
  background-color: var(--theme-color);
}

/* --- Content area ------------------------------------------ */
.content {
  left: var(--sidebar-width);
}

body.close .content {
  left: 0;
}

.markdown-section {
  max-width: 95%;
  padding: 5px;
}

/* --- Headings ---------------------------------------------- */
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section strong {
  color: var(--text-primary);
}

.markdown-section h1 {
  border-bottom: 2px solid var(--theme-color);
  padding-bottom: 10px;
}

.markdown-section h2 {
  border-bottom: 1px solid #ebebeb;
  padding-bottom: 6px;
}

/* --- Links ------------------------------------------------- */
.markdown-section a {
  color: var(--theme-color);
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.markdown-section a:hover {
  color: var(--theme-color-dark);
  border-bottom-color: var(--theme-color-dark);
}

/* --- Blockquote -------------------------------------------- */
.markdown-section blockquote {
  border-left: 4px solid var(--theme-color);
  background-color: #fff8f5;
  color: #5a6270;
  padding: 12px 20px;
  margin: 1.5em 0;
  border-radius: 0 4px 4px 0;
}

/* --- Inline code ------------------------------------------- */
.markdown-section code {
  background-color: #fff4ee;
  color: #c94b00;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 0.82em;
}

/* --- Code blocks ------------------------------------------- */
.markdown-section pre {
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 1.2em 1.4rem;
  margin: 1.2em 0;
  overflow: auto;
}

.markdown-section pre > code {
  background-color: transparent;
  color: #24292e;
  padding: 0;
  font-size: 0.85em;
  border-radius: 0;
}

/* --- Tables ------------------------------------------------ */
.markdown-section tr:nth-child(2n) {
  background-color: #fafafa;
}

.markdown-section th {
  background-color: #f5f5f5;
  color: var(--text-primary);
}

.markdown-section td,
.markdown-section th {
  border-color: #e8e8e8;
}

/* Search keyword highlight */
.search .search-keyword {
  color: var(--theme-color);
  font-weight: 700;
  font-style: normal;
}

/* --- App nav (top right) ----------------------------------- */
.app-nav a.active,
.app-nav a:hover {
  color: var(--theme-color);
}

.app-nav a.active {
  border-bottom: 2px solid var(--theme-color);
}

/* --- Tip/warn callouts ------------------------------------- */
.markdown-section p.tip {
  border-left: 4px solid var(--theme-color);
  background-color: #fff8f5;
}

.markdown-section p.tip::before {
  background-color: var(--theme-color);
}

.markdown-section p.warn {
  background-color: rgba(2, 103, 108, 0.08);
  border-left: 4px solid var(--accent-teal);
}

/* --- Copy-code button -------------------------------------- */
.docsify-copy-code-button {
  background-color: var(--theme-color) !important;
  color: #fff !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  border-radius: 3px !important;
}

/* --- Anchor hover ------------------------------------------ */
.anchor span {
  color: var(--theme-color);
}

/* --- Mobile ----------------------------------------------- */
@media screen and (max-width: 768px) {
  .sidebar {
    left: calc(-1 * var(--sidebar-width));
  }

  body.close .content {
    transform: translateX(var(--sidebar-width));
  }

  body.close .sidebar {
    transform: translateX(var(--sidebar-width));
  }
}
