/* Custom CSS for improved compatibility with sphinx-book-theme */

/* General page styling */
:root {
  --mole-primary: #1a73e8;
  --mole-secondary: #4285f4;
  --mole-accent: #34a853;
}

/* Dark mode overrides */
html[data-theme="dark"] {
  --pst-color-primary: var(--mole-primary);
  --pst-color-secondary: var(--mole-secondary);
  --pst-color-link: #81a9e3;
  --pst-color-link-hover: #a8c6f0;
  background-color: #1a1a1a;
  color: #e6e6e6;
}

/* Light mode overrides */
html[data-theme="light"] {
  --pst-color-primary: var(--mole-primary);
  --pst-color-secondary: var(--mole-secondary);
}

/* Enhance grid cards */
.features-grid .sd-card {
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
}

.features-grid .sd-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.features-grid .sd-card-title {
  font-weight: 600;
  color: var(--mole-primary);
}

/* Quick links styling */
.quick-links.sd-card {
  border-left: 4px solid var(--mole-primary);
}

.quick-links .sd-card-header {
  font-size: 1.5rem;
  font-weight: 600;
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Fix code block appearance */
div.highlight {
  border-radius: 0.4rem;
}

.highlight button.copybtn {
  opacity: 0.3;
}

.highlight:hover button.copybtn {
  opacity: 1;
}

/* Fix admonition appearance */
.admonition {
  border-radius: 0.4rem;
  margin: 1.5rem 0;
}

.admonition-title {
  font-weight: 600;
}

/* Fix tab appearance */
.sphinx-tabs {
  margin: 1.5rem 0;
}

/* Fix dropdown appearance */
details.dropdown {
  margin: 1.5rem 0;
}

details.dropdown summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--mole-primary);
}

details.dropdown[open] summary {
  margin-bottom: 0.5rem;
}

/* Lead text styling */
.lead {
  font-size: 1.2rem;
  color: #666;
  font-weight: 300;
}

/* Add responsive control for larger screens */
@media (min-width: 992px) {
  .container, .container-lg, .container-md, .container-sm {
    max-width: 1140px;
  }
}

/* Custom styling for MOLE documentation using sphinx-book-theme */

/* ===== BASIC STYLING ===== */

/* Typography enhancements */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

h1 {
    border-bottom: 3px solid #3498db;
  padding-bottom: 0.5rem;
}

h2 {
    border-left: 4px solid #3498db;
    padding-left: 10px;
}

h3 {
    border-bottom: 1px dotted #3498db;
    padding-bottom: 5px;
}

/* Code styling */
pre {
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Table styling */
table {
  margin: 1rem 0;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem;
  border: 1px solid #e1e4e5;
}

tbody tr:nth-child(odd) {
  background-color: #f3f6f6;
}

/* Admonition styling */
.admonition {
  border-radius: 5px;
  margin: 1.5rem 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ===== MATLAB SPECIFIC STYLING ===== */

/* MATLAB code blocks */
.highlight-matlab pre,
.matlab-code {
  background-color: #f5f5f5;
  border-left: 3px solid #0076a8;
}

/* ===== CATEGORY ICONS ===== */

.operator-icon {
    color: #e74c3c;
}

.boundary-icon {
    color: #2ecc71;
}

.utils-icon {
    color: #f39c12;
}

.matlab-icon {
    color: #0076a8;
}

/* ===== DOXYGEN INTEGRATION ===== */

.breathe-sectiondef {
    padding-bottom: 10px;
}

.breathe-sectiondef-title {
    font-size: 1.1em;
  font-weight: 600;
    margin-bottom: 10px;
}

/* ===== GRAPHVIZ DIAGRAMS ===== */

.graphviz {
  text-align: center;
  margin: 30px 0;
}

.graphviz svg {
    max-width: 100%;
    height: auto;
}

/* ===== RESPONSIVE TABLES ===== */

/* Make tables responsive */
@media screen and (max-width: 600px) {
  table.responsive-table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
  
  table.responsive-table thead, 
  table.responsive-table tbody, 
  table.responsive-table th, 
  table.responsive-table td, 
  table.responsive-table tr {
    display: block;
  }
  
  table.responsive-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  table.responsive-table tr { 
    border: 1px solid #ddd; 
    margin-bottom: 10px;
  }
  
  table.responsive-table td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%;
    white-space: normal;
    text-align: left;
  }
  
  table.responsive-table td:before {
    content: attr(data-title);
    position: absolute;
    top: 6px;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
  }
}

/* Dark mode code highlighting */
html[data-theme="dark"] pre {
  background-color: #2d2d2d;
  color: #e6e6e6;
  border: 1px solid #444;
}

html[data-theme="dark"] .highlight {
  background-color: #2d2d2d;
}

html[data-theme="dark"] .highlight .n { color: #e6e6e6; } /* Name */
html[data-theme="dark"] .highlight .k { color: #cc99cc; } /* Keyword */
html[data-theme="dark"] .highlight .kd { color: #cc99cc; } /* Keyword.Declaration */
html[data-theme="dark"] .highlight .nf { color: #6699cc; } /* Name.Function */
html[data-theme="dark"] .highlight .s { color: #99cc99; } /* String */
html[data-theme="dark"] .highlight .s1 { color: #99cc99; } /* String.Single */
html[data-theme="dark"] .highlight .s2 { color: #99cc99; } /* String.Double */
html[data-theme="dark"] .highlight .c { color: #999999; } /* Comment */
html[data-theme="dark"] .highlight .c1 { color: #999999; } /* Comment.Single */
html[data-theme="dark"] .highlight .cm { color: #999999; } /* Comment.Multiline */
html[data-theme="dark"] .highlight .o { color: #f99157; } /* Operator */
html[data-theme="dark"] .highlight .p { color: #e6e6e6; } /* Punctuation */
html[data-theme="dark"] .highlight .mi { color: #f99157; } /* Number.Integer */
html[data-theme="dark"] .highlight .mf { color: #f99157; } /* Number.Float */

/* Dark mode table styles */
html[data-theme="dark"] th,
html[data-theme="dark"] td {
  border: 1px solid #444;
}

html[data-theme="dark"] tbody tr:nth-child(odd) {
  background-color: #2d2d2d;
}

/* Dark mode admonition styles */
html[data-theme="dark"] .admonition {
  background-color: #2d2d2d;
  border: 1px solid #444;
}

/* Enhanced landing page styles */
.hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, var(--pst-color-primary), var(--pst-color-info));
    color: white;
    border-radius: 8px;
}

.bold-title {
    font-weight: 700;
    font-size: 2.5rem;
}

/* Feature grid styling */
.feature-grid {
    margin: 2rem 0;
}

.feature-card {
    transition: transform 0.2s;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* Key features section */
.key-features .sd-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.key-features .sd-card-header {
    border-radius: 8px 8px 0 0;
}

/* Quick links section */
.quick-link-card {
    transition: all 0.2s;
    border: 1px solid var(--pst-color-border);
}

.quick-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--pst-color-primary);
}

/* TOC styling */
.toctree-wrapper {
    margin: 2rem 0;
    padding: 1rem;
    background: var(--pst-color-surface);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toctree-wrapper .caption {
    color: var(--pst-color-primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.toctree-wrapper ul {
    margin-left: 1.5rem;
}

.toctree-wrapper li {
    margin: 0.5rem 0;
}

/* Section-specific TOC styling */
.getting-started-toc {
    border-left: 4px solid var(--pst-color-success);
}

.api-toc {
    border-left: 4px solid var(--pst-color-info);
}

.math-toc {
    border-left: 4px solid var(--pst-color-warning);
}

.examples-toc {
    border-left: 4px solid var(--pst-color-danger);
}

.project-toc {
    border-left: 4px solid var(--pst-color-primary);
} 