/* =========================================================
   MAYSANO — Clean Full Width RTD Override (Stable Version)
   ========================================================= */

:root {
  --m-bg: #0E1B24;
  --m-surface: #132734;
  --m-surface-2: #1C3442;
  --m-content-bg: #102530;
  --m-text: #E6EEF4;
  --m-muted: #B7C2CC;
  --m-accent: #C9A227;
  --m-border: rgba(255,255,255,0.08);
}

/* =========================================================
   FULL WIDTH CONTENT
   ========================================================= */

.wy-nav-content {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 40px 60px !important;
  background: var(--m-content-bg) !important;
}

.wy-nav-content-wrap {
  margin-left: 300px !important;
  background: var(--m-bg) !important;
}

.rst-content {
  max-width: none !important;
}

/* =========================================================
   SIDEBAR STRUCTURE (STABLE VERSION)
   ========================================================= */

.wy-nav-side {
  background: var(--m-surface) !important;
  border-right: 1px solid var(--m-border) !important;
}

/* Keep default RTD scrolling behavior — do NOT override with flex */
.wy-side-scroll {
  height: 100vh;
  overflow-y: auto;
}

/* Sticky header */
.wy-side-nav-search {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--m-surface-2) !important;
  border-bottom: 1px solid var(--m-border) !important;
  padding: 16px 14px 20px 14px !important;
}

/* Add clean separation below search */
.wy-side-nav-search::after {
  content: "";
  display: block;
  margin-top: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Space before first menu item */
.wy-menu-vertical {
  padding-top: 14px !important;
  padding-bottom: 24px !important;
}

/* Prevent scroll-to-active from hiding header */
.wy-menu-vertical a {
  scroll-margin-top: 130px;
}

/* =========================================================
   SIDEBAR STYLING
   ========================================================= */

.wy-side-nav-search input[type="text"] {
  background: rgba(255,255,255,0.06) !important;
  color: var(--m-text) !important;
  border: 1px solid var(--m-border) !important;
  border-radius: 999px !important;
}

.wy-menu-vertical li {
  margin: 4px 0;
}

.wy-menu-vertical a {
  color: var(--m-muted) !important;
  transition: all 0.15s ease;
}

.wy-menu-vertical a:hover {
  background: rgba(201,162,39,0.12) !important;
  color: #FFF !important;
}

/* Active item */
.wy-menu-vertical li.current,
.wy-menu-vertical li.current > a {
  background: var(--m-surface-2) !important;
  color: #FFF !important;
  border-left: 4px solid var(--m-accent) !important;
  padding-left: 11px !important;
  font-weight: 600 !important;
}

/* Section captions */
.wy-menu-vertical p.caption {
  color: var(--m-accent) !important;
  letter-spacing: 0.06em;
  font-weight: 600;
  font-size: 11px !important;
  opacity: 0.85 !important;
}

/* =========================================================
   CONTENT TYPOGRAPHY
   ========================================================= */

.rst-content {
  color: var(--m-text) !important;
}

.rst-content h1,
.rst-content h2,
.rst-content h3 {
  color: #FFF !important;
  font-weight: 650 !important;
}

.rst-content p,
.rst-content li {
  color: rgba(230,238,244,0.9) !important;
  line-height: 1.7 !important;
}

.rst-content a {
  color: var(--m-accent) !important;
}

.rst-content a:hover {
  opacity: 0.85;
}

/* =========================================================
   CODE BLOCKS
   ========================================================= */

.rst-content pre code,
.rst-content code {
  background: rgba(255,255,255,0.06) !important;
  color: var(--m-text) !important;
  border: 1px solid var(--m-border) !important;
  border-radius: 6px !important;
}

/* =========================================================
   BUTTONS (Prev / Next)
   ========================================================= */

.rst-content .btn,
.rst-content .btn-neutral {
  background: var(--m-surface-2) !important;
  color: var(--m-text) !important;
  border: 1px solid var(--m-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.rst-content .btn:hover {
  border-color: rgba(201,162,39,0.45) !important;
}

/* =========================================================
   FOOTER REMOVAL
   ========================================================= */

footer {
  display: none !important;
}
