/* Circuit KYC Custom Theme - Matching main site design */
/* Color Palette: Dark slate + Cyan/Purple accents */

:root {
  /* Primary Colors */
  --md-primary-fg-color: #0ea5e9;
  --md-primary-fg-color--light: #38bdf8;
  --md-primary-fg-color--dark: #0284c7;

  /* Accent Colors */
  --md-accent-fg-color: #a855f7;
  --md-accent-fg-color--transparent: rgba(168, 85, 247, 0.1);

  /* Custom Circuit Colors */
  --circuit-cyan: #0ea5e9;
  --circuit-purple: #a855f7;
  --circuit-dark: #0f172a;
  --circuit-darker: #020617;
  --circuit-slate-800: #1e293b;
  --circuit-slate-700: #334155;
  --circuit-slate-600: #475569;
  --circuit-slate-500: #64748b;
  --circuit-slate-400: #94a3b8;
  --circuit-slate-300: #cbd5e1;
  --circuit-slate-200: #e2e8f0;
}

/* Force dark mode only - no light mode toggle */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0f172a;
  --md-default-fg-color: #e2e8f0;
  --md-default-fg-color--light: #cbd5e1;
  --md-default-fg-color--lighter: #94a3b8;
  --md-default-fg-color--lightest: #64748b;

  /* Code blocks */
  --md-code-bg-color: #1e293b;
  --md-code-fg-color: #e2e8f0;
  --md-code-hl-color: rgba(14, 165, 233, 0.2);

  /* Typeset */
  --md-typeset-color: #e2e8f0;
  --md-typeset-a-color: #0ea5e9;

  /* Footer */
  --md-footer-bg-color: #020617;
  --md-footer-bg-color--dark: #020617;
  --md-footer-fg-color: #94a3b8;
  --md-footer-fg-color--light: #64748b;
  --md-footer-fg-color--lighter: #475569;
}

/* Header styling */
.md-header {
  background: linear-gradient(180deg, #0f172a 0%, rgba(15, 23, 42, 0.95) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(14, 165, 233, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.md-header__button.md-logo {
  padding: 0;
}

.md-header__title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Navigation tabs */
.md-tabs {
  background: #0f172a;
  border-bottom: 1px solid rgba(14, 165, 233, 0.1);
}

.md-tabs__link {
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.7rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  opacity: 1;
  color: #0ea5e9;
}

/* Sidebar navigation */
.md-nav__title {
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.65rem;
}

.md-nav__link {
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.md-nav__link:hover {
  color: #0ea5e9;
}

.md-nav__link--active {
  color: #0ea5e9;
  font-weight: 600;
}

.md-nav__item--active > .md-nav__link {
  color: #0ea5e9;
}

/* Content area */
.md-content {
  background: #0f172a;
}

.md-typeset {
  font-size: 0.85rem;
  line-height: 1.7;
}

/* Headings with gradient effect */
.md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #0ea5e9, #a855f7) 1;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f9;
  margin-top: 2em;
}

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

/* Links with cyan accent */
.md-typeset a {
  color: #0ea5e9;
  text-decoration: none;
  transition: all 0.2s ease;
}

.md-typeset a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* Code blocks with slate background */
.md-typeset code {
  background: #1e293b;
  color: #0ea5e9;
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.md-typeset pre {
  background: #1e293b;
  border-radius: 12px;
  border: 1px solid rgba(14, 165, 233, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.md-typeset pre > code {
  background: transparent;
  border: none;
  color: #e2e8f0;
  padding: 1em;
}

/* Syntax highlighting adjustments */
.highlight .c,
.highlight .c1,
.highlight .cm {
  color: #64748b;
}

.highlight .s,
.highlight .s1,
.highlight .s2 {
  color: #34d399;
}

.highlight .k,
.highlight .kn,
.highlight .kd {
  color: #a855f7;
}

.highlight .n,
.highlight .na,
.highlight .nb {
  color: #e2e8f0;
}

.highlight .nf,
.highlight .nc {
  color: #0ea5e9;
}

.highlight .mi,
.highlight .mf {
  color: #f59e0b;
}

/* Tables with circuit styling */
.md-typeset table:not([class]) {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(14, 165, 233, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.md-typeset table:not([class]) th {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(168, 85, 247, 0.1));
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 1em;
}

.md-typeset table:not([class]) td {
  background: #1e293b;
  border-color: rgba(14, 165, 233, 0.1);
  padding: 0.8em 1em;
}

.md-typeset table:not([class]) tr:hover td {
  background: rgba(14, 165, 233, 0.05);
}

/* Admonitions with circuit styling */
.md-typeset .admonition,
.md-typeset details {
  background: #1e293b;
  border-radius: 12px;
  border: 1px solid rgba(14, 165, 233, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.md-typeset .admonition-title,
.md-typeset details summary {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(168, 85, 247, 0.1));
  font-weight: 600;
}

.md-typeset .admonition.note,
.md-typeset details.note {
  border-left: 4px solid #0ea5e9;
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left: 4px solid #f59e0b;
}

.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-left: 4px solid #ef4444;
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left: 4px solid #10b981;
}

.md-typeset .admonition.info,
.md-typeset details.info {
  border-left: 4px solid #a855f7;
}

/* Buttons/CTAs */
.md-typeset .md-button {
  background: linear-gradient(135deg, #0ea5e9, #a855f7);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 600;
  padding: 0.8em 1.5em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.md-typeset .md-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(14, 165, 233, 0.4);
}

.md-typeset .md-button--primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

/* Search */
.md-search__form {
  background: #1e293b;
  border-radius: 8px;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.md-search__input {
  color: #e2e8f0;
}

.md-search__input::placeholder {
  color: #64748b;
}

.md-search-result {
  background: #0f172a;
}

.md-search-result__link:hover {
  background: rgba(14, 165, 233, 0.1);
}

.md-search-result__meta {
  color: #64748b;
}

/* Footer */
.md-footer {
  background: #020617;
  border-top: 1px solid rgba(14, 165, 233, 0.1);
}

.md-footer-meta {
  background: #020617;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Copy button for code blocks */
.md-clipboard {
  color: #64748b;
}

.md-clipboard:hover {
  color: #0ea5e9;
}

/* Content tabs */
.md-typeset .tabbed-set {
  border-radius: 12px;
  overflow: hidden;
}

.md-typeset .tabbed-labels {
  background: #1e293b;
  border-bottom: 1px solid rgba(14, 165, 233, 0.15);
}

.md-typeset .tabbed-labels > label {
  color: #94a3b8;
  font-weight: 500;
}

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

.md-typeset .tabbed-set > input:checked + label {
  color: #0ea5e9;
  border-color: #0ea5e9;
}

/* Table of contents */
.md-nav--secondary .md-nav__link {
  color: #94a3b8;
}

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

.md-nav--secondary .md-nav__link--active {
  color: #0ea5e9;
}

/* Glow effect for hero elements */
.md-typeset h1::after {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #0ea5e9, #a855f7, transparent);
  margin-top: 0.5em;
  border-radius: 1px;
}

/* Animated gradient border for important sections */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.md-typeset blockquote {
  background: #1e293b;
  border-left: 4px solid;
  border-image: linear-gradient(180deg, #0ea5e9, #a855f7) 1;
  border-radius: 0 12px 12px 0;
  padding: 1em 1.5em;
}

/* List styling */
.md-typeset ul li::marker,
.md-typeset ol li::marker {
  color: #0ea5e9;
}

/* Horizontal rules */
.md-typeset hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #0ea5e9, #a855f7, transparent);
  margin: 2em 0;
}

/* Selection color */
::selection {
  background: rgba(14, 165, 233, 0.3);
  color: #ffffff;
}

/* Kbd styling */
.md-typeset kbd {
  background: #334155;
  border: 1px solid #475569;
  color: #e2e8f0;
  border-radius: 4px;
  box-shadow: 0 2px 0 #1e293b;
}

/* Source file link */
.md-source {
  color: #94a3b8;
}

.md-source:hover {
  color: #0ea5e9;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 76.1875em) {
  .md-nav--primary .md-nav__title {
    background: #0f172a;
    color: #ffffff;
  }

  .md-nav--primary .md-nav__title[for="__drawer"] {
    background: linear-gradient(135deg, #0ea5e9, #a855f7);
  }
}

/* Improve readability for long content */
.md-typeset p {
  color: #cbd5e1;
}

/* Version selector if using mike */
.md-version {
  background: #1e293b;
  border-radius: 6px;
}

.md-version__current {
  color: #0ea5e9;
}
