/* ac-sidebar.css — Agentic Commerce sticky sidebar navigation
   Tokens: --color-gold:#D4A017 --color-off-white:#F5F0E8 --color-black:#0a0a0a
   Fonts: Cormorant Garamond (display), Inter (body)
*/

/* ── Layout wrapper ───────────────────────────────────────────── */
/* Wraps .ac-article-body + .ac-sidebar (header stays outside, full-bleed) */
.ac-article-with-sidebar {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* Article body fills remaining space beside the sidebar */
.ac-article-with-sidebar .ac-article-body,
.ac-article-with-sidebar .proposal__body {
  flex: 1;
  min-width: 0;
  max-width: none;
}

/* When the sidebar wrapper is present, expand the article container */
.ac-article:has(.ac-article-with-sidebar) {
  max-width: 1200px;
}

/* ── Sidebar container ────────────────────────────────────────── */
.ac-sidebar {
  position: sticky;
  top: 6rem;
  align-self: flex-start;
  width: 260px;
  flex-shrink: 0;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  scrollbar-width: none;
}
.ac-sidebar::-webkit-scrollbar { display: none; }

/* ── Section blocks ───────────────────────────────────────────── */
.ac-sidebar__section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.ac-sidebar__section--apply {
  background: transparent;
  border: none;
  padding: 4px 0 0;
}

/* ── Section headings ─────────────────────────────────────────── */
.ac-sidebar__heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #D4A017;
  margin: 0 0 10px;
  padding: 0;
}

/* ── Links ────────────────────────────────────────────────────── */
.ac-sidebar__link {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(245, 240, 232, 0.5);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, background 0.15s ease;
  line-height: 1.4;
}

.ac-sidebar__link:hover {
  color: #F5F0E8;
  background: rgba(255, 255, 255, 0.04);
}

/* Active / current page */
.ac-sidebar__link[aria-current="page"] {
  color: #F5F0E8;
  background: rgba(212, 160, 23, 0.08);
  border-left-color: #D4A017;
  font-weight: 500;
}

/* Map link — gold, visually distinct */
.ac-sidebar__link--map {
  color: #D4A017;
  font-weight: 500;
}
.ac-sidebar__link--map:hover {
  color: #e8b82a;
  background: rgba(212, 160, 23, 0.06);
}
.ac-sidebar__link--map[aria-current="page"] {
  color: #D4A017;
  background: rgba(212, 160, 23, 0.1);
  border-left-color: #D4A017;
}

/* Apply link */
.ac-sidebar__link--apply {
  color: #F5F0E8;
  font-weight: 500;
  padding: 8px 10px;
  background: rgba(212, 160, 23, 0.08);
  border: 1px solid rgba(212, 160, 23, 0.2);
  border-left: 1px solid rgba(212, 160, 23, 0.2);
  text-align: center;
  border-radius: 8px;
}
.ac-sidebar__link--apply:hover {
  background: rgba(212, 160, 23, 0.14);
  color: #F5F0E8;
}
.ac-sidebar__link--apply[aria-current="page"] {
  background: rgba(212, 160, 23, 0.14);
  border-color: rgba(212, 160, 23, 0.4);
  border-left-color: rgba(212, 160, 23, 0.4);
  color: #F5F0E8;
}

/* ── Prev / next navigation ───────────────────────────────────── */
.ac-prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ac-prev-next a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(245, 240, 232, 0.5);
  text-decoration: none;
  transition: color 0.15s ease;
}
.ac-prev-next a:hover { color: #F5F0E8; }
.ac-prev-next a:last-child { text-align: right; }

/* ── Mobile (≤1024px): sidebar below content ─────────────────── */
@media (max-width: 1024px) {
  .ac-article-with-sidebar {
    flex-direction: column;
    gap: 32px;
  }

  .ac-sidebar {
    position: static;
    width: 100%;
    max-height: none;
    order: 2;
  }

  /* Two-column grid for sidebar sections on tablet */
  .ac-sidebar .ac-sidebar__section {
    display: block;
  }
}

@media (max-width: 640px) {
  .ac-article-with-sidebar {
    gap: 24px;
  }
}
