/* ================================================================
   OctaDeploy · Docs mobile redesign
   docs.octadeploy.com renders from the same bundle as the dashboard
   (no source — see octadeploy-dashboard-source-missing memory), so this
   restyles the EXISTING real content (accordion sections already carry
   the right data: colored check/warning icons per <li>, code blocks,
   command cards) rather than inventing new structure. Hostname-gated in
   docs-mobile.js; this stylesheet just defines the classes it applies.
================================================================ */
:root {
  --docs-bg: #09090b;
  --docs-card: #111116;
  --docs-line: rgba(255,255,255,.08);
  --docs-muted: #a1a1aa;
  --docs-dim: #71717a;
  --docs-accent: #818cf8;
  --docs-accent2: #6366f1;
  --docs-ok: #34d399;
  --docs-ok-bg: rgba(16,185,129,.08);
  --docs-ok-b: rgba(16,185,129,.25);
  --docs-warn: #fbbf24;
  --docs-warn-bg: rgba(245,158,11,.07);
  --docs-warn-b: rgba(245,158,11,.25);
  --docs-danger: #fb7185;
  --docs-danger-bg: rgba(244,63,94,.08);
  --docs-danger-b: rgba(244,63,94,.25);
}

/* ---------- Header: logo + language pill + hamburger ----------
   These are mobile-only elements (the mockup is a mobile redesign) — hidden
   by default so they never leak onto the unmodified desktop layout, shown
   only inside the max-width:767px block below. */
.octa-docs-langpill,
.octa-docs-hamburger,
.octa-docs-tabbar { display: none; }

@media (max-width: 767px) {
  body.octa-docs header > div {
    padding-left: 0; padding-right: 0;
  }
  body.octa-docs header img { height: 28px !important; }
  .octa-docs-langwrap-hide { display: none !important; }
  .octa-docs-langpill {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--docs-card); border: 1px solid var(--docs-line); border-radius: 10px;
    padding: 7px 11px; font-size: 12px; font-weight: 700; color: #fff; cursor: pointer;
  }
  .octa-docs-langpill svg { width: 12px; height: 12px; color: var(--docs-dim); }
  .octa-docs-hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--docs-card); border: 1px solid var(--docs-line); color: #fff; cursor: pointer;
  }
  .octa-docs-hamburger svg { width: 18px; height: 18px; }
  .octa-docs-dashlink {
    display: inline-flex !important; align-items: center; gap: 5px;
    background: var(--docs-ok-bg) !important; border: 1px solid var(--docs-ok-b) !important;
    color: var(--docs-ok) !important; border-radius: 8px; padding: 6px 10px !important;
    font-weight: 700 !important; font-size: 11px !important;
  }
}

/* ---------- Search bar ---------- */
.octa-docs-search-wrap { position: relative; margin: 14px 24px 0; }
@media (min-width: 768px) { .octa-docs-search-wrap { max-width: 896px; margin: 14px auto 0; padding: 0 24px; } }
.octa-docs-search-wrap svg.icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--docs-dim); pointer-events: none;
}
@media (min-width: 768px) { .octa-docs-search-wrap svg.icon { left: 38px; } }
.octa-docs-search {
  width: 100%; background: var(--docs-card); border: 1px solid var(--docs-line);
  border-radius: 10px; padding: 11px 60px 11px 38px; color: #fff; font-size: 14px;
}
.octa-docs-search::placeholder { color: var(--docs-dim); }
.octa-docs-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 10.5px; font-weight: 700; color: var(--docs-dim); border: 1px solid var(--docs-line);
  border-radius: 5px; padding: 2px 6px; font-family: ui-monospace, monospace;
}
@media (min-width: 768px) { .octa-docs-kbd { right: 34px; } }
.octa-docs-item-dim { opacity: .3; pointer-events: none; }

/* ---------- Breadcrumb ---------- */
.octa-docs-crumbs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 14px 24px 0; font-size: 12.5px; color: var(--docs-dim);
}
@media (min-width: 768px) { .octa-docs-crumbs { max-width: 896px; margin: 0 auto; padding: 14px 24px 0; } }
.octa-docs-crumbs svg { width: 13px; height: 13px; vertical-align: -2px; }
.octa-docs-crumbs .sep { color: #3f3f46; }
.octa-docs-crumbs .cur { color: #fff; font-weight: 600; }
.octa-docs-crumbs a { color: var(--docs-dim); text-decoration: none; }

/* ---------- Requirement list items -> colored boxes ---------- */
.octa-docs-box {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: 12px; padding: 13px 15px; font-size: 13.5px; line-height: 1.45;
  margin-bottom: 8px; list-style: none !important;
}
.octa-docs-box svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.octa-docs-box.ok { background: var(--docs-ok-bg); border: 1px solid var(--docs-ok-b); color: #d1fae5; }
.octa-docs-box.ok svg { color: var(--docs-ok); }
.octa-docs-box.danger { background: var(--docs-danger-bg); border: 1px solid var(--docs-danger-b); color: #ffe4e6; }
.octa-docs-box.danger svg { color: var(--docs-danger); }

/* ---------- Code blocks: title bar + copy button ---------- */
.octa-docs-codewrap { border: 1px solid var(--docs-line); border-radius: 12px; overflow: hidden; margin-top: 8px; }
.octa-docs-codewrap .bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #18181b; padding: 9px 14px; border-bottom: 1px solid var(--docs-line);
}
.octa-docs-codewrap .bar .title { font-size: 13px; font-weight: 700; color: #fff; }
.octa-docs-copybtn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.06); border: 1px solid var(--docs-line); color: var(--docs-muted);
  border-radius: 7px; padding: 5px 9px; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.octa-docs-copybtn svg { width: 12px; height: 12px; }
.octa-docs-copybtn.copied { color: var(--docs-ok); border-color: var(--docs-ok-b); background: var(--docs-ok-bg); }
.octa-docs-codewrap pre { margin: 0 !important; border: none !important; border-radius: 0 !important; }

/* ---------- Deploy settings cards ---------- */
.octa-docs-cmdcard { position: relative; }
.octa-docs-cmdcard .cmdicon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; background: rgba(255,255,255,.06);
  color: var(--docs-dim); margin-bottom: 6px;
}
.octa-docs-cmdcard .cmdicon svg { width: 12px; height: 12px; }
.octa-docs-cmdcard .octa-docs-copybtn { position: absolute; top: 10px; right: 10px; padding: 4px 6px; }
.octa-docs-cmdcard .octa-docs-copybtn svg { width: 11px; height: 11px; }

/* ---------- Amber note boxes: icon ---------- */
.octa-docs-amber-icon {
  display: inline-flex; margin-right: 6px; color: var(--docs-warn); vertical-align: -3px;
}
.octa-docs-amber-icon svg { width: 15px; height: 15px; }

/* ---------- Hamburger drawer (section jump list) ---------- */
.octa-docs-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 60; opacity: 0;
  transition: opacity .2s; pointer-events: none;
}
.octa-docs-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.octa-docs-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 82%; max-width: 320px;
  background: var(--docs-bg); border-left: 1px solid var(--docs-line); z-index: 61;
  transform: translateX(100%); transition: transform .25s ease; padding: 20px;
  overflow-y: auto;
}
.octa-docs-drawer.open { transform: translateX(0); }
.octa-docs-drawer h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--docs-dim); margin: 18px 0 8px; }
.octa-docs-drawer h3:first-child { margin-top: 0; }
.octa-docs-drawer a.item {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 9px;
  color: #e4e4e7; text-decoration: none; font-size: 14px; font-weight: 600;
}
.octa-docs-drawer a.item:active { background: rgba(255,255,255,.06); }
.octa-docs-drawer a.item .em { font-size: 16px; }
.octa-docs-drawer .close {
  position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; background: var(--docs-card);
  border: 1px solid var(--docs-line); color: #fff;
}

/* ---------- Bottom tab bar ---------- */
@media (max-width: 767px) {
  body.octa-docs { padding-bottom: 74px; }
  .octa-docs-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: flex; background: rgba(9,9,11,.94); backdrop-filter: blur(10px);
    border-top: 1px solid var(--docs-line); padding: 7px 2px calc(7px + env(safe-area-inset-bottom));
  }
  .octa-docs-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; color: var(--docs-dim); font-size: 10px; font-weight: 700;
    padding: 4px 0; font-family: inherit;
  }
  .octa-docs-tabbar button svg { width: 19px; height: 19px; }
  .octa-docs-tabbar button.active { color: var(--docs-ok); }
}
