/* CharlieHub Documentation - Custom Styling to match Domain Manager */

:root {
  /* Match Domain Manager colors */
  --md-primary-fg-color: #212529;
  --md-primary-fg-color--light: #343a40;
  --md-primary-fg-color--dark: #1a1d20;
  --md-accent-fg-color: #0d6efd;
  
  /* Text colors for better legibility */
  --md-default-fg-color: #212529;
  --md-default-fg-color--light: #495057;
  --md-default-fg-color--lighter: #6c757d;
  
  /* Background colors */
  --md-default-bg-color: #f8f9fa;
  --md-default-bg-color--light: #ffffff;
  
  /* Code blocks */
  --md-code-bg-color: #f6f8fa;
  --md-code-fg-color: #24292e;
}

/* Body background to match Domain Manager */
body {
  background-color: #f8f9fa !important;
}

/* Main content area */
.md-main__inner {
  margin-top: 0;
}

/* Header styling - dark to match Domain Manager navbar */
.md-header {
  background-color: #212529 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.md-header__title {
  color: white !important;
}

/* Search bar styling */
.md-search__input {
  background-color: rgba(255,255,255,0.1);
  color: white;
}

.md-search__input::placeholder {
  color: rgba(255,255,255,0.7);
}

/* Navigation sidebar */
.md-nav__title {
  color: #212529;
  font-weight: 600;
}

.md-nav__link {
  color: #495057 !important;
}

.md-nav__link:hover,
.md-nav__link--active {
  color: #0d6efd !important;
}

/* Content styling */
.md-content {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin: 1rem;
  padding: 1rem;
}

/* Headings */
.md-typeset h1 {
  color: #212529;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 0.5rem;
}

.md-typeset h2 {
  color: #212529;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  color: #212529;
  font-weight: 600;
}

/* Paragraphs and text */
.md-typeset {
  color: #212529;
  line-height: 1.6;
}

/* Links */
.md-typeset a {
  color: #0d6efd;
}

.md-typeset a:hover {
  color: #0a58ca;
  text-decoration: underline;
}

/* Code blocks */
.md-typeset code {
  background-color: #f6f8fa;
  color: #24292e;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 13px;
}

.md-typeset pre {
  background-color: #f6f8fa !important;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.md-typeset pre code {
  background-color: transparent;
  padding: 0;
}

/* Tables */
.md-typeset table:not([class]) {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background-color: #f8f9fa;
  color: #212529;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

.md-typeset table:not([class]) td {
  border-color: #dee2e6;
}

/* Admonitions */
.md-typeset .admonition {
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Footer */
.md-footer {
  background-color: #212529;
}

/* Adjust for our custom navbar at top */
.md-header {
  top: 56px !important;
}

body {
  padding-top: 56px !important;
}

/* Hide MkDocs header brand and title since we have our own navbar */
.md-header__button.md-logo {
  display: none;
}

.md-header__title {
  display: none;
}

/* Make the header more compact - just search bar */
.md-header__inner {
  justify-content: flex-end;
}

/* Sidebar adjustments */
.md-sidebar {
  top: 112px; /* 56px navbar + 56px header */
}

.md-sidebar--primary {
  background-color: #ffffff;
}

/* Table of contents */
.md-sidebar--secondary {
  background-color: #ffffff;
}

/* Search results */
.md-search__scrollwrap {
  background-color: #ffffff;
}

.md-search-result__link {
  color: #212529;
}

.md-search-result__link:hover {
  background-color: #f8f9fa;
}

/* Download button styling */
.md-download-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 12px;
  vertical-align: middle;
  border-radius: 4px;
  color: #0d6efd;
  transition: all 0.2s ease;
}

.md-download-source:hover {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0a58ca;
}

.md-download-source svg {
  width: 18px;
  height: 18px;
  stroke-width: 0;
}
