/* Extra styles for Notifer documentation - Matches landing page theme */

/* ===== BRAND COLORS (from landing page) ===== */
:root {
  /* Primary gradient: blue → indigo */
  --md-primary-fg-color: #3b82f6;  /* blue-500 */
  --md-primary-fg-color--light: #6366f1;  /* indigo-500 */
  --md-primary-fg-color--dark: #4338ca;  /* indigo-700 */

  /* Accent colors */
  --md-accent-fg-color: #6366f1;  /* indigo-500 */
  --md-accent-fg-color--transparent: rgba(99, 102, 241, 0.1);

  /* Custom gradient */
  --notifer-gradient: linear-gradient(135deg, #3b82f6, #6366f1, #4f46e5);

  /* Dark mode background (matches landing) */
  --md-default-bg-color: #0f172a;  /* slate-900 */
  --md-default-fg-color: #f1f5f9;  /* slate-100 */
  --md-code-bg-color: rgba(15, 23, 42, 0.6);  /* darker slate */
}

/* Dark mode overrides */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0a0e1a;  /* matches landing page hero */
  --md-default-bg-color--light: #1e293b;  /* slate-800 */
  --md-code-bg-color: #0d1117;  /* matches landing code blocks */
  --md-code-fg-color: #e2e8f0;  /* slate-200 */

  /* Sidebar */
  --md-primary-bg-color: #0a0e1a;
  --md-primary-bg-color--light: #1e293b;
}

/* Light mode overrides - keep header dark, only content area light */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #3b82f6;
  --md-accent-fg-color: #6366f1;

  /* Light background for content only */
  --md-default-bg-color: #ffffff;
  --md-default-fg-color: #1e293b;
}

/* Light mode - keep header and tabs dark like in dark mode */
[data-md-color-scheme="default"] .md-header {
  background: linear-gradient(to bottom, rgba(10, 14, 26, 0.95), rgba(10, 14, 26, 0.8)) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

[data-md-color-scheme="default"] .md-tabs {
  background: linear-gradient(to bottom, rgba(10, 14, 26, 0.8), rgba(10, 14, 26, 0.5)) !important;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

/* Light mode - keep header elements white/light */
[data-md-color-scheme="default"] .md-header__topic,
[data-md-color-scheme="default"] .md-tabs__link,
[data-md-color-scheme="default"] .md-header__button,
[data-md-color-scheme="default"] .md-search__icon {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-md-color-scheme="default"] .md-tabs__link:hover,
[data-md-color-scheme="default"] .md-tabs__link--active {
  color: white !important;
}

[data-md-color-scheme="default"] .md-logo img,
[data-md-color-scheme="default"] .md-logo svg {
  filter: brightness(0) saturate(100%) invert(67%) sepia(73%) saturate(466%) hue-rotate(188deg) brightness(103%) contrast(96%) !important;
}

/* ===== HEADER / NAVIGATION ===== */

/* Top header bar - matches landing sticky navbar */
.md-header {
  background: linear-gradient(to bottom, rgba(10, 14, 26, 0.95), rgba(10, 14, 26, 0.8));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Logo styling - matches landing */
.md-logo img,
.md-logo svg {
  filter: brightness(0) saturate(100%) invert(67%) sepia(73%) saturate(466%) hue-rotate(188deg) brightness(103%) contrast(96%);  /* Light blue #60a5fa */
  transition: filter 0.2s ease;
  width: 28px;
  height: 28px;
}

.md-logo:hover img,
.md-logo:hover svg {
  filter: brightness(0) saturate(100%) invert(82%) sepia(21%) saturate(1096%) hue-rotate(188deg) brightness(104%) contrast(97%);  /* Lighter #93c5fd */
}

/* Site name next to logo - keep static, don't change */
.md-header__title {
  font-weight: 700;
  font-size: 1.25rem;
}

/* First topic (site name) - always visible */
.md-header__ellipsis > .md-header__topic:first-child {
  position: static !important;
  color: white !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Second topic (breadcrumb) - completely hide */
.md-header__ellipsis > .md-header__topic:nth-child(2) {
  display: none !important;
}

/* Top navigation buttons */
.md-header-nav__button,
.md-header__button {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Color scheme toggle icon */
.md-header__button.md-icon svg {
  color: rgba(255, 255, 255, 0.8) !important;
}

.md-header__button.md-icon:hover svg {
  color: white !important;
}

/* Navigation tabs - matches landing nav */
.md-tabs {
  background: linear-gradient(to bottom, rgba(10, 14, 26, 0.8), rgba(10, 14, 26, 0.5));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.md-tabs__link {
  color: rgba(255, 255, 255, 0.7) !important;  /* White with opacity */
  opacity: 1;
  transition: color 0.3s ease;
}

.md-tabs__link:hover {
  color: rgba(255, 255, 255, 0.9) !important;
}

.md-tabs__link--active {
  color: white !important;
  border-bottom: 2px solid #60a5fa;
}

/* ===== SIDEBAR ===== */

/* Sidebar navigation */
.md-nav--primary .md-nav__link--active {
  color: #60a5fa !important;
  font-weight: 600;
}

.md-nav__link {
  color: rgba(255, 255, 255, 0.8) !important;
}

.md-nav__link:hover {
  color: #93c5fd !important;
}

/* ===== CONTENT ===== */

/* Main content area */
.md-content {
  margin-top: 0;
}

/* Typography improvements - optimized for readability */
.md-typeset {
  font-size: 0.875rem;  /* 14px - standard doc size */
  line-height: 1.6;
  color: #cbd5e1;  /* slate-300 */
}

[data-md-color-scheme="default"] .md-typeset {
  color: #334155;  /* slate-700 */
}

/* Headers - smaller, cleaner, more readable */
.md-typeset h1 {
  font-weight: 700;
  font-size: 1.75rem;  /* 28px - reduced from 40px */
  background: var(--notifer-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.25rem;
  margin-top: 0;
  letter-spacing: -0.025em;
}

.md-typeset h2 {
  font-weight: 600;
  font-size: 1.5rem;  /* 24px - reduced from 30px */
  color: #e2e8f0;  /* slate-200 */
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  padding-bottom: 0.375rem;
  letter-spacing: -0.0125em;
}

[data-md-color-scheme="default"] .md-typeset h2 {
  color: #1e293b;  /* slate-800 */
}

.md-typeset h3 {
  font-weight: 600;
  font-size: 1.125rem;  /* 18px - explicit size */
  color: #94a3b8;  /* slate-400 */
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

[data-md-color-scheme="default"] .md-typeset h3 {
  color: #475569;  /* slate-600 */
}

.md-typeset h4 {
  font-weight: 600;
  font-size: 1rem;  /* 16px */
  color: #94a3b8;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

[data-md-color-scheme="default"] .md-typeset h4 {
  color: #64748b;  /* slate-500 */
}

/* ===== CODE BLOCKS ===== */

/* Code blocks - matches landing style */
.md-typeset pre {
  background: #0d1117;  /* matches landing */
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.md-typeset code {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;  /* indigo-400 */
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-weight: 500;
}

.md-typeset pre code {
  background: transparent;
  color: #e2e8f0;  /* slate-200 */
  padding: 0;
}

/* Inline code in light mode */
[data-md-color-scheme="default"] .md-typeset code {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

/* ===== ADMONITIONS ===== */

/* Info/Tip boxes - gradient border like landing cards */
.md-typeset .admonition {
  border-left: 4px solid;
  border-radius: 0.5rem;
  background: rgba(99, 102, 241, 0.05);
  backdrop-filter: blur(8px);
}

.md-typeset .admonition.tip {
  border-color: #10b981;  /* green-500 */
  background: rgba(16, 185, 129, 0.05);
}

.md-typeset .admonition.warning {
  border-color: #f59e0b;  /* amber-500 */
  background: rgba(245, 158, 11, 0.05);
}

.md-typeset .admonition.danger,
.md-typeset .admonition.error {
  border-color: #ef4444;  /* red-500 */
  background: rgba(239, 68, 68, 0.05);
}

.md-typeset .admonition.info,
.md-typeset .admonition.note {
  border-color: #3b82f6;  /* blue-500 */
  background: rgba(59, 130, 246, 0.05);
}

/* ===== BUTTONS & LINKS ===== */

/* Primary buttons with gradient (like landing CTA) */
.md-button--primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

.md-button--primary:hover {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

/* Links with blue-indigo theme */
.md-typeset a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.md-typeset a:hover {
  color: #6366f1;
  text-decoration: underline;
}

/* ===== TABLES ===== */

/* Tables with better styling */
.md-typeset table:not([class]) {
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.5rem;
  overflow: hidden;
  font-size: 0.9em;
}

.md-typeset table:not([class]) th {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.15));
  color: #e2e8f0;
  font-weight: 600;
  padding: 0.75rem 1rem;
}

[data-md-color-scheme="default"] .md-typeset table:not([class]) th {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
  color: #1e293b;
}

.md-typeset table:not([class]) td {
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  padding: 0.75rem 1rem;
}

/* ===== GRID CARDS ===== */

/* Grid layout for cards (like landing features) */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.grid.cards > div {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.grid.cards > div:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
  transform: translateY(-4px);
}

/* ===== FOOTER ===== */

/* Footer styling - minimalist like landing */
.md-footer {
  background: linear-gradient(to bottom, #0a0e1a, #050810);
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.md-footer-meta {
  background: rgba(10, 14, 26, 0.8);
}

.md-footer__link {
  color: #94a3b8;
  transition: color 0.2s ease;
}

.md-footer__link:hover {
  color: #3b82f6;
}

/* ===== SEARCH ===== */

/* Search icon in header */
.md-search__icon {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Search box styling */
.md-search__input {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 0.5rem;
  color: white !important;
}

.md-search__input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

.md-search__input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Search results */
.md-search__output {
  background: #1e293b;
}

.md-search-result__meta {
  color: rgba(255, 255, 255, 0.7);
}

.md-search-result__title {
  color: white;
}

.md-search-result__article {
  color: rgba(255, 255, 255, 0.8);
}

.md-search-result__item:hover {
  background: rgba(99, 102, 241, 0.1);
}

/* ===== ANIMATIONS ===== */

/* Smooth transitions everywhere */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade-in animation for content */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.md-content__inner {
  animation: fadeIn 0.5s ease-out;
}

/* ===== SCROLLBAR (Dark theme) ===== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 76.1875em) {
  .md-typeset h1 {
    font-size: 2rem;
  }

  .md-typeset h2 {
    font-size: 1.5rem;
  }
}
