/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Merged body style from original plus marquee style */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  background: #f0f0f0;
}

/* Top navigation bar */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #4d698e;
  color: #fff;
  padding: 0.6rem 1rem;
}
.top-nav .left-items,
.top-nav .right-items {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand-version {
  font-weight: bold;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-version img {
  display: block;
}
.brand-version select {
  font-size: 0.9rem;
}
.top-nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: opacity 0.2s ease;
}
.top-nav a:hover {
  opacity: 0.8;
}

/* Layout container: sidebar + main-content */
.container {
  display: flex;
  height: calc(100vh - 50px);
}

/* Sidebar */
.sidebar {
  width: 300px;
  background: #f8f8f8;
  border-right: 1px solid #ddd;
  overflow-y: auto;
  padding: 1rem;
}
.search-box {
  position: relative;
  margin-bottom: 1rem;
}
.search-box input {
  width: 100%;
  padding: 0.5rem 2.2rem 0.5rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.search-box svg {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  fill: #999;
}
.function-list {
  list-style: none;
  padding-left: 0;
}
.function-list li {
  margin: 0.3rem 0;
}
.function-list a {
  text-decoration: none;
  color: #555;
  padding: 0.3rem 0.5rem;
  display: block;
  border-radius: 3px;
  transition: background 0.2s ease;
}
.function-list a:hover {
  background: #eee;
}

/* Main content area */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Doc blocks */
.doc-block {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
}
.doc-block h1 {
  margin-bottom: 0.25rem;
}

.category-badge {
  display: inline-block;
  background: #d18716;
  color: #1a100b;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  font-weight: bold;
}

/* New component-badge class => dark red with white text, indicating component name. */
.component-badge {
  display: inline-block;
  background-color: #800000; /* Dark red */
  color: #fff;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  font-weight: bold;
}

.doc-block p {
  margin: 0.6rem 0;
}
.doc-block h2 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #444;
}

/*
   Base for description-block; no background color here.
   Just handles margins, padding, border radius, etc.
*/
.description-block {
  padding: 8px;
  border-radius: 4px;
  margin: 10px 0;
  border: 0;
}

/* Provide a separate .bg-orange class for the actual orange color & white text */
.bg-orange {
  background: #CC3008;
  color: #fff;
}

/* Notes block remains the same: gray background, black text, border */
.notes-block {
  background: #fafafa;
  color: #000;
  padding: 8px;
  border-radius: 4px;
  margin: 10px 0;
  border: 1px solid #000;
}

/* Code blocks */
.code-block {
  background: #2e2e2e;
  color: #ddd;
  padding: 0.8rem;
  border-radius: 4px;
  font-family: Consolas, monospace;
  font-size: 0.9rem;
  margin: 0.8rem 0;
  overflow-x: auto;
  white-space: pre;
}

/* Syntax highlighting classes */
.af-string {
  color: #d14;
}
.af-number {
  color: #099;
}
.af-placeholder {
  color: #800080;
  font-weight: bold;
}
.af-builtin {
  color: #0086b3;
  font-weight: bold;
}
.af-keyword {
  color: #a71d5d;
  font-weight: bold;
}
.af-operator {
  color: #aa22ff;
  font-weight: bold;
}
.af-comment {
  color: #888;
}

/* ====================== MARQUEE-SPECIFIC STYLES ====================== */
header {
  background-color: #333;
  color: white;
  padding: 16px;
  text-align: center;
  position: relative;
}

#marquee-container {
  position: relative;
  overflow: hidden;
  margin: 20px auto;
  height: 37px;
  background-color: #222;
  border-radius: 8px;
  box-sizing: border-box;
}

#marquee-content {
  position: absolute;
  white-space: nowrap;
  top: 0;
  left: 0;
}

.marquee-letter {
  display: inline-block;
  transform-origin: center;
  margin: 0;
  font-size: 1.5em;
}

/* ====================== NEW UTILITY CLASSES (for removed inline CSS) ====================== */
.mb-1rem {
  margin-bottom: 1rem;
}
.bold {
  font-weight: bold;
}
.full-width {
  width: 100%;
}
.mt-03 {
  margin-top: 0.3rem;
}
.w-80 {
  width: 80%;
}

/* Additional utility classes for spacing and styling */
.mt-10 {
  margin-top: 10px;
}
.mb-10 {
  margin-bottom: 10px;
}
.border-0 {
  border: 0;
}
.p-8 {
  padding: 8px;
}
.r-4 {
  border-radius: 4px;
}

/* ====================== ARTICLE DOC LAYOUT ====================== */
/* Wrap article docs in the same card style */
.doc-block[data-component="article"] {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Article title (h2.article-title in your htmlBody) → match doc-block H1 style */
.doc-block[data-component="article"] .article-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: #222;
}

/* Body copy */
.doc-block[data-component="article"] p {
  margin: 0.75rem 0;
  line-height: 1.6;
  color: #333;
}

/* Section headings (e.g. <h3 class="section-heading">) */
.doc-block[data-component="article"] .section-heading {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  color: #444;
}

/* Feature / comparison items as light “cards” */
.doc-block[data-component="article"] .feature-item,
.doc-block[data-component="article"] .comparison-item {
  background: #f8f8f8;
  border-radius: 4px;
  padding: 0.75rem;
  margin: 0.75rem 0;
}
.doc-block[data-component="article"] .feature-item h4,
.doc-block[data-component="article"] .comparison-item h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  color: #333;
}

/* Normalize the synopsis block margin (overrides that inline style) */
.doc-block[data-component="article"] .description-block {
  margin: 1rem 0 !important;
}
