/* NeoPKPD Custom Styles */

/* ================================
   Color Palette
   ================================ */
:root {
  --neopkpd-primary: #3F51B5;
  --neopkpd-accent: #673AB7;
  --neopkpd-julia: #9558B2;
  --neopkpd-python: #3776AB;
  --neopkpd-success: #4CAF50;
  --neopkpd-warning: #FF9800;
  --neopkpd-error: #F44336;
  --neopkpd-info: #2196F3;
}

/* ================================
   Typography
   ================================ */
.md-typeset h1 {
  font-weight: 700;
  margin-bottom: 0.5em;
}

.md-typeset h2 {
  font-weight: 600;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  padding-bottom: 0.3em;
  margin-top: 1.5em;
}

.md-typeset h3 {
  font-weight: 600;
}

/* ================================
   Code Blocks
   ================================ */
.md-typeset code {
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

/* Julia code blocks */
.language-julia {
  background: linear-gradient(to right, rgba(149, 88, 178, 0.05), transparent);
  border-left: 3px solid var(--neopkpd-julia);
}

/* Python code blocks */
.language-python {
  background: linear-gradient(to right, rgba(55, 118, 171, 0.05), transparent);
  border-left: 3px solid var(--neopkpd-python);
}

/* Shell/Bash code blocks */
.language-bash,
.language-shell {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.03), transparent);
  border-left: 3px solid #666;
}

/* ================================
   Tables
   ================================ */
.md-typeset table:not([class]) {
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
}

.md-typeset table:not([class]) td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset table:not([class]) tr:hover {
  background-color: rgba(0,0,0,0.02);
}

/* ================================
   Cards Grid
   ================================ */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.grid.cards > * {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.grid.cards > *:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ================================
   Admonitions
   ================================ */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 8px;
  border-left-width: 4px;
}

.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: var(--neopkpd-info);
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: var(--neopkpd-success);
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-color: var(--neopkpd-warning);
}

.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-color: var(--neopkpd-error);
}

/* ================================
   Hero Section
   ================================ */
.hero-section {
  background: linear-gradient(135deg, var(--neopkpd-primary), var(--neopkpd-accent));
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin: 1rem 0 2rem 0;
  text-align: center;
}

.hero-section h2 {
  color: white;
  border: none;
  margin: 0 0 0.5rem 0;
}

.hero-section p {
  opacity: 0.9;
  margin: 0;
  font-size: 1.1rem;
}

/* ================================
   Navigation
   ================================ */
.md-nav__link {
  font-size: 0.85rem;
}

.md-nav__item--nested > .md-nav__link {
  font-weight: 600;
}

/* ================================
   Footer
   ================================ */
.md-footer-meta {
  background: var(--md-primary-fg-color);
}

/* ================================
   Mermaid Diagrams
   ================================ */
.mermaid {
  background: var(--md-default-bg-color);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

/* ================================
   Math (MathJax)
   ================================ */
.MathJax {
  font-size: 1.1em !important;
}

/* ================================
   Responsive Adjustments
   ================================ */
@media screen and (max-width: 76.1875em) {
  .grid.cards {
    grid-template-columns: 1fr;
  }
}

/* ================================
   Search
   ================================ */
.md-search__form {
  border-radius: 8px;
}

/* ================================
   Tabs
   ================================ */
.md-typeset .tabbed-set > input:checked + label {
  border-color: var(--md-primary-fg-color);
}

/* ================================
   Language Badges
   ================================ */
.language-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 0.5rem;
}

.language-badge.julia {
  background-color: var(--neopkpd-julia);
  color: white;
}

.language-badge.python {
  background-color: var(--neopkpd-python);
  color: white;
}

/* ================================
   Parameter Tables
   ================================ */
.param-table th:first-child {
  width: 120px;
}

.param-table td:first-child {
  font-family: var(--md-code-font-family);
  font-weight: 600;
}

/* ================================
   Version Badge
   ================================ */
.version-badge {
  display: inline-block;
  background: var(--md-primary-fg-color);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ================================
   Function Signatures
   ================================ */
.function-signature {
  background: var(--md-code-bg-color);
  padding: 1rem;
  border-radius: 8px;
  font-family: var(--md-code-font-family);
  overflow-x: auto;
}

.function-signature .param {
  color: var(--neopkpd-info);
}

.function-signature .type {
  color: var(--neopkpd-accent);
}

/* ================================
   Print Styles
   ================================ */
@media print {
  .md-sidebar,
  .md-header,
  .md-footer {
    display: none;
  }

  .md-content {
    margin: 0;
    max-width: 100%;
  }
}
