/* SEED Film theme for the public CrushFTP login. */
:root,
html[data-theme="light"] {
  --accent-color: #fefe8d;
  --accent-background-primary: #fefe8d;
  --accent-background-secondary: #f7f7f2;
  --background-primary: #ffffff;
  --background-secondary: #ffffff;
  --border-color: #111111;
  --text-primary: #111111;
  --text-secondary: #111111;
  --primary-shadow: none;
  --font-family: Arial, Helvetica, sans-serif;
}

html[data-theme="dark"] {
  --accent-color: #fefe8d;
  --accent-background-primary: #fefe8d;
  --accent-background-secondary: #292929;
  --background-primary: #181818;
  --background-secondary: #181818;
  --border-color: #f3f3ee;
  --text-primary: #f3f3ee;
  --text-secondary: #111111;
  --primary-shadow: none;
  --font-family: Arial, Helvetica, sans-serif;
}

body.login-page .auth-section,
body.login-page .auth-form-section,
body.login-page .auth-form-container,
body.login-page .auth-banner-container {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

body.login-page .auth-section {
  position: relative;
  z-index: 1;
}

body.login-page {
  background: var(--background-primary) !important;
}

body.login-page .auth-section::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, #111 0 35%, #fefe8d 35% 52%, #111 52% 100%);
  z-index: 5;
}

body.login-page .auth-form-section {
  position: relative;
  z-index: 1;
}

.seed-login-lottie {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.seed-login-lottie svg {
  overflow: visible !important;
}

#seed-plant-nexus-lottie {
  right: -1%;
  bottom: -7%;
  width: min(34vw, 560px);
  height: min(34vw, 560px);
  opacity: .14;
}

#seed-dandelion-lottie {
  left: 7%;
  top: 50%;
  bottom: auto;
  width: min(24vw, 390px);
  height: min(42vh, 450px);
  opacity: .1;
  transform: translateY(-50%);
}

html[data-theme="dark"] .seed-login-lottie {
  filter: invert(1);
}

body.login-page .auth-form-container {
  max-width: 31rem !important;
  padding: 2.25rem 2.5rem;
  border: 1px solid var(--text-primary);
  background: color-mix(in srgb, var(--background-primary) 96%, transparent);
}

body.login-page .logo {
  width: min(100%, 22rem);
  height: auto;
  min-height: 4rem;
}

html[data-theme="dark"] body.login-page w-image.logo {
  filter: invert(1);
}

body.login-page label {
  color: var(--text-primary);
  font-weight: 700;
}

body.login-page .input {
  min-height: 3.25rem;
  border: 0;
  border-bottom: 2px solid var(--text-primary);
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
}

body.login-page .input:focus {
  border-color: var(--text-primary);
  box-shadow: 0 3px 0 #fefe8d;
}

body.login-page .primary-button {
  min-height: 3rem;
  border: 1px solid #111;
  border-radius: 999px;
  background: #fefe8d;
  color: #111;
  font-weight: 800;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}

body.login-page .primary-button:hover,
body.login-page .primary-button:focus-visible {
  background: #111;
  color: #fff;
  transform: translateY(-1px);
}

body.login-page #forgotPasswordRow {
  flex: 0 0 auto;
}

body.login-page #forgotLink {
  width: auto;
  max-width: 100%;
  min-height: 2.2rem;
  padding: .4rem .65rem !important;
  color: #111 !important;
  font-size: 10px !important;
  letter-spacing: -.015em;
  line-height: 1.1;
  white-space: nowrap;
}

body.login-page #sign-in-button,
body.login-page #sign-in-button:hover,
body.login-page #sign-in-button:focus-visible,
body.login-page #forgotLink,
body.login-page #forgotLink:hover,
body.login-page #forgotLink:focus-visible {
  background: #fefe8d !important;
  color: #111 !important;
}

body.login-page .forgot-link,
body.login-page a {
  color: var(--text-primary) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.login-page .multi-theme-icon-container,
body.login-page .language-dropdown {
  top: 1.4rem;
  z-index: 20 !important;
  pointer-events: auto !important;
}

body.login-page .language-dropdown .select,
body.login-page .language-dropdown select {
  position: relative;
  z-index: 21 !important;
  pointer-events: auto !important;
}

@media (max-width: 640px) {
  body.login-page .auth-form-section { padding: 1rem !important; }
  body.login-page .auth-form-container {
    width: 100%;
    padding: 1.6rem 1.25rem;
    border: 0;
  }
  #seed-plant-nexus-lottie {
    right: -8%;
    bottom: -8%;
    width: min(48vw, 460px);
    height: min(48vw, 460px);
  }
  #seed-dandelion-lottie {
    left: -3%;
    width: min(22vw, 220px);
    height: min(28vh, 260px);
  }
}

/* iPhone portrait: compact form and a readable single-column footer. */
@media (max-width: 640px) and (orientation: portrait) {
  html,
  body.login-page {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.login-page .auth-section,
  body.login-page.has-custom-footer #page-columns {
    height: auto !important;
    min-height: calc(100dvh - 4.25rem) !important;
  }

  body.login-page .auth-form-section {
    align-items: flex-start !important;
    overflow: visible;
    padding: 4.25rem .75rem 1.25rem !important;
  }

  body.login-page .auth-form-container {
    width: min(100%, 27rem) !important;
    max-width: 27rem !important;
    margin: 0 auto;
    padding: 1rem .75rem 1.35rem;
  }

  body.login-page .logo {
    width: min(72vw, 15rem);
    min-height: 2.75rem;
  }

  body.login-page #loginFormCard > .mb-5 {
    margin-bottom: 1.5rem !important;
  }

  body.login-page #usernameRow,
  body.login-page #passwordRow {
    margin-bottom: 1.15rem !important;
  }

  body.login-page .input {
    min-height: 2.85rem;
  }

  body.login-page #forgotLink {
    min-height: 2.15rem;
    padding: .35rem .6rem !important;
    font-size: 10px !important;
  }

  body.login-page .language-dropdown {
    top: .85rem;
    right: .75rem;
    max-width: 9.5rem;
  }

  body.login-page .multi-theme-icon-container {
    top: .85rem;
    left: .75rem;
  }

  body.login-page #customFooterLoginPageContainer {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex-direction: column;
    gap: .15rem;
    width: 100%;
    min-height: 4.25rem;
    margin: 0;
    padding: .55rem 1rem .7rem;
    font-size: .72rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  #seed-plant-nexus-lottie {
    right: -12%;
    bottom: 3.5rem;
    width: 52vw;
    height: 52vw;
    opacity: .08;
  }

  #seed-dandelion-lottie {
    display: none;
  }
}

/* iPhone landscape: use the short viewport efficiently and never center-crop the form. */
@media (max-width: 1000px) and (max-height: 520px) and (orientation: landscape) {
  html,
  body.login-page {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.login-page .auth-section,
  body.login-page.has-custom-footer #page-columns {
    height: auto !important;
    min-height: calc(100dvh - 2.75rem) !important;
  }

  body.login-page .auth-form-section {
    align-items: flex-start !important;
    overflow: visible;
    padding: 2.75rem 1rem .75rem !important;
  }

  body.login-page .auth-form-container {
    width: min(88vw, 31rem) !important;
    max-width: 31rem !important;
    margin: 0 auto;
    padding: .35rem 1.25rem .8rem;
    border: 0;
  }

  body.login-page .logo {
    width: min(42vw, 12rem);
    min-height: 2.25rem;
  }

  body.login-page #loginFormCard > .mb-5 {
    margin-bottom: .65rem !important;
  }

  body.login-page #usernameRow,
  body.login-page #passwordRow {
    margin-bottom: .6rem !important;
  }

  body.login-page .input {
    min-height: 2.45rem;
  }

  body.login-page #forgotPasswordRow {
    margin-left: .75rem;
  }

  body.login-page #forgotLink {
    min-height: 2rem;
    padding: .3rem .55rem !important;
    font-size: 10px !important;
  }

  body.login-page #sign-in-button {
    min-height: 2.5rem;
  }

  body.login-page .language-dropdown {
    top: .65rem;
    right: .75rem;
    max-width: 8.5rem;
  }

  body.login-page .multi-theme-icon-container {
    top: .65rem;
    left: .75rem;
  }

  body.login-page #customFooterLoginPageContainer {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex-direction: column;
    gap: .05rem;
    width: 100%;
    min-height: 2.75rem;
    margin: 0;
    padding: .3rem 1rem .4rem;
    font-size: .62rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  #seed-plant-nexus-lottie,
  #seed-dandelion-lottie {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seed-login-lottie { display: none !important; }
  body.login-page * { transition: none !important; }
}