/* login_register.css */
/* Consolidated stylesheet for login and register pages */

/* ========================================
   BODY AND GENERAL STYLES
   ======================================== */

body {
  margin-left: 3.75rem; /* Sidebar collapsed width */
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: var(--light-blue);
  color: var(--dark-green);
  transition: margin-left 0.3s ease;
}

body.sidebar--open {
  margin-left: 12.5rem; /* Sidebar expanded width */
}

/* ========================================
   CONTENT CONTAINER
   ======================================== */

.content-container {
  padding: 0;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  background-color: var(--light-blue);
}

/* ========================================
   LOGIN PAGE SECTIONS
   ======================================== */

.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  background-color: var(--light-blue);
}

.login-container {
  background-color: var(--pale-turquoise);
  padding: 2rem; /* 32px */
  border-radius: 0.5rem; /* 8px */
  box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1);
  max-width: 30rem; /* 480px */
  width: 100%;
}

/* ========================================
   REGISTER PAGE SECTIONS
   ======================================== */

.already-registered-section {
  background-color: var(--pale-turquoise);
  padding: 2rem; /* 32px */
  border-radius: 0.5rem; /* 8px */
  box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1);
  max-width: 30rem; /* 480px */
  width: 100%;
  margin-bottom: 2rem;
  text-align: center;
}

.already-registered-section .section-title {
  margin-bottom: 1.5rem;
}

.login-link-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--steel-blue);
  color: var(--background-color);
  text-decoration: none;
  border-radius: 0.25rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.login-link-btn:hover {
  background-color: var(--cadet-blue);
}

.login-link-btn:active {
  transform: scale(0.98);
}

.register-section {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--light-blue);
  width: 100%;
}

.register-container {
  background-color: var(--pale-turquoise);
  padding: 2rem; /* 32px */
  border-radius: 0.5rem; /* 8px */
  box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1);
  max-width: 30rem; /* 480px */
  width: 100%;
}

/* ========================================
   MESSAGE STYLES
   ======================================== */

.message {
  color: var(--dark-green);
  margin-bottom: 1rem; /* 16px */
  font-weight: bold;
  text-align: center;
  padding: 0.75rem;
  background-color: rgba(70, 130, 180, 0.1);
  border-radius: 0.25rem;
}

/* ========================================
   SECTION TITLES
   ======================================== */

.section-title {
  font-size: 1.75rem; /* 28px */
  color: var(--dark-green);
  margin-bottom: 1.5rem; /* 24px */
  text-align: center;
}

.section-subtitle {
  font-size: 1.5rem; /* 24px */
  color: var(--dark-green);
  margin-top: 2rem; /* 32px */
  margin-bottom: 1rem;
  text-align: center;
}

/* ========================================
   FORM STYLES
   ======================================== */

.login-form,
.register-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 1.5rem; /* 24px */
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem; /* 8px */
  font-size: 1rem; /* 16px */
  color: var(--steel-blue);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem; /* 12px */
  font-size: 1rem; /* 16px */
  border: 0.0625rem solid var(--steel-blue); /* 1px solid */
  border-radius: 0.25rem; /* 4px */
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--cadet-blue);
  box-shadow: 0 0 4px rgba(70, 130, 180, 0.2);
}

/* ========================================
   CAPTCHA CONTAINER
   ======================================== */

.captcha-container {
  border: 2px dashed var(--steel-blue);
  padding: 1rem;
  border-radius: 0.25rem;
  background-color: rgba(70, 130, 180, 0.05);
}

.captcha-container label {
  color: var(--steel-blue);
  font-weight: 600;
}

/* ========================================
   PASSWORD FEEDBACK
   ======================================== */

.password-feedback {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: rgba(70, 130, 180, 0.05);
  border-radius: 0.25rem;
  border-left: 4px solid var(--steel-blue);
}

/* Hide the container when all items are empty */
.password-feedback:has(.feedback-item:not(:empty)) {
  display: block;
}

.password-feedback:not(:has(.feedback-item:not(:empty))) {
  display: none;
}

.password-feedback .feedback-item {
  color: var(--dark-green);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
  padding: 0.25rem 0;
}

.password-feedback .feedback-item:empty {
  display: none;
}

.password-feedback .feedback-item:last-child {
  margin-bottom: 0;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.submit-btn,
.register-btn,
.login-btn {
  padding: 0.75rem; /* 12px */
  font-size: 1rem; /* 16px */
  width: 100%;
  background-color: var(--steel-blue);
  color: var(--background-color);
  border: none;
  border-radius: 0.25rem; /* 4px */
  cursor: pointer;
  margin-top: 1rem; /* 16px */
  transition: background-color 0.3s ease;
  font-weight: 600;
}

.submit-btn:hover,
.register-btn:hover,
.login-btn:hover {
  background-color: var(--cadet-blue);
}

.submit-btn:active,
.register-btn:active,
.login-btn:active {
  transform: scale(0.98);
}

/* ========================================
   OAUTH SEPARATOR
   ======================================== */

.oauth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0 1.5rem 0;
  gap: 1rem;
}

.oauth-separator::before,
.oauth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--steel-blue);
}

.oauth-separator span {
  color: var(--steel-blue);
  font-size: 0.9rem;
  var(--background-color)-space: nowrap;
  flex-shrink: 0;
}

/* ========================================
   GOOGLE SIGN-IN BUTTON
   ======================================== */

.google-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--pale-turquoise);
  border: 1px solid var(--steel-blue);
  border-radius: 0.25rem;
  color: var(--dark-green);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.google-signin-btn:hover {
  background: var(--light-blue);
  border-color: var(--cadet-blue);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.google-signin-btn:active {
  transform: scale(0.98);
}

.google-signin-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ========================================
   LINKS AND TEXT
   ======================================== */

.forgot-password-container {
  text-align: center;
  margin-top: 1.5rem;
}

.forgot-password-link {
  color: var(--steel-blue);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.forgot-password-link:hover {
  text-decoration: underline;
  color: var(--cadet-blue);
}

.agreement-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--steel-blue);
  margin-top: 1.5rem;
  line-height: 1.5;
}

.policy-link {
  color: var(--steel-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.policy-link:hover {
  text-decoration: underline;
  color: var(--cadet-blue);
}

/* ========================================
   HONEYPOT (Hidden)
   ======================================== */

.honeypot {
  display: none !important;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .login-container,
  .register-container,
  .already-registered-section {
    padding: 1.5rem; /* 24px */
    max-width: 100%;
  }

  .section-title {
    font-size: 1.5rem; /* 24px */
  }

  .section-subtitle {
    font-size: 1.25rem; /* 20px */
  }

  .login-section,
  .register-section {
    padding: 1rem;
  }

  main {
    padding: 1rem;
    min-height: auto;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 480px) {
  .login-container,
  .register-container,
  .already-registered-section {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .submit-btn,
  .register-btn,
  .login-btn,
  .google-signin-btn {
    padding: 0.65rem;
    font-size: 0.95rem;
  }

  .oauth-separator span {
    font-size: 0.85rem;
  }

  .login-link-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
  }
}
