/* ==========================================================================
   Henddu Product Roadmap — Custom Theme
   ========================================================================== */

/* --- Color Tokens --- */
:root {
  --md-primary-fg-color: #0D7377;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #0D9B8C;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #0D7377;
  --md-accent-fg-color: #0D9B8C;
  --md-typeset-a-color: #0D7377;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0D7377;
  --md-accent-fg-color: #0D9B8C;
  --md-typeset-a-color: #0D9B8C;
}

/* --- Header --- */
.md-header {
  background-color: var(--md-primary-fg-color);
}

.md-typeset h1{
  color: var(--md-primary-fg-color);
  font-weight: 500;
}

/* --- Smooth transitions (dark/light mode) --- */
body,
.md-header,
.md-tabs,
.md-sidebar,
.md-main {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Navigation tabs (menu bar) --- */
.md-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.md-tabs__list {
  display: flex;
  justify-content: center;
}

.md-tabs__link {
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  padding: 0 1.4em;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  border-radius: 4px 4px 0 0;
  position: relative;
}

.md-tabs__link:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}

.md-tabs__link--active {
  font-weight: 700;
}

.md-tabs__link--active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 3px 3px 0 0;
}

/* --- Breadcrumbs (navigation.path) --- */
.md-path {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* --- Tables --- */
.md-typeset table:not([class]) {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  overflow: hidden;
  font-size: 15px;
}

.md-typeset table:not([class]) thead {
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
}

.md-typeset table:not([class]) thead th {
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7em 1em;
}

.md-typeset table:not([class]) tbody tr:nth-child(even) {
  background-color: var(--md-default-fg-color--lightest);
}

.md-typeset table:not([class]) tbody td {
  padding: 0.6em 1em;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

/* --- Blockquotes --- */
.md-typeset blockquote {
  border-left: 3px solid var(--md-primary-fg-color);
  background-color: var(--md-default-fg-color--lightest);
  padding: 0.8em 1.2em;
  border-radius: 0 6px 6px 0;
  margin: 1em 0;
}

[data-md-color-scheme="slate"] .md-typeset blockquote {
  background-color: hsla(0, 0%, 100%, 0.04);
}

/* --- Admonitions --- */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* --- Content area --- */
.md-content {
  max-width: 960px;
}

/* --- Footer --- */
.md-footer {
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  border-top: none;
}

.md-footer a {
  color: var(--md-primary-bg-color);
}

.md-footer-meta {
  background-color: #0a5e61;
}

.md-footer-nav__link {
  transition: opacity 0.2s ease;
}

.md-footer-nav__link:hover {
  opacity: 0.8;
}

/* --- Left Sidebar (navigation) --- */
.md-sidebar--primary .md-sidebar__inner {
  padding-top: 1.2em;
}

.md-sidebar--primary .md-nav__item {
  padding: 0;
}

.md-sidebar--primary .md-nav__link {
  padding: 0.45em 0.8em;
  border-radius: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.md-sidebar--primary .md-nav__link:hover {
  background-color: var(--md-accent-fg-color--transparent);
}

.md-sidebar--primary .md-nav__link--active {
  font-weight: 600;
  color: var(--md-primary-fg-color);
  border-left: 3px solid var(--md-primary-fg-color);
  border-radius: 0 4px 4px 0;
  padding-left: calc(0.8em - 3px);
}

[data-md-color-scheme="slate"] .md-sidebar--primary .md-nav__link:hover {
  background-color: hsla(0, 0%, 100%, 0.06);
}

/* Section labels in left sidebar */
.md-sidebar--primary .md-nav__item--nested > .md-nav__link {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-default-fg-color--light);
  padding-top: 0.8em;
}

/* Subtle left sidebar separator */
.md-sidebar--primary {
  border-right: 1px solid var(--md-default-fg-color--lightest);
}

/* --- Right Sidebar (table of contents) --- */
.md-sidebar--secondary .md-sidebar__inner {
  padding-top: 1.2em;
}

.md-sidebar--secondary .md-nav__link {
  padding: 0.35em 0.6em;
  border-radius: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
  border-left: 2px solid transparent;
}

.md-sidebar--secondary .md-nav__link:hover {
  color: var(--md-accent-fg-color);
}

.md-sidebar--secondary .md-nav__link--active {
  color: var(--md-primary-fg-color);
  font-weight: 600;
  border-left: 2px solid var(--md-primary-fg-color);
  border-radius: 0;
}

/* TOC title */
.md-sidebar--secondary .md-nav__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--md-default-fg-color--light);
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  margin-bottom: 0.5em;
}

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

::-webkit-scrollbar-thumb {
  background-color: var(--md-default-fg-color--lighter);
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* --- Code blocks --- */
.md-typeset code {
  border-radius: 4px;
}

.md-typeset pre > code {
  border-radius: 6px;
}

/* --- Progress bar (navigation.instant.progress) --- */
.md-progress {
  background-color: var(--md-accent-fg-color);
}
