/* Modern styling for PyLogShield documentation */

:root {
  /* Custom color palette */
  --md-primary-fg-color: #7c4dff;
  --md-primary-fg-color--light: #b47cff;
  --md-primary-fg-color--dark: #651fff;
  --md-accent-fg-color: #ffab00;

  /* Typography improvements */
  --md-text-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --md-code-font: "JetBrains Mono", "Fira Code", "Consolas", monospace;
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0d1117;
  --md-default-fg-color--light: #8b949e;
  --md-code-bg-color: #161b22;
}

/* Content width */
.md-grid {
  max-width: 1400px;
}

/* Header styling */
.md-header {
  background: linear-gradient(135deg, var(--md-primary-fg-color--dark) 0%, var(--md-primary-fg-color) 100%);
}

/* Navigation tabs */
.md-tabs {
  background: rgba(0, 0, 0, 0.1);
}

/* Code blocks */
.highlight {
  border-radius: 8px;
  overflow: hidden;
}

.highlight code {
  font-size: 0.85em;
  line-height: 1.6;
}

/* Inline code */
code:not(.highlight code) {
  background-color: var(--md-code-bg-color);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

/* Admonitions */
.admonition {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: white;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color--dark);
}

/* Cards/Feature boxes */
.feature-card {
  background: var(--md-code-bg-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Buttons */
.md-button {
  border-radius: 8px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.md-button--primary {
  background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-primary-fg-color--dark) 100%);
  border: none;
}

.md-button--primary:hover {
  background: linear-gradient(135deg, var(--md-primary-fg-color--light) 0%, var(--md-primary-fg-color) 100%);
}

/* Footer */
.md-footer {
  background: var(--md-default-bg-color--light);
}

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

/* TOC */
.md-nav__link {
  font-size: 0.75rem;
}

/* API reference improvements */
.doc-heading {
  border-bottom: 2px solid var(--md-primary-fg-color);
  padding-bottom: 0.5rem;
}

.doc-signature {
  background: var(--md-code-bg-color);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

/* Tabs styling */
.md-typeset .tabbed-set {
  border-radius: 8px;
  overflow: hidden;
}

.md-typeset .tabbed-labels {
  background: var(--md-code-bg-color);
}

/* Copy button */
.md-clipboard {
  border-radius: 4px;
}

/* Hero section (for index page) */
.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--md-default-fg-color--light);
  max-width: 600px;
  margin: 0 auto 2rem;
}

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

.feature-item {
  background: var(--md-code-bg-color);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(128, 128, 128, 0.2);
}

.feature-item h3 {
  margin-top: 0;
  color: var(--md-primary-fg-color);
}

/* Badge styling */
.badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75em;
  font-weight: 600;
  border-radius: 4px;
  background: var(--md-primary-fg-color);
  color: white;
  margin-right: 0.5em;
}

.badge--new {
  background: #00c853;
}

.badge--beta {
  background: #ff9100;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Responsive adjustments */
@media screen and (max-width: 76.25em) {
  .hero h1 {
    font-size: 2rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

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