/* ========================================================================= */
/* RCRE Documentation Portal Stylesheet                                      */
/* ========================================================================= */

.docs-layout {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  min-height: calc(100vh - 70px);
}

/* Sidebar Navigation */
.docs-sidebar {
  width: 290px;
  flex-shrink: 0;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  padding: 1.5rem 1rem 3rem 1.5rem;
  border-right: 1px solid var(--border-glass);
  background: rgba(10, 13, 20, 0.4);
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.docs-search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.docs-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.25rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.2s ease;
}

.docs-search-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.docs-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.5;
  pointer-events: none;
}

.docs-nav-group {
  margin-bottom: 1.75rem;
}

.docs-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.docs-nav-list {
  list-style: none;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.docs-nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(3px);
}

.docs-nav-link.active {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  font-weight: 600;
  border-left: 2px solid var(--accent-indigo);
}

.docs-badge-mini {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--text-dim);
}

/* Main Content Area */
.docs-content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3.5rem 5rem;
  line-height: 1.75;
}

.docs-header {
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.docs-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.docs-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.docs-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 820px;
}

/* Section Styling */
.docs-section {
  margin-bottom: 4rem;
  scroll-margin-top: 90px;
}

.docs-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.6rem;
}

.docs-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  color: #e2e8f0;
}

.docs-section p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Callout Alert Boxes */
.docs-callout {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  border: 1px solid transparent;
}

.docs-callout-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.docs-callout-info {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.25);
  color: #bae6fd;
}

.docs-callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fef08a;
}

.docs-callout-tip {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

/* Code Snippet Containers with Language Tabs */
.docs-code-container {
  background: #080c16;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  overflow: hidden;
}

.docs-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.9);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.docs-code-tabs {
  display: flex;
  gap: 0.5rem;
}

.docs-code-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.docs-code-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.docs-code-tab.active {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.2);
  font-weight: 600;
}

.docs-btn-copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.docs-btn-copy:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.docs-code-content {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #cbd5e1;
}

/* API Reference Cards */
.api-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s ease;
}

.api-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.api-card-title {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.api-card-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.api-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.api-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  font-weight: 600;
}

.api-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.api-param-name {
  font-family: var(--font-mono);
  color: #38bdf8;
}

.api-param-type {
  font-family: var(--font-mono);
  color: #f472b6;
}

/* Deep link banner */
.sandbox-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.sandbox-banner-text {
  display: flex;
  flex-direction: column;
}

.sandbox-banner-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.sandbox-banner-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 960px) {
  .docs-sidebar {
    display: none;
  }
  .docs-content {
    padding: 1.5rem 1rem 3rem;
  }
}
