.user-auth-modal {
  width: min(100%, 560px);
  max-width: 560px;
  border: none;
  padding: 0;
  background: transparent;
  color: var(--color-text, #28251d);
  margin: auto;
}

.user-auth-modal[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(calc(100% - 1.5rem), 560px);
  max-height: calc(100dvh - 1.5rem);
  overflow: visible;
}

.user-auth-modal::backdrop {
  background: rgba(23, 22, 20, 0.56);
  backdrop-filter: blur(4px);
}

.user-auth-modal__panel {
  position: relative;
  overflow: auto;
  max-height: calc(100dvh - 1.5rem);
}

.user-auth-root--modal .user-auth-block {
  box-shadow: 0 24px 60px rgba(40, 37, 29, 0.14);
}

.user-auth-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(40, 37, 29, 0.12);
  border-radius: 999px;
  background: var(--color-surface-2, #fbfbf9);
  color: var(--color-text, #28251d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.user-auth-modal__close svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .user-auth-modal {
    width: min(calc(100% - 1rem), 560px);
    max-width: calc(100% - 1rem);
  }

  .user-auth-modal[open] {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .user-auth-modal__panel {
    max-height: calc(100dvh - 1rem);
  }
}
