/* Custom Explorills Theme - Dark Mode Only */

/* Import Roboto font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Root color variables */
:root {
  --md-primary-fg-color: #a147e1;
  --md-primary-fg-color--light: #b865e8;
  --md-primary-fg-color--dark: #8a35c7;
  --md-accent-fg-color: #a147e1;
  --md-accent-fg-color--transparent: rgba(161, 71, 225, 0.1);
  --border-radius: 6px;
}

/* Apply Roboto font globally */
body, .md-typeset {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
}

/* Dark mode background and surface colors */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #1d1d1d;
  --md-default-fg-color: #e0e0e0;
  --md-code-bg-color: #2a2a2a;
  --md-code-fg-color: #e0e0e0;
  
  /* Primary and accent colors */
  --md-primary-fg-color: #a147e1;
  --md-primary-fg-color--light: #b865e8;
  --md-primary-fg-color--dark: #8a35c7;
  --md-accent-fg-color: #a147e1;
  
  /* Border and decorative elements */
  --md-typeset-table-color: #3a393c;
  --md-typeset-table-color--light: rgba(58, 57, 60, 0.5);
  --md-default-fg-color--light: #9e9e9e;
  --md-default-fg-color--lighter: #6e6e6e;
  --md-default-fg-color--lightest: #4e4e4e;
}

/* Global border radius for minimalistic design */
* {
  border-radius: inherit;
}

.md-typeset code,
.md-typeset pre,
.md-typeset kbd,
.md-button,
.md-search__input,
.md-typeset .admonition,
.md-typeset details,
.md-typeset .grid.cards > :is(ul, ol) > li,
.md-typeset table,
.md-footer__link,
img {
  border-radius: var(--border-radius) !important;
}

/* Body and main content background */
body {
  background-color: #1d1d1d !important;
}

.md-main {
  background-color: #1d1d1d;
}

/* Header - Glassmorphism effect on scroll */
.md-header {
  background-color: #1d1d1d;
  backdrop-filter: none;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.md-header--shadow {
  background-color: rgba(29, 29, 29, 0.7) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 0 0.2rem rgba(161, 71, 225, 0.1), 0 0.2rem 0.5rem rgba(0, 0, 0, 0.4);
}

/* Navigation tabs - Same glassmorphism as header */
.md-tabs {
  background-color: #1d1d1d;
  backdrop-filter: none;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Apply glassmorphism when page is scrolled */
.md-header--shadow ~ .md-container .md-tabs,
.md-tabs[data-md-state="shadow"] {
  background-color: rgba(29, 29, 29, 0.7) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 0 0.2rem rgba(161, 71, 225, 0.1), 0 0.2rem 0.5rem rgba(0, 0, 0, 0.4);
}

/* Ensure tabs always have glassmorphism when header has shadow */
body:not(.md-header--lifted) .md-header--shadow ~ .md-container .md-tabs {
  background-color: rgba(29, 29, 29, 0.7) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
}

/* Links */
.md-typeset a {
  color: #a147e1;
}

.md-typeset a:hover {
  color: #b865e8;
}

/* Code blocks and inline code */
.md-typeset code {
  background-color: #a147e133;
  color: #ffffff !important;
  padding: 0.1em 0.4em;
  font-weight: 450;
}

/* Code blocks (multi-line) */
.md-typeset pre > code {
  background-color: #2a2a2a;
  color: #e8e8e8;
}

/* Slightly off-white for contract architecture and large code blocks */
.md-typeset pre {
  background-color: #2a2a2a;
}

.md-typeset pre code {
  color: #e8e8e8;
}

/* Borders and decorative lines */
.md-typeset hr {
  border-bottom-color: #3a393c;
}

.md-typeset table:not([class]) {
  border: 1px solid #3a393c;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  border-top: 1px solid #3a393c;
}

/* Cards */
.md-typeset .grid.cards > :is(ul, ol) > li {
  border: 1px solid #3a393c;
  background-color: rgba(42, 42, 42, 0.3);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.md-typeset .grid.cards > :is(ul, ol) > li:hover {
  border-color: #a147e1;
  box-shadow: 0 0 0 1px #a147e1, 0 4px 8px rgba(161, 71, 225, 0.2);
}

/* Admonitions - Use Material Design defaults only */
/* No custom colors - let Material Design handle all admonition styling */

/* Buttons */
.md-button {
  color: #a147e1;
  border: 1px solid #3a393c;
}

.md-button:hover {
  background-color: rgba(161, 71, 225, 0.1);
  border-color: #a147e1;
  color: #b865e8;
}

.md-button--primary {
  background-color: #a147e1;
  color: #ffffff;
  border: none;
}

.md-button--primary:hover {
  background-color: #b865e8;
}

/* Search */
.md-search__input {
  background-color: rgba(42, 42, 42, 0.5);
  border: 1px solid #3a393c;
}

.md-search__input:focus {
  border-color: #a147e1;
  box-shadow: 0 0 0 2px rgba(161, 71, 225, 0.2);
}

/* Sidebar */
.md-sidebar {
  background-color: #1d1d1d;
}

.md-nav__link--active {
  color: #a147e1;
}

.md-nav__link:hover {
  color: #b865e8;
}

/* Footer */
.md-footer {
  background-color: #1d1d1d;
  border-top: 1px solid #3a393c;
}

/* Footer navigation (Previous/Next) */
.md-footer__inner {
  background-color: #1d1d1d;
}

.md-footer__link {
  background-color: rgba(42, 42, 42, 0.3);
  border: 1px solid #3a393c;
  transition: border-color 0.25s, background-color 0.25s;
}

.md-footer__link:hover {
  background-color: rgba(161, 71, 225, 0.1);
  border-color: #a147e1;
}

.md-footer__title {
  background-color: transparent;
}

.md-footer__direction {
  color: #9e9e9e;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Content container */
.md-content {
  background-color: transparent;
}

/* Remove any light mode artifacts */
.md-typeset [data-md-color-scheme="default"] {
  display: none !important;
}
