/* ========================================
   HIVEMIND - LOGIN & SIGNUP STYLES
   ======================================== */

/* === LOGIN PAGE SPECIFIC STYLES === */
#login-page.main-page { 
  background-image: url('/Images/Login5.jpg'); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  position: relative; 
  overflow: hidden;
}

/* Input Group - Bottom Left (Default Desktop Styles) */
#login-input-group {
  position: absolute;
  bottom: 2vh; 
  left: 5vw;   
  width: 320px; 
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  gap: 1rem; 
  z-index: 10;
  opacity: 0; 
  animation-name: slideInFromLeftInputs; 
  animation-duration: 0.7s;
  animation-delay: 0.5s; 
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.login-field-wrapper {
  width: 100%;
}

/* Default Input Styling */
.login-input.form-control {
  background-color: rgba(255, 255, 255, 0.9); 
  border: 1px solid var(--border-color, #BDC3C7);
  color: var(--text-color); 
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.login-input.form-control::placeholder {
  color: var(--light-text-color); 
  opacity: 1;
}

.login-input.form-control::-ms-input-placeholder { 
  color: var(--light-text-color); 
}

.login-input.form-control:-ms-input-placeholder { 
  color: var(--light-text-color); 
}

.login-input.form-control:focus {
  background-color: #ffffff; 
  border-color: var(--amber-color);
  color: var(--text-color);
  box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.35); 
  outline: none;
}

/* Button Group Wrapper - Bottom Center (Default Desktop Styles) */
#login-button-group-wrapper {
  position: absolute; 
  bottom: 0;
  left: 50%; 
  transform: translateX(-50%); 
  width: 100%; 
  max-width: 320px; 
  z-index: 10; 
  padding-bottom: 5vh;
}

/* Button Group (Content within the wrapper) */
#login-button-group {
  display: flex;
  flex-direction: column;
  align-items: center; 
  gap: 1rem; 
  width: 100%; 
  box-sizing: border-box; 
  opacity: 0; 
  transform: translateY(50px); 
  animation-name: slideUpAndFadeButtonGroupNoInitialTransform; 
  animation-duration: 0.7s;
  animation-delay: 0.7s;    
  animation-timing-function: ease-out;
  animation-fill-mode: forwards; 
}

/* Default Action Button Styling */
#login-action-button.btn {
  background-color: var(--amber-color);
  border: none;
  color: var(--primary-color); 
  padding: 0.75rem 1.25rem;
  font-size: 1.15rem;
  font-weight: bold;
  border-radius: 8px;
  width: 100%; 
  transition: background-color 0.2s ease-in-out;
  cursor: pointer;
  text-transform: uppercase;
}

#login-action-button.btn:hover {
  background-color: #e0a800; 
}

/* Default Login Links Styling */
#login-links {
  font-size: 1.2rem;
  text-align: center;
}

#login-links a {
  color: var(--amber-color); 
  text-decoration: underline;
  transition: color 0.2s ease-in-out, text-shadow 0.2s ease-in-out;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7); 
  font-weight: 500; 
}

#login-links a:hover {
  color: #e0a800; 
}

/* Error Messages on Login Page */
#login-input-group .login-error-message,
#login-button-group .login-error-message {
  font-size: 0.9rem;
  min-height: 1.2em; 
  color: #ffdddd; 
  background-color: rgba(100,0,0,0.4); 
  padding: 5px 8px;
  border-radius: 4px;
  text-shadow: 1px 1px 1px #000;
}

#login-input-group .login-error-message {
  text-align: left;
}

#login-button-group .login-error-message {
  text-align: center;
}

/* === SIGNUP PAGE STYLES === */
#signup-page.main-page {
  background-image: url('/Images/Login5.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 30px 20px;
  min-height: 100vh;
  position: relative;
}

/* === MEDIA QUERIES FOR RESPONSIVE LOGIN === */
@media (max-width: 768px) {
  #login-page.main-page {
    background-size: contain;
    background-position: center top;
    background-color: #333;
    position: relative;
    min-height: 100vh;
    padding: 20px; 
    box-sizing: border-box;
    overflow-y: auto; 
  }

  #login-input-group {
    position: absolute;    
    bottom: 20vh;
    left: 50%;             
    transform: translateX(-50%); 
    width: 90%;            
    max-width: 380px;      
    gap: 0.8rem;
  }

  #login-button-group-wrapper { 
    position: absolute; 
    bottom: 4vh;        
    right: 4vw;         
    left: auto;
    transform: none;
    width: auto;
    max-width: 280px;
    padding-bottom: 0;
  }

  #login-button-group {
    align-items: flex-end;
    gap: 0.5rem;
  }

  .login-input.form-control,
  #login-page-enrollment-code-input {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
  }

  #login-input-group .login-field-wrapper.mt-3 {
    margin-top: 0.75rem !important;
  }

  #login-action-button.btn {
    padding: 0.7rem 1.1rem;
    font-size: 1.1rem;
    width: 160px;
    max-width: 180px;
  }

  #login-links {
    font-size: 0.9rem; 
    text-align: right; 
  }
}

/* Optional: Further adjustments for very small phone screens */
@media (max-width: 400px) {
  #login-page.main-page {
    padding: 15px;
  }

  #login-input-group {
    bottom: 22vh;
    gap: 0.6rem;
  }

  #login-button-group-wrapper {
    bottom: 3vh;
    right: 3vw;
  }

  .login-input.form-control,
  #login-page-enrollment-code-input {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
  }

  #login-action-button.btn {
    padding: 0.65rem 1rem;
    font-size: 1rem;
    width: auto;
    max-width: 150px;
  }

  #login-links {
    font-size: 0.85rem;
  }
}

/* Landscape orientation optimizations for login page - ONLY when overlay is active */
@media (orientation: landscape) and (max-height: 500px) {
  body.landscape-overlay-active #login-page.main-page {
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    padding: 5px !important;
    position: fixed !important;
    overflow: hidden !important;
    background-size: cover !important;
    background-position: center !important;
  }

  body.landscape-overlay-active #login-input-group {
    position: absolute !important;
    bottom: 20vh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 85% !important;
    max-width: 380px !important;
    gap: 0.7rem !important;
  }

  body.landscape-overlay-active #login-button-group-wrapper {
    position: absolute !important;
    bottom: 5vh !important;
    right: 5vw !important;
    left: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: 200px !important;
    padding-bottom: 0 !important;
  }

  body.landscape-overlay-active .login-input.form-control,
  body.landscape-overlay-active #login-page-enrollment-code-input {
    padding: 0.7rem 0.9rem !important;
    font-size: 0.95rem !important;
  }

  body.landscape-overlay-active #login-action-button.btn {
    padding: 0.7rem 1.2rem !important;
    font-size: 1rem !important;
    width: 100% !important;
    max-width: 180px !important;
  }

  body.landscape-overlay-active #login-links {
    font-size: 0.9rem !important;
    text-align: center !important;
  }

  body.landscape-overlay-active #login-button-group {
    align-items: center !important;
    gap: 0.6rem !important;
  }

  /* Ensure proper button spacing in landscape overlay */
  body.landscape-overlay-active #show-progress-btn {
    margin-bottom: 20px !important; /* Reset spacing since feedback button is now absolute positioned */
    padding: 12px 24px !important;
  }

  body.landscape-overlay-active #logout-button {
    bottom: 15px !important;
    left: 15px !important;
    z-index: 1050 !important;
  }

  body.landscape-overlay-active .exit-button {
    bottom: 15px !important;
    right: 15px !important;
    z-index: 1050 !important;
  }
}

/* Additional landscape optimizations for smaller devices - ONLY when overlay is active */
@media (orientation: landscape) and (max-height: 500px) {
  body.landscape-overlay-active #login-page.main-page {
    padding: 3px !important;
  }

  body.landscape-overlay-active #login-input-group {
    bottom: 15vh !important;
    gap: 0.5rem !important;
  }

  body.landscape-overlay-active #login-button-group-wrapper {
    bottom: 2vh !important;
    right: 2vw !important;
  }

  body.landscape-overlay-active .login-input.form-control,
  body.landscape-overlay-active #login-page-enrollment-code-input {
    padding: 0.5rem 0.7rem !important;
    font-size: 0.8rem !important;
  }

  body.landscape-overlay-active #login-action-button.btn {
    padding: 0.5rem 0.8rem !important;
    font-size: 0.9rem !important;
    max-width: 120px !important;
  }

  body.landscape-overlay-active #login-links {
    font-size: 0.7rem !important;
  }

  /* Ensure proper button spacing in small device landscape overlay */
  body.landscape-overlay-active #show-progress-btn {
    margin-bottom: 20px !important; /* Reset spacing since feedback button is now absolute positioned */
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
  }

  body.landscape-overlay-active #logout-button {
    bottom: 10px !important;
    left: 10px !important;
    z-index: 1050 !important;
  }

  body.landscape-overlay-active .exit-button {
    bottom: 10px !important;
    right: 10px !important;
    z-index: 1050 !important;
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
  }
}
