﻿.auth-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  pointer-events: none;
}

.auth-drawer-root--open {
  pointer-events: auto;
}

.auth-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-drawer-root--open .auth-drawer__overlay {
  opacity: 1;
}

.auth-drawer__panel {
  --auth-radius: clamp(1.25rem, 3.8vw, 2.5rem);
  --auth-layer-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --auth-layer-top-h: 0px;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(48vw, 32rem);
  max-width: 100%;
  background: var(--surface-muted);
  border-left: 1px solid var(--border-default);
  border-bottom-left-radius: var(--auth-radius);
  border-bottom-right-radius: var(--auth-radius);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.5s var(--auth-layer-ease);
  transition-delay: 0.42s;
}

.auth-drawer-root--open .auth-drawer__panel {
  clip-path: inset(0 0 0 0);
  transition-delay: 0s;
}

.auth-drawer__zone-window {
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.12);
}

.auth-drawer__panel--cta-visible {
}

.auth-drawer__layer-top {
  position: relative;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: auto;
  height: auto;
  max-height: calc(100% - 0.45rem);
  background: var(--surface-elevated);
  border-bottom-left-radius: var(--auth-radius);
  border-bottom-right-radius: var(--auth-radius);
  transform: translate3d(0, -105%, 0);
  transition: transform 0.5s var(--auth-layer-ease), max-height 0.24s ease;
  transition-delay: 0s;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.1);
}

.auth-drawer-root--open .auth-drawer__layer-top {
  transform: translate3d(0, 0, 0);
  transition-delay: 0.42s;
}

.auth-drawer__layer-black {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--auth-layer-top-h) - var(--auth-radius) + 0.55rem);
  bottom: 0;
  width: 100%;
  padding-top: calc(var(--auth-radius) - 0.55rem);
  min-height: 2rem;
  max-height: 6rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #0f1116;
  border-bottom-left-radius: var(--auth-radius);
  border-bottom-right-radius: var(--auth-radius);
  transform: translate3d(0, -18px, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.34s var(--auth-layer-ease), opacity 0.24s ease, top 0.2s ease;
  transition-delay: 0s;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.auth-drawer__layer-black--visible {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0.22s;
}

.auth-drawer__cta-btn {
  width: min(92%, 24rem);
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-inverse);
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.82rem 1rem;
  margin-top: 0.7rem;
  cursor: pointer;
}

.auth-drawer__cta-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.auth-drawer__content-zone {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0.08rem 0.7rem 0.55rem;
  padding: 0.08rem 1rem 1rem;
  border: none;
  box-sizing: border-box;
}

.auth-drawer__content-topbar {
  display: flex;
  justify-content: flex-end;
  min-height: 2rem;
}

.auth-drawer__close {
  border: none;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.12rem 0.35rem;
}

.auth-drawer__close:hover {
  opacity: 0.68;
}

.auth-drawer__tab-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin: -0.18rem auto 0.88rem;
  min-height: 4.2rem;
}

.auth-drawer__tab-stack-btn {
  border: none;
  background: transparent;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.22s ease, opacity 0.22s ease, font-size 0.22s ease;
}

.auth-drawer__tab-stack-btn--top {
  cursor: default;
  opacity: 1;
}

.auth-drawer__tab-stack-btn--bottom {
  cursor: pointer;
  opacity: 0.45;
}

.auth-drawer__tab-stack--animating .auth-drawer__tab-stack-btn--top {
  animation: auth-tab-rise 0.24s ease;
}

.auth-drawer__tab-stack--animating .auth-drawer__tab-stack-btn--bottom {
  animation: auth-tab-drop 0.24s ease;
}

.auth-drawer__tab-stack-btn--bottom:hover {
  opacity: 0.72;
}

.auth-drawer__tab-stack-btn--info {
  font-size: 1.24rem;
}

.auth-drawer__tab-stack-btn--action {
  font-size: 1.12rem;
}

.auth-drawer__tab-stack-separator {
  width: min(15.5rem, 82%);
  height: 1px;
  background: rgba(17, 17, 17, 0.24);
}

@keyframes auth-tab-rise {
  from {
    transform: translateY(0.42rem);
    opacity: 0.45;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes auth-tab-drop {
  from {
    transform: translateY(-0.42rem);
    opacity: 0.95;
  }
  to {
    transform: translateY(0);
    opacity: 0.45;
  }
}

.auth-drawer__fields {
  display: flex;
  flex-direction: column;
  gap: 0.56rem;
  padding: 0.08rem 0.18rem 0.2rem;
  transform: translateY(0);
  opacity: 1;
}

.auth-drawer__fields--leave-up {
  animation: auth-form-leave-up 0.22s ease forwards;
}

.auth-drawer__fields--enter-down {
  animation: auth-form-enter-down 0.24s ease forwards;
}

.auth-drawer__field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.auth-drawer__field-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.auth-drawer__field-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-default);
  background: var(--surface-elevated);
  color: var(--text-primary);
  border-radius: 3px;
  padding: 0.54rem 0.58rem;
  font-size: 0.95rem;
}

.auth-drawer__field-input:focus {
  outline: none;
  border-color: var(--text-primary);
}

.auth-drawer__form-error {
  margin: 0.35rem 0 0;
  color: #b00020;
  font-size: 0.82rem;
  line-height: 1.3;
}

@keyframes auth-form-leave-up {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-32px);
    opacity: 0;
  }
}

@keyframes auth-form-enter-down {
  from {
    transform: translateY(34px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .auth-drawer__panel {
    width: min(92vw, 32rem);
  }

  .auth-drawer__tab-stack-btn--info {
    font-size: 1.1rem;
  }

  .auth-drawer__tab-stack-btn--action {
    font-size: 1.02rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-drawer__overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .auth-drawer__panel,
  .auth-drawer__layer-top,
  .auth-drawer__layer-black,
  .auth-drawer__tab-stack-btn,
  .auth-drawer__fields {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
