
/* ==========================================================================
   DOCUMENTATION HUB
   ========================================================================== */

.docs-main-wrapper {
  background: var(--bg-body, #fff);
}
.dark-mode .docs-main-wrapper {
  background: var(--bg-body, #0f172a);
}

/* ── Hero & Search ───────────────────────────────────────────────────────── */
.docs-hero {
  padding-bottom: 2rem;
}
.docs-search-wrapper {
  max-width: 600px;
  margin-top: 2rem;
}
.docs-search-inner {
  position: relative;
  display: flex;
  align-items: center;
}
.docs-search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1.25rem;
}
.docs-search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3.5rem;
  font-size: 1.125rem;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-body);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.docs-search-input:focus {
  outline: none;
  border-color: var(--rwp-dark, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.dark-mode .docs-search-input {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}
.dark-mode .docs-search-input:focus {
  border-color: #3b82f6;
  background: rgba(255,255,255,0.05);
}

/* ── Mobile Product Nav ──────────────────────────────────────────────────── */
.docs-mobile-nav {
  display: none;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  position: sticky;
  top: 72px;
  z-index: 40;
}
.dark-mode .docs-mobile-nav {
  border-bottom-color: rgba(255,255,255,0.08);
  background: var(--bg-body, #0f172a);
}
.docs-mobile-nav__inner {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.docs-mobile-nav__inner::-webkit-scrollbar { display: none; }
.docs-mobile-nav__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-body);
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.18s ease;
  background: transparent;
}
.docs-mobile-nav__pill:hover {
  border-color: var(--brand-primary, #6366f1);
  color: var(--brand-primary, #6366f1);
}
.docs-mobile-nav__pill--active {
  background: var(--brand-primary, #6366f1);
  border-color: var(--brand-primary, #6366f1);
  color: #fff;
}
@media (max-width: 991px) {
  .docs-mobile-nav { display: block; }
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.docs-main-section {
  padding: 4rem 0 8rem;
  border-top: 1px solid var(--border-color);
}
.dark-mode .docs-main-section {
  border-top-color: rgba(255,255,255,0.05);
}
.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 991px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.docs-sidebar {
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 1rem;
}
.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
}
.dark-mode .docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
}
@media (max-width: 991px) {
  .docs-sidebar {
    display: none; /* Hide sticky sidebar on mobile */
  }
}
.docs-sidebar__title {
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 700;
}
.docs-sidebar__nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.docs-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-body);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}
.docs-sidebar__link:hover {
  background: rgba(0,0,0,0.03);
  color: var(--text-heading);
}
.dark-mode .docs-sidebar__link:hover {
  background: rgba(255,255,255,0.03);
  color: #fff;
}
.docs-sidebar__link--active {
  background: rgba(0,0,0,0.05);
  color: var(--text-heading);
  font-weight: 600;
}
.dark-mode .docs-sidebar__link--active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* ── Content & Product Section ───────────────────────────────────────────── */
.docs-product-section {
  margin-bottom: 6rem;
  scroll-margin-top: 140px;
}
.docs-product-section:last-child {
  margin-bottom: 0;
}
.docs-product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.dark-mode .docs-product-header {
  border-bottom-color: rgba(255,255,255,0.08);
}
@media (max-width: 768px) {
  .docs-product-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
.docs-product-header__left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.docs-product-header__icon {
  font-size: 2.5rem;
  line-height: 1;
}
.docs-product-header__name {
  font-size: 2rem;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}
.docs-product-header__tag {
  font-size: .875rem;
  color: var(--text-muted);
  font-weight: 500;
}
.docs-product-header__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.docs-status--live {
  font-size: .75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  background: rgba(16,185,129,0.1);
  color: #10b981;
}
.docs-status--dev {
  font-size: .75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  background: rgba(245,158,11,0.1);
  color: #d97706;
}

/* ── Category Cards Grid ─────────────────────────────────────────────────── */
.docs-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.docs-cat-card {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.docs-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.04);
  border-color: rgba(var(--doc-rgb, 99,102,241), 0.5);
}
.dark-mode .docs-cat-card {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.08);
}
.dark-mode .docs-cat-card:hover {
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
  border-color: rgba(var(--doc-rgb, 99,102,241), 0.5);
  background: rgba(var(--doc-rgb, 99,102,241), 0.05);
}
.docs-cat-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.docs-cat-card__icon {
  font-size: 1.5rem;
}
.docs-cat-card__title {
  font-size: 1.125rem;
  margin: 0;
  font-weight: 600;
}
.docs-cat-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}
.docs-cat-card__item {
  font-size: .9375rem;
}
.docs-cat-card__article-link {
  color: var(--text-body);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}
.docs-cat-card__article-link:hover {
  color: var(--doc-light, #6366f1);
}
.docs-cat-card__article--placeholder {
  color: var(--text-muted);
  cursor: default;
}
.docs-cat-card__article--placeholder:hover {
  color: var(--text-muted);
}
.docs-soon-badge {
  font-size: .65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(0,0,0,0.05);
  color: var(--text-muted);
}
.dark-mode .docs-soon-badge {
  background: rgba(255,255,255,0.05);
}

/* ── API Strip ───────────────────────────────────────────────────────────── */
.docs-api-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(0,0,0,0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  flex-wrap: wrap;
}
.dark-mode .docs-api-strip {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.08);
}
.docs-api-strip__label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-heading);
}
.docs-api-strip__code {
  background: rgba(0,0,0,0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: .875rem;
  color: var(--doc-light, #6366f1);
  font-family: monospace;
}
.dark-mode .docs-api-strip__code {
  background: rgba(255,255,255,0.1);
}
.docs-api-strip__note {
  font-size: .875rem;
  color: var(--text-muted);
  margin-left: auto;
}
@media (max-width: 600px) {
  .docs-api-strip {
    flex-direction: column;
    align-items: flex-start;
  }
  .docs-api-strip__note {
    margin-left: 0;
  }
}

/* ── Coming Soon ─────────────────────────────────────────────────────────── */
.docs-coming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.docs-coming-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0,0,0,0.02);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
}
.dark-mode .docs-coming-card {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.1);
}
.docs-coming-card__icon {
  font-size: 1.5rem;
}
.docs-coming-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.docs-coming-card__body strong {
  font-size: 1rem;
  color: var(--text-heading);
}
.docs-coming-card__body span {
  font-size: .8125rem;
  color: var(--text-muted);
}
.docs-coming-card__badge {
  font-size: .65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 0.25rem 0.5rem;
  border-radius: 99px;
  background: rgba(0,0,0,0.05);
  color: var(--text-muted);
}
.dark-mode .docs-coming-card__badge {
  background: rgba(255,255,255,0.05);
}
