/*-----------------------------------*\
  #LOGIN.CSS
\*-----------------------------------*/

/* Modal backdrop */
.login-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.login-modal-backdrop.open { display: flex; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Modal box */
.login-modal {
  background-color: var(--smoky-black-1);
  border: 1px solid hsla(38,61%,73%,0.3);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  width: 780px;
  max-width: 95vw;
  min-height: 500px;
  display: flex;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
  animation: slideUp 0.4s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Close */
.login-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--quick-silver);
  font-size: 2.4rem;
  cursor: pointer;
  z-index: 20;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-1);
  line-height: 1;
}
.login-modal-close:hover { color: var(--gold-crayola); background-color: var(--white-alpha-10); }

/* Form panels */
.lm-form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
}

.lm-sign-in {
  left: 0; width: 50%; z-index: 2;
  background-color: var(--eerie-black-2);
  display: flex; align-items: center; justify-content: center;
}
.login-modal.active .lm-sign-in { transform: translateX(100%); }

.lm-sign-up {
  left: 0; width: 50%; opacity: 0; z-index: 1;
  background-color: var(--eerie-black-2);
  display: flex; align-items: center; justify-content: center;
}
.login-modal.active .lm-sign-up {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: lmMove 0.6s;
}
@keyframes lmMove {
  0%,  49.99% { opacity: 0; z-index: 1; }
  50%, 100%   { opacity: 1; z-index: 5; }
}

/* Form inner */
.lm-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  width: 100%;
  height: 100%;
}
.lm-form h2 {
  color: var(--white);
  font-family: var(--fontFamily-forum);
  font-size: 2.8rem;
  font-weight: var(--weight-regular);
  margin-bottom: 6px;
  text-align: center;
}
.lm-form .lm-subtitle {
  color: var(--gold-crayola);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: var(--letterSpacing-2);
  font-weight: var(--weight-bold);
  margin-bottom: 24px;
  text-align: center;
}
.lm-separator-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}
.lm-sep {
  width: 8px; height: 8px;
  border: 1px solid var(--gold-crayola);
  transform: rotate(45deg);
  animation: rotate360 15s linear infinite;
}
.lm-form input {
  background-color: hsla(210,4%,11%,0.8);
  color: var(--white);
  border: 1px solid var(--white-alpha-10);
  padding: 12px 16px;
  font-size: 1.3rem;
  width: 100%;
  outline: none;
  margin-bottom: 14px;
  transition: border-color var(--transition-2);
  font-family: var(--fontFamily-dm_sans);
  display: block;
}
.lm-form input::placeholder { color: var(--quick-silver); }
.lm-form input:focus        { border-color: var(--gold-crayola); }

.lm-form a {
  color: var(--quick-silver);
  font-size: 1.2rem;
  text-decoration: none;
  margin-bottom: 18px;
  display: inline-block;
  transition: var(--transition-1);
}
.lm-form a:hover { color: var(--gold-crayola); }

.lm-form .lm-error {
  color: #e57373;
  font-size: 1.1rem;
  margin-bottom: 8px;
  text-align: center;
  min-height: 16px;
}
.lm-form .lm-success {
  color: #81c784;
  font-size: 1.1rem;
  margin-bottom: 8px;
  text-align: center;
}

/* Toggle panel */
.lm-toggle-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: all 0.6s ease-in-out;
  border-radius: 100px 0 0 80px;
  z-index: 1000;
}
.login-modal.active .lm-toggle-container {
  transform: translateX(-100%);
  border-radius: 0 100px 80px 0;
}
.lm-toggle {
  background: linear-gradient(160deg, hsla(38,61%,73%,0.15) 0%, var(--smoky-black-1) 60%);
  height: 100%;
  position: relative;
  left: -100%;
  width: 200%;
  transform: translateX(0);
  transition: all 0.6s ease-in-out;
  border-left:  1px solid hsla(38,61%,73%,0.2);
  border-right: 1px solid hsla(38,61%,73%,0.2);
}
.login-modal.active .lm-toggle { transform: translateX(50%); }

.lm-toggle-panel {
  position: absolute;
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 36px;
  text-align: center;
  top: 0;
  transition: all 0.6s ease-in-out;
}
.lm-toggle-panel h2 {
  color: var(--white);
  font-family: var(--fontFamily-forum);
  font-size: 2.8rem;
  font-weight: var(--weight-regular);
  margin-bottom: 10px;
}
.lm-toggle-panel p {
  color: var(--quick-silver);
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 28px;
}
.lm-gold-line {
  width: 60px; height: 1px;
  background-color: var(--gold-crayola);
  margin: 0 auto 20px;
}

.lm-toggle-left  { transform: translateX(-200%); }
.login-modal.active .lm-toggle-left  { transform: translateX(0); }
.lm-toggle-right { right: 0; transform: translateX(0); }
.login-modal.active .lm-toggle-right { transform: translateX(200%); }

/* Mobile fallback */
@media (max-width: 600px) {
  .login-modal { min-height: unset; flex-direction: column; }
  .lm-toggle-container { display: none; }

  .lm-sign-in,
  .lm-sign-up {
    position: relative;
    left: auto;
    width: 100%;
    height: auto;
    opacity: 1;
    z-index: auto;
  }

  .lm-sign-up { display: none; }
  .login-modal.active .lm-sign-in { transform: none; display: none; }
  .login-modal.active .lm-sign-up { transform: none; display: flex; }

  /* Mobile toggle buttons below forms */
  .lm-mobile-toggle {
    text-align: center;
    padding: 16px;
    border-top: 1px solid var(--white-alpha-10);
    font-size: 1.2rem;
    color: var(--quick-silver);
  }
  .lm-mobile-toggle button {
    display: inline;
    background: none;
    border: none;
    color: var(--gold-crayola);
    font-size: 1.2rem;
    font-weight: var(--weight-bold);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0;
    margin-left: 6px;
    font-family: var(--fontFamily-dm_sans);
  }
  .lm-form { padding: 30px 24px; }
}
