/* Palette sourced from the WDG Public Health Power BI theme (MyTheme1.json) */
[data-md-color-primary="wdgph"] {
  --md-primary-fg-color: #00566b;
  --md-primary-fg-color--light: #008c8c;
  --md-primary-fg-color--dark: #184b52;
  --md-primary-bg-color: hsla(0, 0%, 100%, 1);
  --md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);
}

[data-md-color-primary="black"] {
  --md-primary-fg-color: #181818;
  --md-primary-fg-color--light: #008c8c;
  --md-primary-fg-color--dark: #184b52;
  --md-primary-bg-color: #00566b;
}

[data-md-color-accent="wdgph"] {
  --md-accent-fg-color: #76a82a;
  --md-accent-fg-color--transparent: #76a82a1a;
  --md-accent-bg-color: #fff;
  --md-accent-bg-color--light: #ffffffb3;
}

[data-md-color-scheme="slate"][data-md-color-primary="black"] {
  --md-typeset-a-color: #009e9a;
}

[data-md-color-scheme="default"] {
  --md-typeset-a-color: #00566b;
  --md-default-fg-color--light: #08343a;
}

[data-md-color-scheme="slate"] {
  --md-typeset-a-color: #009e9a;
  /* Dark mode styling */
}

/* Admonition accents mapped to the theme's good/bad semantic colors */
.md-typeset .admonition.tip,
.md-typeset .admonition.success,
.md-typeset details.tip,
.md-typeset details.success {
  border-color: #76a82a;
}

.md-typeset .tip > .admonition-title,
.md-typeset .success > .admonition-title,
.md-typeset .tip > summary,
.md-typeset .success > summary {
  background-color: #76a82a1a;
}

.md-typeset .tip > .admonition-title::before,
.md-typeset .success > .admonition-title::before,
.md-typeset .tip > summary::before,
.md-typeset .success > summary::before {
  background-color: #76a82a;
}

.md-typeset .admonition.danger,
.md-typeset .admonition.failure,
.md-typeset details.danger,
.md-typeset details.failure {
  border-color: #b84a3a;
}

.md-typeset .danger > .admonition-title,
.md-typeset .failure > .admonition-title,
.md-typeset .danger > summary,
.md-typeset .failure > summary {
  background-color: #b84a3a1a;
}

.md-typeset .danger > .admonition-title::before,
.md-typeset .failure > .admonition-title::before,
.md-typeset .danger > summary::before,
.md-typeset .failure > summary::before {
  background-color: #b84a3a;
}

/* WDGPH logo css styling to match overrides/partial/copyright.html */
.md-footer-logo {
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
}

.md-footer-logo img {
  height: 24px; /* Reduce height to a fixed value */
  width: auto; /* Maintain aspect ratio */
  transition: opacity 0.25s;
  opacity: 0.7;
}

.md-footer-logo img:hover {
  opacity: 1;
}

/* Make the inner footer grid elements distribute evenly */
.md-footer-meta__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* To make socials and WDGPH logo not stack when viewing on mobile */
@media screen and (max-width: 76.234375em) {
  .md-footer-meta__inner.md-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .md-copyright,
  .md-social {
    width: auto;
    max-width: 49%;
  }

  /* Prevent margin that causes stacking */
  .md-social {
    margin: 0;
  }
}

/* Reduce margins for h2 when using grid cards */
.grid.cards h2 {
  margin-top: 0; /* Remove top margin completely in cards */
  margin-bottom: 0.5rem; /* Smaller bottom margin in cards */
}

.wdgph-icon {
  color: #00566b;
  opacity: 0.7;
  margin-right: 0.2em;
}
