/* ============================================================
   NANOCONDA DOCS — extra.css
   MkDocs Material theme overrides to match nanoconda.com
   ============================================================ */

/* ===== 1. Material CSS Variable Overrides ===== */
:root,
[data-md-color-scheme="slate"] {
  /* Backgrounds */
  --md-default-bg-color:          #070d18;
  --md-default-bg-color--light:   #0b1525;
  --md-default-bg-color--lighter: #0f1e30;
  --md-default-bg-color--lightest:#142233;

  /* Text */
  --md-default-fg-color:          #c8ced6;
  --md-default-fg-color--light:   #a0b0c0;
  --md-default-fg-color--lighter: #7a8fa6;
  --md-default-fg-color--lightest:rgba(255,255,255,0.12);

  /* Primary (header + sidebar highlight) */
  --md-primary-fg-color:          #070d18;
  --md-primary-fg-color--light:   #0b1525;
  --md-primary-fg-color--dark:    #070d18;
  --md-primary-bg-color:          #c8ced6;
  --md-primary-bg-color--light:   #c8ced6;

  /* Accent (links, active, hover) */
  --md-accent-fg-color:           #1DC57D;
  --md-accent-fg-color--transparent: rgba(29,197,125,0.10);
  --md-accent-bg-color:           #041a10;

  /* Links */
  --md-typeset-a-color:           #1DC57D;

  /* Code */
  --md-code-bg-color:             #0b1525;
  --md-code-fg-color:             #c8d8e8;
  --md-code-hl-color:             rgba(29,197,125,0.15);
  --md-code-hl-number-color:      #e8c56d;
  --md-code-hl-special-color:     #f08080;
  --md-code-hl-function-color:    #6eb5ff;
  --md-code-hl-constant-color:    #c3a6ff;
  --md-code-hl-keyword-color:     #1DC57D;
  --md-code-hl-string-color:      #a8d8a8;
  --md-code-hl-name-color:        #c8d8e8;
  --md-code-hl-operator-color:    #7a8fa6;
  --md-code-hl-punctuation-color: #7a8fa6;
  --md-code-hl-comment-color:     #4a6070;
  --md-code-hl-generic-color:     #c8d8e8;
  --md-code-hl-variable-color:    #c8d8e8;

  /* Admonitions */
  --md-admonition-bg-color:       #0b1525;
  --md-admonition-fg-color:       #c8ced6;

  /* Footer */
  --md-footer-bg-color:           #070d18;
  --md-footer-bg-color--dark:     #050b14;
  --md-footer-fg-color:           #7a8fa6;
  --md-footer-fg-color--light:    #a0b0c0;
  --md-footer-fg-color--lighter:  #556878;

  /* Shadows */
  --md-shadow-z1:   0 1px 0 rgba(255,255,255,0.07), 0 2px 8px rgba(0,0,0,0.4);
  --md-shadow-z2:   0 4px 16px rgba(0,0,0,0.5);
  --md-shadow-z3:   0 8px 32px rgba(0,0,0,0.6);


  /* Tooltip */
  --md-tooltip-width: 40rem;
}

/* ===== 2. Google Font Import ===== */

/* ===== 3. Base ===== */
body {
  background: #070d18;
  -webkit-font-smoothing: antialiased;
}

/* ===== 4. Nanoconda Top Nav ===== */
.nc-topnav {
  background: rgba(7,13,24,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  top: 0;
  z-index: 10;
  width: 100%;
}

.nc-topnav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nc-topnav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nc-topnav__logo img {
  height: 28px;
  width: auto;
  display: block;
}

.nc-topnav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
  justify-content: flex-end;
}

.nc-topnav__links a {
  font-size: 13.5px;
  font-weight: 500;
  color: #a0b0c0;
  text-decoration: none;
  transition: color 0.22s ease;
}

.nc-topnav__links a:hover {
  color: #e8eef6;
}

.nc-topnav__active {
  font-size: 14.5px;
  font-weight: 600;
  color: #1DC57D;
  cursor: default;
}

.nc-topnav__cta {
  padding: 7px 18px;
  background: #1DC57D;
  color: #041a10 !important;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.22s ease, transform 0.22s ease;
  flex-shrink: 0;
}

.nc-topnav__cta:hover {
  background: #26DC8E;
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 768px) {
  .nc-topnav__links {
    display: none;
  }
}

@media (min-width: 1220px) {
  .md-sidebar {
	 top: 92px !important;
  }
}
@media (max-width: 1219px) {
  .md-sidebar {
	 z-index: 100;
	 top: 108px !important;
  }
}

/* ===== 5. Material Header ===== */
.md-header {
  background: #070d18;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: none;
  position: sticky;
  top: 60px; /* sit below nc-topnav */
}

.md-header[data-md-state="shadow"] {
  box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.md-header__title {
  font-size: 15px;
  font-weight: 600;
  color: #c8ced6;
  letter-spacing: 0.01em;
}

/* Search */
.md-search__form {
  background: #0b1525;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  transition: border-color 0.22s ease;
}

.md-search__form:focus-within {
  border-color: rgba(29,197,125,0.4);
}

.md-search__input {
  color: #c8ced6;
}

.md-search__input::placeholder {
  color: #7a8fa6;
}

.md-search__icon {
  color: #7a8fa6;
}

.md-search-result {
  background: #0b1525;
  border: 1px solid rgba(255,255,255,0.07);
}

.md-search-result__item {
  border-top: 1px solid rgba(255,255,255,0.05);
}

.md-search-result__link:hover,
.md-search-result__link:focus {
  background: rgba(29,197,125,0.07);
}

.md-search-result__meta {
  background: #0f1e30;
  color: #7a8fa6;
}

/* ===== 6. Sidebar / Navigation ===== */
.md-sidebar {
  background: #070d18;
}

.md-sidebar--primary {
  border-right: 1px solid rgba(255,255,255,0.06);
}

.md-nav {
  font-size: 14.5px;
}

.md-nav__title {
   display: none;
  color: #7a8fa6;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 5px 3px;
}

.md-nav__item .md-nav__link {
  color: #a0b0c0;
  border-radius: 4px;
  padding: 5px 12px;
  margin: 1px 0;
  transition: color 0.18s ease, background 0.18s ease;
}

.md-nav__item .md-nav__link:hover {
  color: #c8ced6;
  background: rgba(255,255,255,0.04);
}

.md-nav__item .md-nav__link--active,
.md-nav__item .md-nav__link--active:hover {
  color: #1DC57D;
  background: rgba(29,197,125,0.09);
  font-weight: 600;
}

.md-nav__item--section > .md-nav__link {
  font-weight: 600;
  color: #c8d8e8;
  font-size: 14px;
  letter-spacing: 0.02em;
}

/* TOC */
.md-nav--secondary .md-nav__link {
  color: #7a8fa6;
  font-size: 14.5px;
}

.md-nav--secondary .md-nav__link:hover {
  color: #c8ced6;
}

.md-nav--secondary .md-nav__link--active {
  color: #1DC57D;
  font-weight: 500;
}

/* ===== 7. Content Area ===== */
.md-content {
  background: #070d18;
}

.md-main {
  background: #070d18;
}

.md-typeset {
  color: #c8ced6;
  font-size: .82rem;
  line-height: 1.7;
}

/* Headings */
.md-typeset h1 {
  color: #c8ced6;
  font-weight: 700;
  letter-spacing: -0.025em;
  border-bottom: 1px solid rgba(29,197,125,0.25);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.md-typeset h2 {
  color: #c8d8e8;
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 8px;
}

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

.md-typeset h4, .md-typeset h5, .md-typeset h6 {
  color: #8aaabb;
}

/* Links */
.md-typeset a {
  color: #1DC57D;
  text-decoration: none;
  transition: color 0.18s ease;
}

.md-typeset a:hover {
  color: #26DC8E;
  text-decoration: underline;
}

/* ===== 8. Code Blocks ===== */
.md-typeset code {
  background: #0b1525;
  color: #a8d8a8;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  font-size: 0.82em;
  padding: 2px 6px;
}


.highlight .filename {
  background: #0f1e30;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: #7a8fa6;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px 6px 0 0;
}

/* Copy button */
.md-clipboard {
  color: #7a8fa6;
  transition: color 0.18s ease;
}

.md-clipboard:hover {
  color: #1DC57D;
}

/* ===== 9. Tables ===== */
.md-typeset table:not([class]) {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.md-typeset table:not([class]) th {
  background: #0f1e30;
  color: #c8ced6;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(29,197,125,0.2);
}

.md-typeset table:not([class]) td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #c8d8e8;
  vertical-align: top;
}

.md-typeset table:not([class]) tr:last-child td {
  border-bottom: none;
}

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

/* ===== 10. Admonitions ===== */
.md-typeset .admonition,
.md-typeset details {
  background: #0b1525;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  font-size: 0.8rem;
  box-shadow: none;
}

.md-typeset .admonition-title,
.md-typeset summary {
  background: #0f1e30;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-weight: 600;
  font-size: 0.8rem;
}

/* Tip → green */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left: 3px solid #1DC57D;
}
.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  color: #1DC57D;
}
.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before {
  background-color: #1DC57D;
}

/* Note → blue */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-left: 3px solid #5b9cf6;
}
.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  color: #5b9cf6;
}
.md-typeset .note > .admonition-title::before,
.md-typeset .note > summary::before {
  background-color: #5b9cf6;
}

/* Warning → amber */
.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left: 3px solid #e8a840;
}
.md-typeset .warning > .admonition-title,
.md-typeset .warning > summary {
  color: #e8a840;
}
.md-typeset .warning > .admonition-title::before,
.md-typeset .warning > summary::before {
  background-color: #e8a840;
}

/* Danger → red */
.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-left: 3px solid #e05555;
}
.md-typeset .danger > .admonition-title,
.md-typeset .danger > summary {
  color: #e05555;
}
.md-typeset .danger > .admonition-title::before,
.md-typeset .danger > summary::before {
  background-color: #e05555;
}

/* ===== 11. Material Grid Cards (index page) ===== */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid.cards > ol > li {
  background: #0b1525;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 20px 22px;
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid.cards > ol > li:hover {
  border-color: rgba(29,197,125,0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.md-typeset .grid.cards > ul > li hr,
.md-typeset .grid.cards > ol > li hr {
  border-color: rgba(255,255,255,0.07);
}

.md-typeset .grid.cards > ul > li p.card-title,
.md-typeset .grid.cards > ul > li strong,
.md-typeset .grid.cards > ol > li strong {
  color: #c8ced6;
  font-weight: 600;
}

/* ===== 12. Tabs ===== */
.md-typeset .tabbed-set > input + .tabbed-content {
  background: #0b1525;
  border: 1px solid rgba(255,255,255,0.07);
  border-top: none;
  border-radius: 0 0 6px 6px;
}

.md-typeset .tabbed-labels > label {
  color: #7a8fa6;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease;
}

.md-typeset .tabbed-labels > label:hover {
  color: #c8ced6;
}

.md-typeset .tabbed-set > input:checked + label,
.md-typeset .tabbed-labels > label.tabbed-label--active {
  color: #1DC57D;
  border-bottom-color: #1DC57D;
}

/* ===== 13. Keyboard Keys ===== */
.md-typeset kbd {
  background: #0f1e30;
  border: 1px solid rgba(255,255,255,0.12);
  border-bottom-width: 2px;
  color: #c8d8e8;
  border-radius: 4px;
  font-size: 0.78em;
}

/* ===== 14. Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #070d18; }
::-webkit-scrollbar-thumb { background: #1a2d44; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #234060; }

/* ===== 15. Footer ===== */
.md-footer {
  background: #050b14;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.md-footer-meta {
  display: none;
}

.md-footer__inner {
  padding: 12px 24px;
}

.md-footer-nav__link {
  color: #7a8fa6;
  transition: color 0.18s ease;
}

.md-footer-nav__link:hover {
  color: #1DC57D;
}

.md-footer-nav__title {
  color: #a0b0c0;
}

/* ===== 16. Tooltips ===== */
.md-tooltip {
  background: #0f1e30;
  border: 1px solid rgba(255,255,255,0.09);
  color: #c8d8e8;
  border-radius: 6px;
  font-size: 12.5px;
}

/* ===== 17. Tag / Badge ===== */
.md-tag {
  background: rgba(29,197,125,0.10);
  color: #1DC57D;
  border: 1px solid rgba(29,197,125,0.25);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ===== 18. Top progress bar ===== */
.md-progress__inner {
  background: #1DC57D;
}

/* ===== 19. Print / PDF ===== */
@media print {
  --md-primary-fg-color:  #ffffff;
  --md-primary-bg-color:  #000000;
  --md-accent-fg-color:   #00ff81;
  --md-default-fg-color:  #ffffff;
  --md-default-bg-color:  #000000;

  body { font-size: 16px !important; }

  h1, h2, h3 { border-bottom-color: #1bc492 !important; }
  h4, h5, h6 { font-size: 13px !important; }
  a          { font-size: 18px; }
  p, li      { font-size: 16px; }

  code {
    font-size: 14px !important;
    background-color: #fafbfa !important;
    margin: 0 !important;
  }

  footer, .footer { font-size: 14px !important; }

  @page {
    margin: 0.3in !important;
    @bottom-center {
      font-size: 13px !important;
      content: " " counter(page) "/" counter(pages) " " !important;
    }
    @bottom-right { font-size: 12px !important; }
    @top-right    { font-size: 12px !important; }
  }
}
