/* ==========================================================================
   The sign-in pages (sign in, sign up, check your email, password, two-factor...) in the winter
   look of the landing page (the home page, /{lang}). Loaded by Areas/Identity/Pages/Shared/_Layout.cshtml
   after the pages' own login.css, register.css and verify-email.css.

   The landing hero's scene fills the screen behind the page: a clear blue winter sky with a low
   sun, Ararat under snow on the horizon (Views/Shared/_AraratSvg.cshtml), a snowy plain at its
   foot, and snow falling at two depths (js/pages/landing-snow.js): a steady fall behind the card
   and a few large, close flakes in front of it. The landing page's floating glass bar sits on top;
   the card is white with an ice-blue hairline, winter-blue links and the plain brand-yellow button.
   Night is auth-winter-night.css. Every rule is scoped to body.tw-auth-winter.
   ========================================================================== */

body.tw-auth-winter {
  display: flow-root; /* keeps the bar's top margin inside, so a short page does not scroll by it */
  min-height: 100vh;
  background: #f4f8fa;
  color: #17303a;
}

.tw-auth-winter main {
  position: relative;
  z-index: 1;
}

/* ---------- The floating glass bar (as on the winter landing page) ---------- */
.tw-auth-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1140px, calc(100% - 24px));
  height: 60px;
  margin: 10px auto 0;
  padding: 0 8px 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 12px 32px -14px rgba(14, 50, 80, 0.38);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
}

.tw-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #17303a;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.tw-auth-brand:hover {
  color: #17303a;
}

.tw-auth-brand img {
  width: auto;
  height: 34px;
}

/* ---------- The card's logo (Areas/Identity/Pages/Shared/_AuthLogo.cshtml) ----------
   The bar's mark, larger: the lime star and the name in dark ink (snow white at night, in
   auth-winter-night.css), with the spacing the full logo used to have below it. */
.tw-card-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #17303a;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1;
}

.tw-card-logo img {
  width: auto;
  height: 40px;
}

.tw-card-logo--auth-logo {
  margin-bottom: 1rem;
}

.tw-card-logo--verify-logo {
  margin-bottom: 1.75rem;
}

.tw-auth-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tw-auth-tools .lang-switcher__toggle {
  height: 40px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: #17303a;
}

.tw-auth-tools .lang-switcher__toggle:hover,
.tw-auth-tools .lang-switcher__toggle[aria-expanded="true"] {
  border-color: transparent;
  background: rgba(43, 111, 138, 0.1);
}

.tw-auth-tools .theme-toggle {
  color: #17303a;
}

/* ---------- The page frames: transparent over the sky ---------- */
.tw-auth-winter .register-page,
.tw-auth-winter .verify-page {
  background: transparent;
}

/* Near the top, a short step below the bar, rather than centred in the screen: centring left a
   wide band of empty sky above the card and pushed its end and the footer below the fold. */
.tw-auth-winter .register-page,
.tw-auth-winter .verify-page {
  min-height: 0;
  padding-top: 0;
}

.tw-auth-winter .auth-page .register-container,
.tw-auth-winter .verify-page {
  align-items: flex-start;
}

.tw-auth-winter .register-container {
  min-height: 0;
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.tw-auth-winter .verify-page {
  padding-top: 2.5rem;
}

/* Phones: the same short step under the bar as the sign-in card has there */
@media (max-width: 575.98px) {
  .tw-auth-winter .verify-page {
    padding-top: 1.25rem;
  }
}

/* ---------- The card: white, an ice-blue hairline, a deep soft shadow ---------- */
.tw-auth-winter .register-shell,
.tw-auth-winter .verify-card {
  border: 1px solid transparent;
  border-radius: 28px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(140deg, #a9d8ec, rgba(169, 216, 236, 0.5) 32%, rgba(45, 85, 102, 0.08) 62%) border-box;
  box-shadow:
    0 1px 2px rgba(20, 60, 80, 0.05),
    0 44px 80px -40px rgba(10, 40, 70, 0.6);
  animation: tw-auth-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.tw-auth-winter .register-page .register-card {
  background: transparent;
}

/* The lime bar on top belongs to the classic cards and the emails */
.tw-auth-winter .verify-bar {
  display: none;
}

.tw-auth-winter .auth-footer,
.tw-auth-winter .verify-footer {
  border-top-color: rgba(45, 85, 102, 0.08);
  background: #f4f8fa;
  color: #6c8793;
}

/* ---------- Text ---------- */
.tw-auth-winter .register-title,
.tw-auth-winter .verify-title {
  color: #17303a;
  letter-spacing: -0.01em;
}

.tw-auth-winter .register-subtitle,
.tw-auth-winter .verify-text {
  color: #5b7482;
}

.tw-auth-winter .register-page .form-label {
  color: #23434f;
}

.tw-auth-winter .register-legal,
.tw-auth-winter .field-hint {
  color: #6c8793;
}

/* Links in winter blue instead of olive */
.tw-auth-winter .text-link,
.tw-auth-winter .register-page .text-link,
.tw-auth-winter .btn-resend {
  color: #1b5fa6;
}

.tw-auth-winter .text-link:hover,
.tw-auth-winter .btn-resend:hover {
  color: #154c86;
}

/* ---------- Fields ---------- */
.tw-auth-winter .input-with-icon .form-control,
.tw-auth-winter .search-input-wrapper .search-input,
.tw-auth-winter .register-page .dob-field,
.tw-auth-winter .form-control,
.tw-auth-winter .form-select {
  border-color: rgba(45, 85, 102, 0.18);
  border-radius: 0.875rem;
}

/* Sign-up's phone field: dialling code + number, styled inline in Register.cshtml */
.tw-auth-winter .phone-code-btn,
.tw-auth-winter .phone-input-group .phone-number-input {
  border-color: rgba(45, 85, 102, 0.18);
}

.tw-auth-winter .phone-code-btn {
  border-radius: 0.875rem 0 0 0.875rem;
  background: #f2f7fa;
}

.tw-auth-winter .phone-input-group .phone-number-input {
  border-radius: 0 0.875rem 0.875rem 0;
}

.tw-auth-winter .phone-code-btn:focus,
.tw-auth-winter .phone-input-group .phone-number-input:focus {
  border-color: #8fc4e2;
  box-shadow: 0 0 0 0.25rem rgba(169, 216, 236, 0.4);
}

.tw-auth-winter .input-with-icon .input-icon,
.tw-auth-winter .search-input-wrapper .search-icon,
.tw-auth-winter .register-page .dob-field .input-icon {
  color: #2b6f8a;
}

.tw-auth-winter .form-control:focus,
.tw-auth-winter .form-select:focus,
.tw-auth-winter .register-page .dob-field.is-focused {
  border-color: #8fc4e2;
  box-shadow: 0 0 0 0.25rem rgba(169, 216, 236, 0.4);
}

/* The validation colours keep their meaning */
.tw-auth-winter .register-page .form-control.is-invalid,
.tw-auth-winter .register-page .dob-field.is-invalid {
  border-color: var(--tw-invalid);
}

.tw-auth-winter .register-page .form-control.is-valid,
.tw-auth-winter .register-page .dob-field.is-valid {
  border-color: var(--tw-valid);
}

.tw-auth-winter .register-page .optional-tag {
  background: #eaf3f8;
  color: #5b7482;
}

.tw-auth-winter .register-page .form-section-title {
  color: #5b7482;
}

.tw-auth-winter .register-page .form-section-title::after {
  background: rgba(45, 85, 102, 0.1);
}

.tw-auth-winter .register-page .password-panel {
  border-color: #dbe9f0;
  background: #f2f7fa;
}

/* ---------- Buttons: one height, one shape; the main one in the plain brand yellow ---------- */
.tw-auth-winter .btn-primary,
.tw-auth-winter .btn-create-account {
  min-height: 52px;
  border: 0;
  border-radius: 0.875rem;
  background-color: #e5ee80;
  background-image: none;
  color: #17303a;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 16px 28px -18px rgba(140, 150, 30, 0.9);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.tw-auth-winter .btn-primary:hover,
.tw-auth-winter .btn-primary:focus,
.tw-auth-winter .btn-create-account:hover,
.tw-auth-winter .btn-create-account:focus {
  background-color: #dae46c;
  color: #17303a;
}

.tw-auth-winter .btn-primary:active,
.tw-auth-winter .btn-create-account:active {
  background-color: #cfd95e;
  color: #17303a;
  transform: translateY(1px);
}

.tw-auth-winter .btn-create-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Google's own white button, in the same shape as the rest */
.tw-auth-winter .btn-google {
  min-height: 52px;
  border-color: rgba(45, 85, 102, 0.18);
  border-radius: 0.875rem;
}

.tw-auth-winter .auth-divider {
  color: #6c8793;
}

.tw-auth-winter .auth-divider::before,
.tw-auth-winter .auth-divider::after {
  border-top-color: rgba(45, 85, 102, 0.14);
}

/* ---------- The check-your-email and two-factor cards ---------- */
.tw-auth-winter .verify-icon {
  background: #dfeff7;
  color: #2b6f8a;
}

/* A refusal or a success keeps its own colour over the winter blue */
.tw-auth-winter .verify-icon.is-error {
  background: rgba(220, 53, 69, 0.12);
  color: #c9364a;
}

.tw-auth-winter .verify-icon.is-success {
  background: rgba(46, 158, 91, 0.14);
  color: #2e9e5b;
}

.tw-auth-winter .verify-email {
  border-color: #dbe9f0;
  background: #f2f7fa;
  color: #17303a;
}


@keyframes tw-auth-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-auth-winter .register-shell,
  .tw-auth-winter .verify-card {
    animation: none;
  }
}

/* Phones: a slimmer bar, the brand name hidden */
@media (max-width: 575.98px) {
  .tw-auth-bar {
    height: 56px;
    padding: 0 6px 0 12px;
  }

  .tw-auth-brand span {
    display: none;
  }

  .tw-auth-winter .register-shell,
  .tw-auth-winter .verify-card {
    border-radius: 22px;
  }

  .tw-auth-winter .register-container {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
}
