/*
 * Custom dark theme for CREATOR Wiki
 * Color palette matched to creatorV webapp dark mode
 *
 * creatorV dark mode colors:
 * - Primary background: hsl(214, 9%, 12%) ~ #1d1e1f
 * - Secondary background: hsl(214, 9%, 15%) ~ #232526
 * - Tertiary background: hsl(214, 9%, 20%) ~ #303234
 * - Text primary: #ffffff / rgba(255, 255, 255, 0.9)
 * - Text secondary: #adb5bd
 * - Accent/links: #64b5f6
 * - Borders: rgba(255, 255, 255, 0.1)
 */

/* ===================================
   Global Styles
   =================================== */

/* Hide "Published with HonKit" branding in sidebar */
.book-summary .gitbook-link,
.book-summary li:has(.gitbook-link),
a.gitbook-link {
  display: none !important;
}

/* Also hide the divider before it */
.book-summary ul.summary li.divider:last-of-type {
  display: none !important;
}

/* ===================================
   Dark Theme (color-theme-2) Override
   =================================== */

/* Main body and page background */
.book.color-theme-2 .book-body {
  color: rgba(255, 255, 255, 0.9);
  background: hsl(214, 9%, 12%);
}

.book.color-theme-2 .book-body .page-wrapper .page-inner section {
  background: hsl(214, 9%, 12%);
}

/* Main content area */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal {
  color: rgba(255, 255, 255, 0.9);
}

/* Links */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a {
  color: #64b5f6;
}

.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a:hover {
  color: #90caf9;
}

/* Headings */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
  color: #ffffff;
}

/* Heading borders */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 {
  border-color: rgba(255, 255, 255, 0.12);
}

/* h6 color */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
  color: #adb5bd;
}

/* Horizontal rule */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr {
  background-color: rgba(255, 255, 255, 0.12);
}

/* Blockquotes */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote {
  border-color: rgba(255, 255, 255, 0.2);
  color: #adb5bd;
}

/* Code blocks and inline code */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
  color: #e6e6e6;
  background: hsl(214, 9%, 15%);
  border-color: rgba(255, 255, 255, 0.1);
}

.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

/* Code highlighting background */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight {
  background-color: hsl(214, 9%, 18%);
}

/* Tables */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td {
  border-color: rgba(255, 255, 255, 0.12);
}

.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr {
  color: rgba(255, 255, 255, 0.9);
  background-color: hsl(214, 9%, 12%);
  border-color: rgba(255, 255, 255, 0.12);
}

.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
  background-color: hsl(214, 9%, 15%);
}

.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th {
  background-color: hsl(214, 9%, 18%);
  color: #ffffff;
}

/* Sidebar / Summary */
.book.color-theme-2 .book-summary {
  color: #adb5bd;
  background: hsl(214, 9%, 12%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.book.color-theme-2 .book-summary .book-search,
.book.color-theme-2 .book-summary #book-search-input {
  background: hsl(214, 9%, 15%);
  border-radius: 6px;
}

.book.color-theme-2 .book-summary .book-search input,
.book.color-theme-2 .book-summary #book-search-input input,
.book.color-theme-2 .book-summary .book-search input:focus,
.book.color-theme-2 .book-summary #book-search-input input:focus {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.book.color-theme-2 .book-summary #book-search-input input::placeholder {
  color: #adb5bd;
}

/* Summary dividers */
.book.color-theme-2 .book-summary ul.summary li.divider {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

/* Summary checkmarks */
.book.color-theme-2 .book-summary ul.summary li i.fa-check {
  color: #4caf50;
}

/* Summary done items */
.book.color-theme-2 .book-summary ul.summary li.done > a {
  color: #adb5bd;
}

/* Summary links */
.book.color-theme-2 .book-summary ul.summary li a,
.book.color-theme-2 .book-summary ul.summary li span {
  color: #adb5bd;
  background: transparent;
  font-weight: 500;
}

/* Summary active and hover */
.book.color-theme-2 .book-summary ul.summary li.active > a,
.book.color-theme-2 .book-summary ul.summary li a:hover {
  color: #64b5f6;
  background: rgba(100, 181, 246, 0.12);
  font-weight: 500;
  text-decoration: none;
}

/* Header styles */
.book.color-theme-2 .book-header {
  color: #adb5bd;
  background: hsl(214, 9%, 12%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.book.color-theme-2 .book-header .btn {
  color: #adb5bd;
}

.book.color-theme-2 .book-header .btn:hover {
  color: #64b5f6;
  background: rgba(100, 181, 246, 0.12);
}

.book.color-theme-2 .book-header h1 {
  color: #ffffff;
}

/* Navigation arrows */
.book.color-theme-2 .book-body .navigation {
  color: #adb5bd;
}

.book.color-theme-2 .book-body .navigation:hover {
  color: #64b5f6;
}

/* Dropdown menu */
.color-theme-2 .dropdown-menu {
  background-color: hsl(214, 9%, 15%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.color-theme-2 .dropdown-menu .dropdown-caret .caret-inner {
  border-bottom: 9px solid hsl(214, 9%, 15%);
}

.color-theme-2 .dropdown-menu .dropdown-caret .caret-outer {
  border-bottom: 9px solid rgba(255, 255, 255, 0.1);
}

.color-theme-2 .dropdown-menu .buttons {
  border-color: rgba(255, 255, 255, 0.1);
}

.color-theme-2 .dropdown-menu .button {
  color: #adb5bd;
}

.color-theme-2 .dropdown-menu .button:hover {
  color: #64b5f6;
  background: rgba(100, 181, 246, 0.12);
}

/* Search results */
.book.color-theme-2 #book-search-input {
  background: hsl(214, 9%, 15%);
  border-color: rgba(255, 255, 255, 0.1);
}

.book.color-theme-2 #book-search-results .search-results .has-results .search-results-item {
  color: rgba(255, 255, 255, 0.9);
}

.book.color-theme-2 #book-search-results .search-results .has-results .search-results-item a {
  color: #64b5f6;
}

/* Alert boxes in dark mode */
.book.color-theme-2 .alert {
  background: hsl(214, 9%, 15%);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.book.color-theme-2 .alert-success {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.3);
  color: #81c784;
}

.book.color-theme-2 .alert-info {
  background: rgba(100, 181, 246, 0.15);
  border-color: rgba(100, 181, 246, 0.3);
  color: #90caf9;
}

.book.color-theme-2 .alert-danger {
  background: rgba(244, 67, 54, 0.15);
  border-color: rgba(244, 67, 54, 0.3);
  color: #ef9a9a;
}

.book.color-theme-2 .alert-warning {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.3);
  color: #ffe082;
}

/* Scrollbar styling for dark mode */
.book.color-theme-2 ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.book.color-theme-2 ::-webkit-scrollbar-track {
  background: hsl(214, 9%, 12%);
}

.book.color-theme-2 ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.book.color-theme-2 ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Lists in dark mode */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal ul,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal ol {
  color: rgba(255, 255, 255, 0.9);
}

/* Strong and emphasis */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal strong {
  color: #ffffff;
}

.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal em {
  color: rgba(255, 255, 255, 0.85);
}

/* Images - add subtle border in dark mode */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal img {
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Keyboard keys */
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal kbd {
  background: hsl(214, 9%, 20%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 4px;
  padding: 2px 6px;
}
