/**
 * @file
 * Minimal YMB tweaks on MDWDS header components.
 */

.ymb-page {
  overflow-x: clip;
}

.ymb-site-header {
  position: relative;
  z-index: 3;
  background: #fff;
  color: #1b1b1b;
}

.maryland-header .maryland-header__agency {
  font-size: 1.75rem;
  line-height: 1.1;
}

/* Landing header: logo only, no nav. */
.ymb-header--minimal {
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.ymb-header--minimal .maryland-header__divider {
  inline-size: 100%;
  margin-block-start: 1rem;
}

.grid-container {
  max-inline-size: 90rem;
  margin-inline: auto;
  padding-inline: 3.5rem;
}

@media (max-width: 63.99em) {
  .ymb-header--minimal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .ymb-header--minimal .maryland-header__home {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    min-inline-size: 0;
  }

  .ymb-header--minimal .maryland-header__logo {
    inline-size: 3rem;
    block-size: auto;
    flex: 0 0 auto;
  }

  .ymb-header--minimal .maryland-header__agency {
    width: auto;
    max-width: none;
    padding: 0;
    border: 0;
    font-size: clamp(1.25rem, 6vw, 2rem);
    line-height: 1.05;
  }

  .ymb-header--minimal .maryland-header__divider {
    margin-block-start: 0.75rem;
  }

  .grid-container {
    padding-inline: 1.5rem;
  }
}

/* Account links in the site header.
   The landing is the home page, so this is the only visible way in to the
   portal — previously the sole route was a "Get started" link partway down
   the page, which is no entry point for someone returning to sign in.
   margin-inline-start:auto pushes the pair to the end of the header's flex
   row, before the full-width divider wraps beneath. */
.ymb-header__account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-inline-start: auto;
}

.ymb-header__signin,
.ymb-header__register {
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.ymb-header__signin {
  color: #005ea2;
  padding: 0.5rem 0.25rem;
}

.ymb-header__signin:hover,
.ymb-header__signin:focus-visible {
  text-decoration: underline;
}

/* The primary action, so it carries the weight rather than sitting as a third
   identical link next to the wordmark. */
.ymb-header__register {
  padding: 0.5rem 1.25rem;
  border-radius: 0.25rem;
  background: #005ea2;
  color: #fff;
}

.ymb-header__register:hover,
.ymb-header__register:focus-visible {
  background: #1a4480;
}

@media (max-width: 30rem) {
  /* Narrow screens: the wordmark already wraps, so let these sit under it
     rather than squeezing onto the same line. */
  .ymb-header__account {
    margin-inline-start: 0;
    margin-block-start: 0.75rem;
    width: 100%;
  }
}

