/* ===================================================================
   EurekaClaw Documentation — Custom CSS for PyData Sphinx Theme
   =================================================================== */

/* Brand colour palette */
:root {
  --ec-blue:        #0072b2;
  --ec-blue-light:  #e8f4fd;
  --ec-blue-mid:    #4da8da;
  --ec-orange:      #e07b39;
  --ec-green:       #2ca02c;
  --ec-red:         #d62728;
}

/* ------------------------------------------------------------------
   Navigation & sidebar
   ------------------------------------------------------------------ */
.bd-sidebar-primary .sidebar-primary-item {
  font-size: 0.88rem;
}

/* Active nav item highlight */
.bd-sidebar-primary .current > a,
.bd-sidebar-primary .current > a:hover {
  color: var(--ec-blue);
  font-weight: 600;
}

/* ------------------------------------------------------------------
   Headers
   ------------------------------------------------------------------ */
h1, h2, h3 {
  font-weight: 700;
}

h1 {
  border-bottom: 2px solid var(--ec-blue);
  padding-bottom: 0.3em;
  margin-bottom: 0.8em;
}

h2 {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.2em;
}

/* ------------------------------------------------------------------
   Code blocks
   ------------------------------------------------------------------ */
pre, .highlight pre {
  border-left: 3px solid var(--ec-blue);
  border-radius: 4px;
  font-size: 0.87rem;
}

/* Inline code */
code.literal {
  background-color: var(--ec-blue-light);
  color: #0d47a1;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.88em;
}

/* ------------------------------------------------------------------
   Tables
   ------------------------------------------------------------------ */
table.docutils {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

table.docutils thead th {
  background-color: var(--ec-blue);
  color: #fff;
  padding: 0.55rem 0.8rem;
  text-align: left;
}

table.docutils tbody tr:nth-child(even) {
  background-color: var(--ec-blue-light);
}

table.docutils td, table.docutils th {
  padding: 0.45rem 0.8rem;
  border: 1px solid #dee2e6;
}

/* ------------------------------------------------------------------
   Admonitions (note, tip, warning, etc.)
   ------------------------------------------------------------------ */
.admonition {
  border-radius: 6px;
  border-left-width: 4px;
}

.admonition.note {
  border-left-color: var(--ec-blue);
  background-color: var(--ec-blue-light);
}

.admonition.tip {
  border-left-color: var(--ec-green);
  background-color: #f0fff0;
}

.admonition.warning {
  border-left-color: var(--ec-orange);
  background-color: #fff8f0;
}

/* ------------------------------------------------------------------
   SD cards (sphinx-design)
   ------------------------------------------------------------------ */
.sd-card {
  border-radius: 8px;
  border-color: #dee2e6;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sd-card:hover {
  box-shadow: 0 4px 16px rgba(0, 114, 178, 0.12);
  border-color: var(--ec-blue-mid);
}

.sd-card-title {
  font-weight: 700;
  color: var(--ec-blue);
}

/* ------------------------------------------------------------------
   Homepage hero
   ------------------------------------------------------------------ */
.hero-badge {
  display: inline-block;
  background: var(--ec-blue);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 2px;
}

/* ------------------------------------------------------------------
   Dark mode overrides
   ------------------------------------------------------------------ */
html[data-theme="dark"] code.literal {
  background-color: #1e3a5f;
  color: #90caf9;
}

html[data-theme="dark"] table.docutils thead th {
  background-color: #1565c0;
}

html[data-theme="dark"] table.docutils tbody tr:nth-child(even) {
  background-color: #1a2a3a;
}

html[data-theme="dark"] .admonition.note {
  background-color: #1a2a3a;
}

html[data-theme="dark"] .sd-card {
  border-color: #374151;
}

html[data-theme="dark"] .sd-card:hover {
  border-color: var(--ec-blue-mid);
}

/* ------------------------------------------------------------------
   Navbar logo text
   ------------------------------------------------------------------ */
.navbar-brand .navbar-brand-text {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ec-blue);
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
footer {
  font-size: 0.82rem;
  color: #6c757d;
}
