@import url("./auth-provider.css");

@font-face {
  font-family: "Cormorant Dream";
  src: url("/assets/cormorant-garamond-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Zalando Sans";
  src: url("/assets/zalando-sans-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color: #f5f0e8;
  background: #0a0a0c;
  color-scheme: dark;
  font-family: "Zalando Sans", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
body { min-height: 100vh; min-height: 100dvh; overflow: hidden; background: #0a0a0c; }
button, a { font: inherit; }

.login-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: #0a0a0c;
}

.login-media {
  position: relative;
  flex: 0 0 56.944444%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.login-media picture,
.login-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.login-media img {
  object-fit: cover;
  object-position: 50% 50%;
}

.login-media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(10, 10, 12, 0) 50%, rgba(10, 10, 12, 0.6) 85%, #0a0a0c 100%);
}

.auth-column {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 80px;
  background: #0a0a0c;
}

.auth-return {
  position: absolute;
  top: max(24px, env(safe-area-inset-top));
  left: 24px;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #8e8a82;
  text-decoration: none;
}

.auth-return span { font-size: 25px; line-height: 1; transform: translateY(-1px); }
.auth-return:hover { color: #f5f0e8; background: rgba(245, 240, 232, 0.06); }
.auth-return:focus-visible { outline: 2px solid #f5f0e8; outline-offset: 3px; }

.auth-card {
  position: relative;
  display: flex;
  width: min(400px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.heading-block {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
}

.heading-block h1 {
  margin: 0;
  color: #f5f0e8;
  font-family: "Cormorant Dream", Georgia, serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.1;
}

.heading-block p {
  margin: 0;
  color: #8e8a82;
  font-size: 15px;
  line-height: 20px;
}

.auth-methods .auth-provider-button { width: 100%; }

.auth-methods,
.email-auth-form {
  display: flex;
  width: min(320px, 100%);
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.auth-methods[hidden],
.email-auth-form[hidden],
.auth-field[hidden] { display: none !important; }

.auth-secondary-button,
.email-submit-button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(245, 240, 232, 0.35);
  border-radius: 20px;
  color: #f5f0e8;
  background: rgba(245, 240, 232, 0.06);
  cursor: pointer;
  font-size: 14px;
  line-height: 18px;
}

.auth-secondary-button .auth-email-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.auth-secondary-button:hover,
.auth-secondary-button:focus-visible { background: rgba(245, 240, 232, 0.12); }

.auth-guest-button,
.auth-back-button,
.auth-inline-link,
.auth-disabled-link {
  border: 0;
  color: #b9b4aa;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  line-height: 18px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-guest-button { margin-top: 0; }
.auth-guest-button:hover,
.auth-guest-button:focus-visible,
.auth-inline-link:hover,
.auth-inline-link:focus-visible { color: #f5f0e8; }
.auth-disabled-link { cursor: not-allowed; opacity: 0.5; text-decoration: none; }
.auth-back-button { align-self: center; text-decoration: none; }
.auth-reset-link { align-self: center; padding: 0; }

.auth-secondary-button:focus-visible,
.email-submit-button:focus-visible,
.auth-guest-button:focus-visible,
.auth-back-button:focus-visible,
.auth-inline-link:focus-visible,
.auth-disabled-link:focus-visible {
  outline: 2px solid #f5f0e8;
  outline-offset: 3px;
}

.email-auth-form { gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; text-align: left; }
.auth-field label { color: #b9b4aa; font-size: 12px; line-height: 16px; }
.auth-field input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(245, 240, 232, 0.25);
  border-radius: 8px;
  color: #f5f0e8;
  background: rgba(245, 240, 232, 0.06);
  outline: 0;
}
.auth-field input:focus { border-color: rgba(245, 240, 232, 0.75); box-shadow: 0 0 0 2px rgba(245, 240, 232, 0.12); }
.auth-field input:disabled,
.email-submit-button:disabled,
.auth-secondary-button:disabled { cursor: wait; opacity: 0.65; }
.auth-inline-link { padding: 0; font-size: inherit; }

.auth-account-options {
  display: block;
  margin: 0;
  color: #8e8a82;
  font-size: 13px;
  line-height: 18px;
}

.auth-account-separator { white-space: normal; }
.auth-guest-button,
.auth-inline-link {
  display: inline;
  padding: 0;
  vertical-align: baseline;
}

.auth-state-view {
  display: flex;
  width: min(320px, 100%);
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  text-align: center;
}

.auth-state-view[hidden] { display: none !important; }
.auth-state-view h2 {
  margin: 0;
  color: #f5f0e8;
  font-size: 20px;
  font-weight: 500;
  line-height: 26px;
}
.auth-state-view p {
  margin: 0;
  color: #8e8a82;
  font-size: 13px;
  line-height: 19px;
}
.auth-state-email {
  color: #f5f0e8 !important;
  overflow-wrap: anywhere;
}
.auth-reset-form { text-align: left; }
.auth-reset-form h2 { text-align: center; }

.auth-feedback {
  position: absolute;
  top: 206px;
  width: 100%;
  margin: 0;
  color: #8e8a82;
  font-size: 12px;
  line-height: 18px;
}

.auth-feedback[data-tone="error"] { color: #f1aaa0; }

.legal-notice {
  width: 100%;
  margin: 0;
  color: #8e8a82;
  font-size: 12px;
  line-height: 1.6;
}

.legal-notice[hidden] { display: none; }

.legal-notice a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-notice a:focus-visible {
  border-radius: 2px;
  outline: 2px solid #f5f0e8;
  outline-offset: 2px;
}

@media (max-width: 900px) and (min-width: 701px) {
  .auth-column { padding: 48px 32px; }
}

@media (max-width: 700px) {
  body { overflow-x: hidden; overflow-y: auto; }

  .login-shell {
    position: relative;
    display: block;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .login-media {
    position: absolute;
    inset: 0;
    height: 100%;
    min-height: 100%;
  }

  .login-media::after { background: rgba(8, 8, 10, 0.6); }

  .auth-column {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(200px, env(safe-area-inset-top)) 32px max(80px, env(safe-area-inset-bottom));
    background: transparent;
  }

  .auth-return {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    left: 16px;
    color: #f5f0e8;
    background: rgba(10, 10, 12, 0.2);
  }

  .auth-card { gap: 40px; }
  .heading-block { gap: 10px; }
  .heading-block h1 { font-size: 32px; line-height: 1.15; }
  .heading-block p { font-size: 14px; line-height: normal; }
  .auth-feedback { top: 166px; }
  .legal-agreement,
  .legal-account { display: block; }
  .legal-account { margin-top: 19.2px; }
}

@media (max-height: 650px) and (max-width: 700px) {
  .auth-column { padding-top: 96px; padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
