/* navy : #1d3557 */
/* one : #457b9d */
/* two : #a8dadc */
/* red : #e63946 */

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #e0f2f1;
}

/* Layout */
.login-wrapper {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* Left Side */
.login-left {
  flex: 1;
  background-color: #457b9d;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.illustration {
  text-align: center;
  max-width: 100%; /* allow full space */
}

.illustration img {
  width: 90%;
  max-width: 470px; /* increase size */
  height: auto;
  opacity: 0.8;
}


/* Right Side */
.login-right {
  flex: 1;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

/* Enhanced Brand Heading */
.login-right h2.brand {
  font-family: 'Segoe UI', sans-serif;
  font-size: 30px;
  font-weight: bold;
  color: #1d3557;
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Enhanced Subheading */
.login-right .subtitle {
  font-size: 12px;
  font-weight: 500;
  color: #457b9d;
  margin-bottom: 30px;
  letter-spacing: 0.3px;
}


.login-right h3 {
  font-size: 20px;
  margin-bottom: 30px;
  color: #333;
}

/* Form */
input {
  display: block;
  margin: 15px 0;
  padding: 12px;
  width: 100%;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  transition: 0.3s ease;
}

input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.inline-fields {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.inline-fields input {
  flex: 1;
  margin: 0; /* remove default vertical margins */
}
#register-age { flex: 0.5; }    /* smaller */
#register-town,
#register-state { flex: 1; }    /* wider */

select#time-zone {
  display: block;
  margin: 15px 0;
  padding: 12px;
  width: 100%;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  background-color: #fff;
  color: #333;
  transition: 0.3s ease;
}

select#time-zone:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}


.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #444;
  font-size: 16px;
}

.forgot-link {
  font-size: 13px;
  color: #457b9d;
  text-align: right;
  display: block;
  margin: 6px 0 16px;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

button {
  background-color: #e63946;
  color: white;
  padding: 12px;
  border: none;
  width: 100%;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #457b9d;
}

.separator {
  text-align: center;
  margin: 20px 0;
  font-size: 14px;
  color: #888;
}

/* Footer */
.form-footer {
  text-align: center;
  font-size: 14px;
}

.form-footer a {
  color: #457b9d;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

.form-footer-reset{
  padding-top:20px;
}
/* Toast Notification */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 320px;
  max-width: 90vw;
  padding: 14px 20px;
  background-color: white;
  color: #333;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  animation: fadeSlide 0.4s ease-out;
  border-left: 6px solid transparent;
  border-bottom: 4px solid transparent;
}

.toast.success { border-bottom-color: #22c55e; }
.toast.error { border-bottom-color: #ef4444; }
.toast.warning { border-bottom-color: #facc15; }
.toast.info { border-bottom-color: #3b82f6; }

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */

/* ===== MOBILE (≤768px): Login + Register ===== */
@media (max-width: 768px) {
  /* Page stack + safe spacing */
  .login-wrapper {
    flex-direction: column;
    min-height: 100dvh;
    padding: 0;
    background: #e0f2f1;
  }

  /* Teal logo header band (keeps light logos visible) */
  .login-left {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;                 /* compact header */
    padding: 0;
    background: #457b9d;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    margin: 0 0 12px 0;            /* gap below header */
  }
  .illustration { width: 100%; text-align: center; }
  .illustration img {
    max-width: 160px;
    height: auto;
    opacity: 1 !important;         /* override desktop 0.8 */
    display: block;
    margin: 0 auto;
  }

  /* Centered card for the form/content */
  .login-right {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 16px;
    padding: 24px 18px calc(18px + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  /* Headings */
  .login-right h2.brand {
    font-size: 22px;
    text-align: center;
    margin-bottom: 2px;
    letter-spacing: .3px;
  }
  .login-right .subtitle {
    font-size: 12px;
    text-align: center;
    margin-bottom: 14px;
  }

  /* Inputs & selects: comfy taps */
  input,
  select#time-zone {
    font-size: 15px;
    padding: 12px;
    border-radius: 10px;
  }
  .password-wrapper input { padding-right: 42px; }
  .toggle-password { right: 10px; }

  /* Buttons */
  button {
    font-size: 16px;
    padding: 12px;
    border-radius: 10px;
  }

  /* Inline field groups:
     - Login has none; Register has 2 groups (Email+Age, Town+State+Zip)
     - Stack everything on mobile for perfect readability */
  .inline-fields {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin: 10px 0;
  }

  /* Links & footer */
  .forgot-link {
    font-size: 12px;
    text-align: center;
    margin: 8px 0 12px;
  }
  .separator { margin: 12px 0; }
  .form-footer { font-size: 13px; text-align: center; }

  /* Toasts fit narrow screens */
  #toast-container { top: 12px; }
  .toast { min-width: 260px; padding: 12px 16px; }
}

/* ===== MOBILE (≤1024px): make Register match Login ===== */
@media (max-width: 1024px) {
  /* Page stack + background */
  .login-wrapper {
    flex-direction: column;
    min-height: 100dvh;
    background: #e0f2f1;
    padding: 0;
  }

  /* Teal header band (same as login) */
  .login-left {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;                 /* match login header height */
    background: #457b9d;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    margin: 0;                     /* remove extra gap */
    padding: 0;
    width: 100%;
  }

  .illustration { width: 100%; text-align: center; }
  .illustration img {
    max-width: 140px;              /* same logo size as login */
    height: auto;
    display: block;
    margin: 0 auto;
    opacity: 1 !important;
  }

  /* Card (identical spacing to login) */
  .login-right {
    width: 100%;
    max-width: 420px;
    margin: -44px auto 16px;       /* slight overlap under teal band */
    padding: 20px 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .register .login-right {
    width: 100%;
    max-width: 920px;
    margin: 20px;
    padding: 0px 16px;
    }

  /* Headings */
  .login-right h2.brand {
    font-size: 20px;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: .3px;
  }
  .login-right .subtitle {
    font-size: 12px;
    text-align: center;
    margin-bottom: 12px;
  }

  /* Inputs & selects */
  input,
  select#time-zone {
    font-size: 15px;
    padding: 12px;
    border-radius: 10px;
  }
  .password-wrapper input { padding-right: 42px; }
  .toggle-password { right: 10px; }

  /* Buttons */
  button {
    font-size: 16px;
    padding: 12px;
    border-radius: 10px;
  }

  /* Register’s inline groups: stack on mobile */
  .inline-fields {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin: 8px 0;
  }

  /* Links, separators */
  .forgot-link { font-size: 12px; text-align: center; margin: 6px 0 10px; }
  .separator { margin: 12px 0; }
  .form-footer { font-size: 13px; text-align: center; }
}


/* Hide left section (image & bg) in mobile */
@media (max-width: 768px) {
  .register .login-left {
    display: none !important;   /* removes image & background */
  }
  .register .login-wrapper {
    background: none !important; /* no background color */
  }
}

/* Tablet/small laptops also: */
@media (max-width: 1024px) {
  .register .login-left {
    display: none !important;
  }
  .register .login-wrapper {
    background: none !important;
  }
}
