/* ReadTheDocs-Inspired Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Teal/Blue Colors */
  --teal-dark: #0d7377;
  --teal-medium: #14a085;
  --teal-light: #4ecdc4;
  --blue-dark: #1e88e5;
  --blue-medium: #42a5f5;
  --blue-light: #90caf9;
  
  /* ReadTheDocs Colors */
  --rtd-blue: #2980b9;
  --rtd-blue-dark: #1f6399;
  --rtd-blue-light: #3498db;
  
  /* Basic Colors */
  --white: #ffffff;
  --black: #000000;
  
  /* Content Area - Dark Gray with lighter teal/blue text */
  --content-bg: #d4f4fa;
  --content-text: #2e6b97;
  --content-text-muted: #7dd3e0;
  --content-text-light: #d4f4fa;
  
  /* Sidebar - Light Gray */
  --sidebar-bg: #f5f5f5;
  --sidebar-text: #333333;
  --sidebar-border: #e0e0e0;
  --sidebar-active: #2980b9;
  --sidebar-hover: #e8e8e8;
  --sidebar-heading: #004d52;
  
  /* Code */
  --code-bg: #1e1e1e;
  --code-text: #d4d4d4;
  --code-border: #3e3e3e;
  
  /* Links */
  --link-color: #4ecdc4;
  --link-hover: #90caf9;
  
  /* Borders */
  --border-color: #444444;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--content-text);
  background: var(--content-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header - Blue Banner */
.app-name-link,
.sidebar .app-name {
  display: none;
}

/* Custom Header */
.rtd-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--rtd-blue);
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
}

.rtd-header-content {
  width: 100%;
  max-width: 100%;
  padding: 0 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  gap: 1em;
}

.rtd-header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5em;
}

.rtd-logo {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.rtd-logo-text {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--white);
  font-family: 'Inter', sans-serif;
}

.rtd-header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.rtd-search-container {
  width: 100%;
  position: relative;
}

#rtd-search-input {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 0.6em 1em;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.95);
  color: var(--sidebar-text);
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

#rtd-search-input:focus {
  border-color: var(--white);
  outline: none;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

#rtd-search-input::placeholder {
  color: var(--sidebar-text);
  opacity: 0.6;
}

/* Search Results Dropdown */
.rtd-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 2px solid var(--rtd-blue);
  border-radius: 4px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rtd-search-result-item {
  padding: 0.75em 1em;
  border-bottom: 1px solid var(--sidebar-border);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rtd-search-result-item:last-child {
  border-bottom: none;
}

.rtd-search-result-item:hover {
  background: var(--sidebar-hover);
}

.rtd-search-result-text {
  flex: 1;
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 0.9em;
}

.rtd-search-result-text mark {
  background: rgba(41, 128, 185, 0.2);
  color: var(--rtd-blue);
  font-weight: 700;
  padding: 0.1em 0.2em;
  border-radius: 2px;
}

.rtd-search-result-level {
  font-size: 0.75em;
  color: var(--sidebar-heading);
  font-weight: 600;
  padding: 0.2em 0.5em;
  background: rgba(0, 77, 82, 0.1);
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}

.rtd-search-level-h1 .rtd-search-result-level {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

.rtd-search-level-h2 .rtd-search-result-level {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.rtd-search-level-h3 .rtd-search-result-level {
  background: rgba(41, 128, 185, 0.1);
  color: var(--rtd-blue);
}

.rtd-search-no-results {
  padding: 1em;
  text-align: center;
  color: var(--sidebar-text);
  font-style: italic;
}

.rtd-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.rtd-title {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--white);
  font-family: 'Inter', sans-serif;
}

/* Typography - Lighter Teal/Blue */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--content-text-light);
  margin-top: 1.75em;
  margin-bottom: 0.875em;
  line-height: 1.3;
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

h1 {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--white);
  border-bottom: 3px solid var(--teal-medium);
  padding-bottom: 0.5em;
  margin-bottom: 1.25em;
  margin-top: 0;
  padding-top: 20px;
  background: none;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
}

h2 {
  font-size: 2em;
  color: var(--white);
  border-bottom: 2px solid var(--blue-medium);
  padding-bottom: 0.4em;
  margin-top: 2em;
  background: none;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
}

h3 {
  font-size: 1.5em;
  color: var(--white);
  margin-top: 1.5em;
  border-left: 4px solid var(--teal-medium);
  padding-left: 0.75em;
  background: none;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  margin-left: 0;
  padding-right: 0;
}

h4 {
  font-size: 1.25em;
  color: var(--white);
  border-left: 3px solid var(--blue-medium);
  padding-left: 0.75em;
  background: none;
  padding-top: 0.2em;
  padding-bottom: 0.2em;
  margin-left: 0;
}

/* Copy Link Button */
.copy-link-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid var(--border-color);
  cursor: pointer;
  padding: 0.3em 0.5em;
  margin-left: 0.5em;
  opacity: 0;
  transition: all 0.2s ease;
  color: var(--content-text-muted);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8em;
  height: 1.8em;
  z-index: 10;
}

h1:hover .copy-link-btn,
h2:hover .copy-link-btn,
h3:hover .copy-link-btn,
h4:hover .copy-link-btn,
h5:hover .copy-link-btn,
h6:hover .copy-link-btn,
.copy-link-btn:hover,
.copy-link-btn.copied {
  opacity: 1;
  color: var(--link-color);
  border-color: var(--link-color);
}

.copy-link-btn:hover {
  background: var(--link-color);
  color: var(--content-text);
}

.copy-link-btn.copied {
  color: var(--link-color);
  background: transparent;
  opacity: 1;
}

.copy-link-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

.markdown-section a {
  color: var(--teal-light);
}

.markdown-section a:hover {
  color: var(--blue-light);
}

/* Sidebar - Light Gray */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
  margin-top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  position: fixed;
  top: 60px;
}

.sidebar ul {
  padding-top: 0.5em;
}

.sidebar ul li ul {
  margin-left: 0;
  padding-left: 0;
}

/* Sidebar Links - Regular items */
.sidebar ul li a {
  color: var(--sidebar-text);
  padding: 0.6em 1.25em;
  display: block;
  border-radius: 0;
  margin: 0;
  transition: background 0.2s ease;
  border-bottom: none;
  font-size: 0.9em;
  border-left: 3px solid transparent;
}

/* Sidebar Section Headers (list items with nested lists) */
.sidebar ul li:has(> ul) > a {
  color: var(--sidebar-heading) !important;
  font-weight: 700 !important;
  font-size: 0.85em !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  border-bottom: 2px solid var(--sidebar-heading) !important;
  border-left: none !important;
  padding: 0.75em 1.25em 0.5em 1.25em !important;
  margin-top: 1em !important;
  margin-bottom: 0.25em !important;
  background: var(--sidebar-bg) !important;
}

/* First section header */
.sidebar > ul > li:first-child > a {
  margin-top: 0 !important;
}

.sidebar ul li a:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-heading);
  border-left-color: var(--sidebar-heading);
}

.sidebar ul li.active > a {
  background: var(--sidebar-bg);
  color: var(--sidebar-heading);
  font-weight: 600;
  border-left-color: var(--sidebar-heading);
}

/* Nested items */
.sidebar ul li ul li a {
  padding-left: 1.75em;
  font-size: 0.85em;
}

/* Hide search completely */
.sidebar .search {
  display: none !important;
}

.sidebar .search-results {
  display: none !important;
}

/* Search results styling */
.sidebar .search-results {
  padding: 0.5em;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--sidebar-border);
}

.sidebar .search-results .matching-post {
  padding: 0.75em;
  margin: 0.25em 0;
  border-radius: 4px;
  background: var(--white);
  border: 1px solid var(--sidebar-border);
}

.sidebar .search-results .matching-post:hover {
  background: var(--sidebar-hover);
  border-color: var(--rtd-blue);
}

.sidebar .search-results .matching-post a {
  color: var(--sidebar-text);
  font-weight: 500;
}

.sidebar .search-results .matching-post a:hover {
  color: var(--rtd-blue);
}

/* Main Content Area - Dark Gray */
.markdown-section {
  max-width: 900px;
  padding: 3em 4em;
  background: var(--content-bg);
  color: var(--content-text);
  min-height: calc(100vh - 60px);
  margin-top: 60px;
}

.markdown-section p {
  margin-bottom: 1.5em;
  font-size: 1.05em;
  line-height: 1.8;
  color: var(--content-text);
}

.markdown-section {
  color: var(--content-text);
}

.markdown-section li {
  color: var(--content-text);
}

.markdown-section strong {
  color: var(--content-text-light);
}

/* Code Blocks - Dark Theme */
pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  padding: 1.5em;
  overflow-x: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
}

code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.2em 0.5em;
  border-radius: 3px;
  border: 1px solid var(--code-border);
}

pre code {
  background: transparent;
  color: var(--code-text);
  padding: 0;
  border: none;
  font-size: 0.95em;
}

/* Copy Code Button */
.docsify-copy-code-button {
  background: var(--rtd-blue) !important;
  color: var(--white) !important;
  border-radius: 4px !important;
  padding: 0.5em 1em !important;
  font-size: 0.85em !important;
  font-weight: 500 !important;
  border: none !important;
}

.docsify-copy-code-button:hover {
  background: var(--rtd-blue-dark) !important;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  border: 1px solid var(--border-color);
}

table th {
  background: var(--code-bg);
  color: var(--content-text);
  padding: 1em 1.25em;
  text-align: left;
  font-weight: 600;
  font-size: 0.95em;
  border: 1px solid var(--border-color);
}

table td {
  padding: 1em 1.25em;
  border: 1px solid var(--border-color);
  background: var(--content-bg);
  color: var(--content-text);
}

table tr:hover td {
  background: var(--code-bg);
}

/* Blockquotes - Default */
blockquote {
  border-left: 4px solid var(--rtd-blue);
  padding-left: 1.5em;
  margin: 2em 0;
  color: var(--content-text-muted);
  font-style: italic;
  background: var(--code-bg);
  padding: 1.25em 1.5em;
  border-radius: 4px;
}

/* Warning Alert Blocks */
.markdown-section blockquote.alert-warning {
  background: #ff9800 !important;
  border-left: 5px solid #f57c00 !important;
  color: #fff !important;
  padding: 1.25em 1.5em !important;
  margin: 1.5em 0 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4) !important;
  font-style: normal !important;
  font-weight: 500 !important;
}

.markdown-section blockquote.alert-warning strong {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1.05em !important;
}

.markdown-section blockquote.alert-warning a {
  color: #fff !important;
  border-bottom-color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: underline !important;
}

/* Info Alert Blocks */
.markdown-section blockquote.alert-info {
  background: rgba(41, 128, 185, 0.2) !important;
  border-left: 5px solid var(--rtd-blue) !important;
  color: var(--content-text-light) !important;
  padding: 1.25em 1.5em !important;
  margin: 1.5em 0 !important;
  border-radius: 4px !important;
  font-style: normal !important;
}

.markdown-section blockquote.alert-info strong {
  color: var(--blue-light) !important;
  font-weight: 700 !important;
}

.markdown-section blockquote.alert-info a {
  color: var(--blue-light) !important;
}

/* Danger Alert Blocks */
.markdown-section blockquote.alert-danger {
  background: #f44336 !important;
  border-left: 5px solid #d32f2f !important;
  color: #fff !important;
  padding: 1.25em 1.5em !important;
  margin: 1.5em 0 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4) !important;
  font-style: normal !important;
  font-weight: 500 !important;
}

.markdown-section blockquote.alert-danger strong {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1.05em !important;
}

.markdown-section blockquote.alert-danger a {
  color: #fff !important;
  border-bottom-color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: underline !important;
}

/* Success Alert Blocks */
.markdown-section blockquote.alert-success {
  background: #4caf50 !important;
  border-left: 5px solid #388e3c !important;
  color: #fff !important;
  padding: 1.25em 1.5em !important;
  margin: 1.5em 0 !important;
  border-radius: 4px !important;
  font-style: normal !important;
}

.markdown-section blockquote.alert-success strong {
  color: #fff !important;
  font-weight: 700 !important;
}

.markdown-section blockquote.alert-success a {
  color: #fff !important;
  border-bottom-color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: underline !important;
}

/* Lists */
ul, ol {
  margin: 1.5em 0;
  padding-left: 2em;
}

li {
  margin: 0.75em 0;
  line-height: 1.8;
  color: var(--content-text);
}

/* Pagination */
.pagination-item {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1em 1.5em;
  background: var(--content-bg);
  color: var(--content-text);
  transition: all 0.2s ease;
}

.pagination-item:hover {
  border-color: var(--rtd-blue);
  background: var(--code-bg);
  color: var(--link-color);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--content-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--rtd-blue);
}

/* Images */
img {
  border-radius: 4px;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin: 1.5em 0;
}

/* HR */
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 3em 0;
}

/* Strong */
strong {
  font-weight: 600;
  color: var(--content-text);
}

/* Selection */
::selection {
  background: var(--rtd-blue);
  color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
  .markdown-section {
    padding: 2em 1.5em;
    margin-top: 60px;
  }
  
  .sidebar {
    margin-top: 60px;
    top: 60px;
  }
  
  h1 {
    font-size: 2em;
    padding-top: 20px;
  }
  
  h2 {
    font-size: 1.5em;
  }
  
  .rtd-header-content {
    padding: 0 0.5em;
    gap: 0.5em;
  }
  
  .rtd-title {
    font-size: 0.9em;
    display: none;
  }
  
  .rtd-logo {
    font-size: 1.4em;
  }
  
  .rtd-logo-text {
    font-size: 1.1em;
  }
  
  .rtd-header-center {
    max-width: 100%;
  }
  
  #rtd-search-input {
    font-size: 0.85em;
    padding: 0.5em 0.75em;
  }
}

/* Focus States */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--rtd-blue);
  outline-offset: 2px;
}

/* Remove coverpage styles */
section.cover {
  display: none;
}
