/* =========================================================
   GLOBAL THEME VARIABLES (Applies to both Light & Dark)
   ========================================================= */
:root,
[data-md-color-primary],
[data-md-color-accent] {
  --md-primary-fg-color:        #151E3D !important;
  --md-primary-fg-color--light: #00565F !important;
  --md-primary-fg-color--dark:  #0a0f21 !important;
  --md-accent-fg-color:         #4CC1B0 !important;
  --md-accent-fg-color--transparent: rgba(76, 193, 176, 0.1) !important;
}

/* =========================================================
   HEADER & LOGO OVERRIDES
   ========================================================= */
.md-header {
  background: linear-gradient(to right, #151E3D, #276366) !important;
  color: #ffffff !important;
}

.md-header .md-logo img {
  filter: brightness(0) invert(1);
}

/* Apply Brand Colors to Info Callout Boxes */
.md-typeset .admonition.info, .md-typeset details.info {
  border-color: #4CC1B0;
}
.md-typeset .info > .admonition-title, .md-typeset .info > summary {
  background-color: rgba(76, 193, 176, 0.1);
  border-color: #4CC1B0;
}
.md-typeset .info > .admonition-title::before, .md-typeset .info > summary::before {
  background-color: #4CC1B0;
}

/* =========================================================
   LIGHT MODE ONLY OVERRIDES (Default)
   ========================================================= */
body[data-md-color-scheme="default"] {
  --md-default-bg-color:        #F5F6F7 !important;
  --md-admonition-bg-color:     #ffffff !important;
}

/* Light Mode Links: Dark Teal (#00565F) for contrast */
body[data-md-color-scheme="default"] .md-content a:not(.md-button),
body[data-md-color-scheme="default"] .md-typeset a:not(.md-button),
body[data-md-color-scheme="default"] .md-nav__link--active,
body[data-md-color-scheme="default"] .md-nav__item--active > .md-nav__link,
body[data-md-color-scheme="default"] .md-nav__toggle:checked ~ .md-nav__link,
body[data-md-color-scheme="default"] .md-nav__toggle:checked ~ .md-nav__link .md-nav__icon,
body[data-md-color-scheme="default"] .md-sidebar--secondary .md-nav__link--active,
body[data-md-color-scheme="default"] .md-sidebar--secondary .md-nav__item--active > .md-nav__link {
  color: #00565F !important;
}

body[data-md-color-scheme="default"] .md-nav__link--active,
body[data-md-color-scheme="default"] .md-nav__item--active > .md-nav__link,
body[data-md-color-scheme="default"] .md-nav__toggle:checked ~ .md-nav__link {
  font-weight: 700 !important;
}

/* =========================================================
   DARK MODE ONLY OVERRIDES (Slate)
   ========================================================= */
/* Dark Mode Links: Soft Fills Teal (#4CC1B0) for readability on dark backgrounds */
body[data-md-color-scheme="slate"] .md-content a:not(.md-button),
body[data-md-color-scheme="slate"] .md-typeset a:not(.md-button),
body[data-md-color-scheme="slate"] .md-nav__link--active,
body[data-md-color-scheme="slate"] .md-nav__item--active > .md-nav__link,
body[data-md-color-scheme="slate"] .md-nav__toggle:checked ~ .md-nav__link,
body[data-md-color-scheme="slate"] .md-nav__toggle:checked ~ .md-nav__link .md-nav__icon,
body[data-md-color-scheme="slate"] .md-sidebar--secondary .md-nav__link--active,
body[data-md-color-scheme="slate"] .md-sidebar--secondary .md-nav__item--active > .md-nav__link {
  color: #4CC1B0 !important;
}

body[data-md-color-scheme="slate"] .md-nav__link--active,
body[data-md-color-scheme="slate"] .md-nav__item--active > .md-nav__link,
body[data-md-color-scheme="slate"] .md-nav__toggle:checked ~ .md-nav__link {
  font-weight: 700 !important;
}

/* Hover states for Dark Mode (White for high contrast) */
body[data-md-color-scheme="slate"] .md-content a:not(.md-button):hover,
body[data-md-color-scheme="slate"] .md-typeset a:not(.md-button):hover,
body[data-md-color-scheme="slate"] .md-nav__link:hover,
body[data-md-color-scheme="slate"] .md-nav__link:hover .md-nav__icon {
  color: #ffffff !important;
}

/* =========================================================
   GLOBAL HOVER STATES & UTILITIES (Both Modes)
   ========================================================= */
/* Default hover behavior */
.md-content a:not(.md-button):hover,
.md-typeset a:not(.md-button):hover,
.md-nav__link:hover,
.md-nav__link:hover .md-nav__icon {
  color: #4CC1B0 !important;
}

/* Force Dropdown Arrows/Carets to always inherit the parent text color */
.md-nav__icon {
  color: inherit !important;
}

/* =========================================================
   SCROLLBAR COLORS
   ========================================================= */
* {
  scrollbar-color: #4CC1B0 transparent !important;
}

::-webkit-scrollbar-thumb {
  background-color: #4CC1B0 !important;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #00565F !important;
}
/* =========================================================
   TASK LIST CHECKBOX VISIBILITY IMPROVEMENTS
   ========================================================= */

/* 1. Remove the 50% faded opacity from the Material custom SVG indicator */
.md-typeset .task-list-control [type="checkbox"]:disabled + .task-list-indicator {
  opacity: 1 !important;
}

/* 2. Unchecked State: Dark Grey in Light Mode */
body[data-md-color-scheme="default"] .md-typeset .task-list-control [type="checkbox"]:not(:checked) + .task-list-indicator::before {
  background-color: #616161 !important;
}

/* 3. Unchecked State: Light Grey in Dark Mode */
body[data-md-color-scheme="slate"] .md-typeset .task-list-control [type="checkbox"]:not(:checked) + .task-list-indicator::before {
  background-color: #E0E0E0 !important;
}

/* 4. Checked State: Brand Teal in Both Modes */
.md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator::before {
  background-color: #4CC1B0 !important;
}
