.account-nav {
  position: relative;
}

.account-trigger {
  display: flex;
  max-width: 190px;
  min-height: 44px;
  gap: 8px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(19, 32, 29, .14);
  border-radius: 999px;
  color: #13201d;
  background: #fff;
  font-weight: 900;
}

.account-trigger > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: #0f6b57;
  font-size: .72rem;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-menu {
  position: absolute;
  z-index: 50;
  top: 52px;
  right: 0;
  display: grid;
  width: 210px;
  padding: 7px;
  border: 1px solid rgba(19, 32, 29, .14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(20, 45, 37, .18);
}

.account-menu button {
  min-height: 40px;
  padding: 9px 11px;
  border: 0;
  border-radius: 5px;
  text-align: left;
  color: #13201d;
  background: #fff;
  font-weight: 800;
}

.account-menu button:hover {
  background: rgba(15, 107, 87, .08);
}

.account-menu .account-logout {
  color: #a23d31;
}

.account-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 36, 31, .65);
}

.account-modal > section {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}

.account-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(19, 32, 29, .14);
  border-radius: 50%;
  color: #13201d;
  background: #fff;
  font-size: 1.4rem;
}

.account-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.account-form .wide {
  grid-column: 1 / -1;
}

.account-form button {
  justify-self: end;
}

.avatar-editor {
  display: grid;
  gap: 16px;
}

.avatar-preview {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: #0f6b57;
  font-weight: 900;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.address-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.address-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(19, 32, 29, .14);
  border-radius: 6px;
  background: #f8faf9;
}

.address-item p {
  margin: 3px 0;
  color: #68746f;
}

@media (max-width: 720px) {
  .account-nav {
    position: static;
  }

  .account-trigger {
    max-width: min(250px, calc(100vw - 32px));
    min-height: 48px;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    box-shadow: 0 10px 26px rgba(20, 45, 37, .12);
  }

  .account-trigger > span:last-child {
    display: block;
    max-width: 178px;
    font-size: .92rem;
    line-height: 1;
    letter-spacing: 0;
  }

  .account-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: .82rem;
  }

  .account-menu {
    position: fixed;
    z-index: 80;
    top: 132px;
    left: 50%;
    right: auto;
    width: min(320px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    padding: 8px;
    border-radius: 10px;
    transform: translateX(-50%);
    box-shadow: 0 22px 60px rgba(20, 45, 37, .24);
  }

  .account-menu button {
    min-height: 46px;
    padding: 12px;
    text-align: center;
  }

  .account-form {
    grid-template-columns: 1fr;
  }

  .account-form .wide {
    grid-column: auto;
  }
}

@media (max-width: 380px) {
  .account-trigger {
    max-width: calc(100vw - 28px);
  }

  .account-trigger > span:last-child {
    max-width: 164px;
  }

  .account-menu {
    top: 174px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
}
