/* BeCareFood · Login screen, Liquid Glass
   Requires liquid-glass.css loaded first. */

.lg-login {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--lg-safe-top) + 12px) var(--lg-pad) 0;
}

/* Brighter ambient color for this screen */
.lg-login::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(360px 360px at 10% 6%, rgba(46, 158, 91, .38), transparent 70%),
    radial-gradient(300px 300px at 100% 42%, rgba(255, 122, 69, .30), transparent 70%),
    radial-gradient(320px 320px at 20% 78%, rgba(45, 156, 219, .26), transparent 70%);
}

.lg-login__hero {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  margin-top: 64px;
  min-height: 280px; /* prevent layout shift during re-renders */
}

/* Logo as layered glass: the wrapper blurs what is behind it */
.lg-glass-logo {
  width: 170px; height: 170px; border-radius: 50%;
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  backdrop-filter: blur(18px) saturate(190%);
  box-shadow: 0 22px 44px rgba(31, 42, 46, .20);
}
.lg-glass-logo img, .lg-glass-logo svg { width: 100%; height: 100%; display: block; }

.lg-login__name { font-size: 38px; letter-spacing: -1px; margin-top: 8px; color: var(--lg-ink); }
.lg-login__version { margin-top: -6px; }

/* Bottom glass sheet with the form */
.lg-login__sheet {
  position: fixed; z-index: 10;
  left: 10px; right: 10px; bottom: calc(var(--lg-safe-bottom) + 12px);
  max-width: 540px; margin: 0 auto;
  border-radius: 36px; padding: 22px 18px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.lg-login__text {
  margin: 0 0 4px; text-align: center;
  font: 500 16px/1.5 var(--lg-font-body); color: var(--lg-muted);
}

.lg-field {
  height: 56px; border-radius: 20px; padding: 0 16px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(31, 42, 46, .08);
}
.lg-field svg { flex-shrink: 0; }
.lg-field input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: 500 17px var(--lg-font-body); color: var(--lg-ink);
}
.lg-field input::placeholder { color: #6B7570; }
.lg-field:focus-within { border-color: var(--lg-blue); box-shadow: 0 0 0 3px rgba(45, 156, 219, .25); }

/* Coral action button (text stays dark for contrast on coral) */
.lg-btn--coral {
  min-height: 56px; width: 100%;
  font-family: var(--lg-font-title); font-size: 18px;
  color: #1F2A2E;
  background: rgba(255, 122, 69, .95);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -1px 0 rgba(255, 255, 255, .2),
    0 12px 28px rgba(255, 122, 69, .32);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lg-field { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
  :root:not([data-theme="light"]) .lg-field input::placeholder { color: #9AA6A0; }
}
:root[data-theme="dark"] .lg-field { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .lg-field input::placeholder { color: #9AA6A0; }

/* Short screens (iPhone SE): tighten the hero */
@media (max-height: 700px) {
  .lg-login__hero { margin-top: 24px; gap: 10px; }
  .lg-glass-logo { width: 130px; height: 130px; }
  .lg-login__name { font-size: 32px; }
}
