/* EPPlus brand colors, taken from the official logo (green #007731) */
:root {
  --md-primary-fg-color:        #007731;
  --md-primary-fg-color--light: #3D9A5F;
  --md-primary-fg-color--dark:  #005A25;
  --md-accent-fg-color:         #00963F;
}

/* Dark mode: lighter greens so links stay readable on the dark background */
[data-md-color-scheme="slate"] {
  --md-typeset-a-color:         #5CC48A;
  --md-accent-fg-color:         #7DD8A2;
}

/* The wide logo with text needs more height than the default square logo */
.md-header__button.md-logo img {
  height: 1.6rem;
}

/* Dark mode: show the logo variant with light text. The original image is
   hidden but keeps its size, and the dark variant is drawn in its place. */
[data-md-color-scheme="slate"] .md-logo img {
  visibility: hidden;
}

[data-md-color-scheme="slate"] .md-logo {
  background: url("../assets/brand/epplus-logo-dark.svg") no-repeat left center / contain;
  background-origin: content-box;
  background-clip: content-box;
}
/* Show "Docs" instead of the full site name in the header.
   The full name is still read by screen readers. */
.md-header__topic:first-child .md-ellipsis {
  font-size: 0;
}

.md-header__topic:first-child .md-ellipsis::after {
  content: "Docs";
  font-size: 0.9rem;
}

/* Keep "Docs" visible when scrolling instead of swapping to the page title */
.md-header__title--active .md-header__topic:first-child {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 0;
}

.md-header__topic + .md-header__topic {
  display: none;
}

/* Top menu linking back to the main EPPlus site */
.epp-topnav {
  display: none;
}

@media screen and (min-width: 60em) {
  /* Let the menu, not the title, take the free space in the header */
  .md-header__title {
    flex-grow: 0;
  }

  .epp-topnav {
    display: flex;
    flex-grow: 1;
    align-items: center;
    gap: 1.4rem;
    margin-left: 1.6rem;
  }

  .epp-topnav a {
    color: var(--md-default-fg-color--light);
    font-size: 0.8rem;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.15s;
  }

  .epp-topnav a:hover,
  .epp-topnav a:focus-visible {
    color: var(--md-default-fg-color);
  }
}

  .epp-topnav a.epp-topnav__active {
    color: var(--md-default-fg-color);
    font-weight: 600;
  }

  .epp-topnav__divider {
    width: 1px;
    height: 1rem;
    background: var(--md-default-fg-color--lightest);
  }

  /* Small screens: top menu links at the top of the navigation drawer (see main.html) */
.epp-drawer-links {
  margin-bottom: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 0.05rem solid var(--md-default-fg-color--lightest);
}

.epp-drawer-links .epp-drawer-links__active {
  color: var(--md-typeset-a-color);
  font-weight: 600;
}

@media screen and (min-width: 60em) {
  .epp-drawer-links {
    display: none;
  }
}

/* Navigation drawer (small screens): the square symbol instead of the wide logo,
   in both light and dark mode */
.md-nav--primary .md-nav__title .md-logo img,
[data-md-color-scheme="slate"] .md-nav--primary .md-nav__title .md-logo img {
  display: none;
}

.md-nav--primary .md-nav__title .md-logo,
[data-md-color-scheme="slate"] .md-nav--primary .md-nav__title .md-logo {
  width: 2.4rem;
  height: 2.4rem;
  background: url("../assets/brand/epplus-mark.svg") no-repeat center / contain content-box;
}
/* Footer with links to the main site, shared by the guides and the API sites (see main.html) */
.epp-footer {
  margin-top: 2.4rem;
  border-top: 0.05rem solid var(--md-default-fg-color--lightest);
  color: var(--md-default-fg-color--light);
  font-size: 0.7rem;
}

.epp-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  padding: 2rem 0.8rem 1.6rem;
}

.epp-footer__name {
  color: var(--md-default-fg-color);
  font-size: 0.8rem;
  font-weight: 700;
}

.epp-footer__brand p {
  margin: 0.4rem 0 0;
}

.epp-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
}

.epp-footer__links h2 {
  margin: 0 0 0.6rem;
  color: var(--md-default-fg-color);
  font-size: 0.7rem;
  font-weight: 700;
}

.epp-footer__links a {
  display: block;
  margin-bottom: 0.4rem;
}

.epp-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.epp-footer a:hover,
.epp-footer a:focus-visible {
  color: var(--md-accent-fg-color);
}

.epp-footer__bottom {
  border-top: 0.05rem solid var(--md-default-fg-color--lightest);
  font-size: 0.65rem;
}

.epp-footer__bottom .md-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.8rem;
}

.epp-footer__generator {
  color: var(--md-default-fg-color--lighter);
}

@media screen and (min-width: 60em) {
  .epp-footer__inner {
    grid-template-columns: 1fr 3fr;
  }

  .epp-footer__links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.md-content a[target="_blank"]:not(:has(img))::after {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.25em;
  vertical-align: baseline;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14V3zM5 5h6v2H7v10h10v-4h2v6H5V5z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14V3zM5 5h6v2H7v10h10v-4h2v6H5V5z'/%3E%3C/svg%3E") no-repeat center / contain;
}