
/* Custom styles for BSharp documentation */

.hljs {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
}

.rust {
    border-left: 4px solid #f74c00;
}

.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 12px;
    margin: 16px 0;
}

.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 12px;
    margin: 16px 0;
}

.sidebar .chapter-item {
    margin: 2px 0;
}

.content h1, .content h2, .content h3 {
    border-bottom: 1px solid #eaecef;
    padding-bottom: 8px;
}

code {
    background-color: rgba(27,31,35,0.05);
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 85%;
}

/* Improve table styling */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}

th, td {
    border: 1px solid #dfe2e5;
    padding: 8px 12px;
    text-align: left;
}

th {
    background-color: #f6f8fa;
    font-weight: 600;
}

/* BSharp site-aligned theming */
html {
  background-image:
    radial-gradient(800px 500px at 15% 10%, rgba(59,130,246,0.18), transparent 60%),
    radial-gradient(700px 480px at 85% 20%, rgba(236,72,153,0.14), transparent 60%),
    radial-gradient(900px 520px at 50% 95%, rgba(245,158,11,0.12), transparent 60%);
  background-attachment: fixed;
}

.page {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.sidebar {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

html.coal .page,
html.dark .page {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

html.coal .sidebar,
html.dark .sidebar {
  background: rgba(15, 23, 42, 0.6);
  border-right-color: rgba(255, 255, 255, 0.08);
}

#menu-bar {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

html.coal #menu-bar,
html.dark #menu-bar {
  background: rgba(15, 23, 42, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.icon-button { border-radius: 0.5rem; transition: all 0.2s ease; }
.icon-button:hover { background: rgba(0, 0, 0, 0.06); }
html.coal .icon-button:hover,
html.dark .icon-button:hover { background: rgba(255, 255, 255, 0.08); }

.sidebar a:hover { background: rgba(59, 130, 246, 0.10); border-radius: 0.375rem; }
.sidebar .current { background: rgba(59, 130, 246, 0.15); border-radius: 0.375rem; font-weight: 500; }

html.coal pre,
html.coal code,
html.dark pre,
html.dark code {
  background: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid #333;
  border-radius: 0.5rem;
}

.content { font-family: 'Inter', 'Open Sans', sans-serif; line-height: 1.7; }

.admonish {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
}

html.coal .admonish,
html.dark .admonish {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.search-results {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
}

html.coal .search-results,
html.dark .search-results {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

* { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
