@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Noto+Sans+Kannada:wght@400;700&family=Poppins:wght@400;700&family=Tiro+Kannada&display=swap');

:root {
  --white: #ffffff;
  --black: #000000;
  --primary1: #7335b7;
  --primary1-light: #f8f4fc;
  --primary2: #f8842b;
  --textCol: #1f1f1f;
  --md-tooltip-width: 600px;
}
:root > * {
  --md-code-bg-color: var(--primary1-light);
  --md-code-fg-color: var(--textCol);
}
[data-md-color-scheme="slate"]:root > * {
  --md-code-bg-color: #232136;
  --md-code-fg-color: var(--white);
}

/* Header and footer styling */
.md-header, .md-footer {
  background: var(--primary1) !important;
  color: var(--white) !important;
}
/* Ensure header text and icons are white for contrast */
.md-header .md-nav__link, .md-header .md-nav__link--active, .md-header__title, .md-header__button, .md-header__topic, .md-footer__inner, .md-footer__title, .md-footer__link, .md-footer__button {
  color: var(--white) !important;
  font-weight: 500; /* Slightly bolder for clarity */
}
.md-header .md-nav__link:hover {
    opacity: 0.8; /* Subtle hover effect */
}

/* Main content link styling for better brand consistency */
.md-typeset a {
    color: var(--primary1);
}
.md-typeset a:hover {
    color: var(--primary2);
}

/* Custom color for site title and links */
.md-header__title, .md-nav__title {
  color: var(--primary1) !important; /* Deep blue for title */
}

.md-nav__link {
  color: var(--primary2) !important; /* Blue for links */
}

.md-nav__link:hover {
  color: var(--primary1) !important; /* Orange on hover */
}

/* Content header styling */
.md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4, .md-typeset h5, .md-typeset h6 {
  color: var(--primary1) !important;
  font-weight: bold !important;
  font-family: 'Tiro Kannada', 'Inter', sans-serif !important;
}

/* Main content text styling */
.md-typeset p, .md-typeset li, .md-typeset td, .md-typeset th {
  color: var(--textCol) !important;
  font-family: 'Tiro Kannada', 'Inter', sans-serif !important;
  font-size: 1.08em;
}

/* Sidebar and navigation font for Kannada/English */
.md-nav, .md-header__title, .md-nav__title, .md-nav__link {
  font-family: 'Tiro Kannada', 'Inter', sans-serif !important;
}

/* Pagination styles */
.md-typeset .page-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 32px 0 0 0;
}
.md-typeset .page-nav button {
  background: var(--primary1);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 6px 16px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}
.md-typeset .page-nav button:disabled {
  background: #ccc;
  color: #888;
  cursor: not-allowed;
}
.md-typeset .page-nav .page-num {
  background: var(--primary2);
  color: var(--white);
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: bold;
}

/* Top page navigation (clone bottom nav to top) */
.md-content__inner > .md-pagination {
  display: flex;
  justify-content: center;
  margin-bottom: 2em;
  order: -1;
}

/* Ensure bottom nav is visible and styled */
.md-pagination {
  display: flex;
  justify-content: center;
  margin-top: 2em;
}

/* Ensure text color is correct in dark mode - FIX: Corrected typo in selector */
[data-md-color-scheme="slate"] .md-typeset p,
[data-md-color-scheme="slate"] .md-typeset li,
[data-md-color-scheme="slate"] .md-typeset td,
[data-md-color-scheme="slate"] .md-typeset th {
  color: var(--white) !important;
}

/* Code block background and border only, let theme handle syntax highlighting */
.md-typeset pre, .md-typeset .highlight {
  background: var(--md-code-bg-color);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}
.md-typeset pre:hover, .md-typeset .highlight:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

[data-md-color-scheme="slate"] .md-typeset pre, [data-md-color-scheme="slate"] .md-typeset .highlight {
    border: 1px solid rgba(255,255,255,0.1);
}
