html:has(.member-auth[open]) {
  overflow: hidden;
}

.member-auth-shade {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgb(0 0 0 / 50%);
}

body:has(.member-auth:modal) .member-auth-shade {
  display: none;
}

.member-auth {
  --member-auth-ink: #212121;
  --member-auth-blue: #00264b;
  box-sizing: border-box;
  position: fixed;
  inset: 0 0 auto;
  z-index: 99999;
  width: min(370px, calc(100% - 20px));
  max-width: none;
  max-height: calc(100dvh - 104px);
  margin: 80px auto 0;
  padding: 34px 24px 32px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: var(--member-auth-ink);
  box-shadow: 0 4px 24px rgb(0 0 0 / 12%);
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

.member-auth::backdrop {
  background: rgb(0 0 0 / 50%);
}

.member-auth *,
.member-auth *::before,
.member-auth *::after {
  box-sizing: border-box;
}

.member-auth h1 {
  margin: 0 0 33px;
  color: var(--member-auth-ink);
  font-size: 24px;
  font-weight: 700;
  line-height: 29px;
  text-align: center;
}

.member-auth h1:focus {
  outline: none;
}

.member-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #767676;
}

.member-auth-close::before,
.member-auth-close::after {
  grid-area: 1 / 1;
  width: 21px;
  height: 1px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

.member-auth-close::after {
  transform: rotate(-45deg);
}

.member-auth form {
  margin: 0;
}

.member-auth-note {
  margin: 0 0 16px;
  color: #616161;
  font-size: 13px;
  line-height: 1.6;
}

.member-auth-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.member-auth-login-fields {
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 2px;
}

.member-auth input:not([type=checkbox], [type=hidden], [type=file]) {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #ddd;
  border-radius: 2px;
  background: #fff;
  color: var(--member-auth-ink);
  font: inherit;
}

.member-auth .member-auth-login-fields input {
  border: 0;
  border-radius: 0;
}

.member-auth .member-auth-login-fields input[type=password] {
  height: 43px;
  border-top: 1px solid #ddd;
}

.member-auth .member-auth-login-fields input:focus-visible {
  outline-offset: -2px;
}

.member-auth-check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 400;
}

.member-auth-check[hidden],
.member-auth [hidden] {
  display: none;
}

.member-auth-check input[type=checkbox] {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--member-auth-blue);
}

.member-auth--login .member-auth-check {
  margin: 13px 0 15px;
}

.member-auth-primary,
.member-auth-secondary {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.member-auth .member-auth-primary {
  background: var(--member-auth-blue);
  color: #fff;
}

.member-auth .member-auth-secondary {
  border-color: #ccc;
  background: #fff;
  color: #111;
}

.member-auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 14px;
  margin-top: 10px;
}

.member-auth-links a {
  color: #111;
}

.member-auth--agreements {
  padding-bottom: 24px;
}

.member-auth-all {
  margin-bottom: 29px;
}

.member-auth em {
  padding-left: 2px;
  color: #a83f54;
  font-style: normal;
}

.member-auth-policy {
  height: 100px;
  margin: 10px 0 26px;
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid #ddd;
  border-radius: 2px;
  font-size: 14px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.member-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: 24px;
}

.member-auth-actions > * {
  min-height: 48px;
}

.member-auth .errorlist {
  margin: 7px 0 12px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: #a83f54;
}

@media (max-width: 767px), (max-height: 720px) {
  .member-auth {
    max-height: calc(100dvh - 20px);
    margin-top: 10px;
    padding-top: 24px;
  }
}

.member-auth--details {
  padding-top: 32px;
  padding-bottom: 24px;
}

.member-auth--details h1 {
  margin-bottom: 30px;
  line-height: 30px;
}

.member-auth-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
}

.member-auth-avatar > img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.member-auth-photo-menu {
  position: absolute;
  right: -7px;
  bottom: 4px;
  z-index: 1;
}

.member-auth-photo-menu summary {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #dbdee3;
  border-radius: 50%;
  background: #fff;
  color: #15181e;
  list-style: none;
  cursor: pointer;
  font-size: 16px;
}

.member-auth-photo-menu summary::-webkit-details-marker {
  display: none;
}

.member-auth-photo-actions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100px;
  padding: 4px;
  border: 1px solid #dbdee3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 12%);
}

.member-auth-photo-actions button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  background: #fff;
  color: #15181e;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.member-auth-photo-actions button:not(:disabled):hover,
.member-auth-photo-actions button:focus-visible {
  background: #f4f5f7;
}

.member-auth-photo-actions button:disabled {
  opacity: .4;
  cursor: default;
}

.member-auth-signup-fields {
  border: 1px solid #ddd;
}

.member-auth-signup-row + .member-auth-signup-row {
  border-top: 1px solid #ddd;
}

.member-auth .member-auth-signup-row input {
  border: 0;
  border-radius: 0;
}

.member-auth .member-auth-signup-row input:focus-visible {
  outline-offset: -2px;
}

.member-auth-password-row {
  position: relative;
}

.member-auth .member-auth-password-row input {
  padding-right: 46px;
}

.member-auth-password-toggle {
  position: absolute;
  inset: 0 5px 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #15181e;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
}

.member-auth-password-row:hover .member-auth-password-toggle,
.member-auth-password-row:focus-within .member-auth-password-toggle {
  opacity: 1;
  pointer-events: auto;
}

.member-auth-password-toggle svg {
  width: 24px;
  height: 24px;
}

.member-auth-password-toggle[aria-pressed="false"] svg:last-child,
.member-auth-password-toggle[aria-pressed="true"] svg:first-child {
  display: none;
}

.member-auth .member-auth-password-help {
  margin: 3px 8px 0;
  color: #666;
  font-size: 12px;
  line-height: 21px;
}

.member-auth-signup-name {
  margin: 25px 0;
}

.member-auth-signup-name label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}

.member-auth-signup-name label span {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 5px;
  border-radius: 50%;
  background: #1a6dff;
  vertical-align: middle;
}

.member-auth-name-field {
  border: 1px solid #ddd;
}

.member-auth .member-auth-name-field input {
  border: 0;
  border-radius: 0;
}

.member-auth .member-auth-name-field input:focus-visible {
  outline-offset: -2px;
}

.member-auth--details .member-auth-primary {
  min-height: 45px;
  border-radius: 0;
}

@media (min-width: 768px) and (min-height: 620px) {
  .member-auth--details {
    max-height: calc(100dvh - 104px);
    margin-top: 80px;
  }
}

@media (max-width: 767px) {
  .member-auth--details h1 {
    margin-bottom: 20px;
  }

  .member-auth-avatar {
    width: 64px;
    height: 64px;
  }

  .member-auth .member-auth-signup-row input,
  .member-auth .member-auth-name-field input {
    height: 43px;
  }

  .member-auth-signup-name {
    margin-bottom: 26px;
  }
}
