/* MunicipalPost Header V2 */

.mp-header,
.mp-header * {
  box-sizing: border-box;
}

.mp-header {
  width: 100%;
  background: #f7f8fa;
  color: #272b31;
  border-bottom: 1px solid #e5e7eb;
  font-family: inherit;
}

.mp-header__topbar {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  min-height: 76px;
  padding: 10px 14px;
}

.mp-header__back,
.mp-header__account-button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
}

.mp-header__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 8px;
  border-radius: 50%;
  color: #222831;
  cursor: pointer;
}

.mp-header__back:hover {
  background: rgba(0,0,0,.045);
}

.mp-header__back svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.mp-header__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.mp-header__logo {
  display: block;
  width: 138px !important;
  max-width: 42vw !important;
  height: auto !important;
}

.mp-header__account {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.mp-header__account-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 46px;
  height: 46px;
  padding: 4px;
  border-radius: 999px;
  cursor: pointer;
}

.mp-header__account-button:hover {
  background: rgba(0,0,0,.045);
}

.mp-header__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  background: #eceff2;
}

.mp-header__avatar img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.mp-header__chevron {
  width: 18px;
  height: 18px;
  fill: #39404a;
}

.mp-header__request-badge {
  position: absolute;
  top: 0;
  right: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b3261e;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.mp-header__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #d9dde3;
  border-radius: 999px;
  background: #fff;
  color: #252a31;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.mp-header__menu {
  position: absolute;
  top: 52px;
  right: 0;
  z-index: 9999;
  width: 210px;
  padding: 8px;
  border: 1px solid #e1e4e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(0,0,0,.13);
}

.mp-header__menu[hidden] {
  display: none !important;
}

.mp-header__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #20242a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.mp-header__menu a:hover {
  background: #f4f5f7;
}

.mp-header__menu-separator {
  height: 1px;
  margin: 6px 4px;
  background: #eceef0;
}

.mp-header__logout {
  color: #9b2c2c !important;
}

.mp-header__menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b3261e;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.mp-header__nav {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: stretch;
  width: min(100%, 680px);
  min-height: 82px;
  margin: 0 auto;
  border-top: 1px solid #e6e8eb;
}

.mp-header__nav-divider {
  width: 1px;
  height: 42px;
  align-self: center;
  background: #dfe3e8;
}

.mp-header__nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 10px 8px;
  color: #343941;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.mp-header__nav-item:hover {
  background: rgba(0,0,0,.025);
}

.mp-header__nav-item svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.mp-header__nav-item--network {
  color: #4f1f7f;
}

.mp-header__nav-item--network svg {
  fill: currentColor;
}

.mp-subuser-session {
  margin: 8px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.mp-header__back:focus-visible,
.mp-header__account-button:focus-visible,
.mp-header__nav-item:focus-visible,
.mp-header__login:focus-visible,
.mp-header__menu a:focus-visible {
  outline: 3px solid rgba(24,36,51,.2);
  outline-offset: 2px;
}

@media (min-width: 760px) {
  .mp-header__topbar {
    min-height: 82px;
    grid-template-columns: 60px 1fr 60px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .mp-header__logo {
    width: 158px !important;
    max-width: 30vw !important;
  }

  .mp-header__nav {
    min-height: 76px;
  }
}

@media (max-width: 420px) {
  .mp-header__topbar {
    min-height: 70px;
    grid-template-columns: 48px 1fr 48px;
    padding: 8px 10px;
  }

  .mp-header__logo {
    width: 126px !important;
    max-width: 44vw !important;
  }

  .mp-header__back {
    width: 42px;
    height: 42px;
  }

  .mp-header__back svg {
    width: 28px;
    height: 28px;
  }

  .mp-header__avatar {
    width: 35px;
    height: 35px;
  }

  .mp-header__nav {
    min-height: 76px;
  }

  .mp-header__nav-item {
    font-size: 12px;
  }

  .mp-header__nav-item svg {
    width: 26px;
    height: 26px;
  }
}
