/* ==========================================================
   LOGIN PAGE STYLES
   Author: Christabell Owusu
   Description: Styles specific to the login page of Talmidēo.
   Includes form layout, inputs, buttons, password toggle, and spinner.
=========================================================== */

/* =======================
   1. Reset & Base Styles
=========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  font-family: "Inter", sans-serif;
  height: 100vh;
  overflow: hidden;
  background-color: #fafcf5;
}

/* =======================
   2. Login Page Layout
=========================== */

.login-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* Left Image Side */
.login-image-side {
  flex: 1.2;
  background-image: url("../images/Landing Page Chuch Image.png"); /* Same image */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scaleX(-1); /* Flip image horizontally */
}

/* Right Form Side */
.login-form-side {
  flex: 0.8;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    height: auto;
  }
  .login-image-side {
    flex: none;
    height: 200px;
    transform: scaleX(1);
  }
  .login-form-side {
    flex: none;
    padding: 1.5rem;
  }
}

/* =======================
   3. Form Content & Logo
=========================== */

.form-content {
  width: 100%;
  max-width: 400px;
}

/* ===== Logo Section ===== */
.form-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.form-logo img {
  width: 65px;
  height: auto;
  margin-right: 0.5rem;
}

.form-logo span {
  font-size: 1.5rem;
  font-weight: 600;
}

.logo-text {
  font-family: "Fondamento", cursive;
  font-size: 2rem;
  color: #010404;
  line-height: 1;
  margin-left: -18px;
  padding: 0;
}

/* ===== Heading & Subtitle ===== */

h2 {
  text-align: left;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-subtitle {
  text-align: left;
  font-weight: 300;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 2rem;
}

/* =======================
   4. Form Inputs
=========================== */

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.2rem; /* More spacing between fields */
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.form-group input {
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #b6c1a3;
  font-size: 0.9rem; /* unified with last snippet */
  color: #1d1d1d;
  font-family: "Inter", sans-serif;
  outline: none;
}

/* Placeholder Text Styling */
input::placeholder {
  font-size: 1rem;
  color: #999; /* lighter gray */
  opacity: 1; /* ensures visibility on Firefox */
}

/* ==========================
   5. Password Field & Toggle
============================= */

.password-group {
  width: 100%;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  flex: 1;
  width: 100%;
  display: block; /* prevents shrink from flex environments */
  padding-right: 2.4rem !important;
  box-sizing: border-box;
  min-height: 42px; /* makes height consistent across loads */
}

/* Eye icon – stable, cannot move */
.toggle-password {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 12px !important;
  height: 12px !important;
  cursor: pointer;
  opacity: 0.85;
  z-index: 5;
  pointer-events: auto;
}

.toggle-password:hover {
  opacity: 1;
}

/* =======================
   6. Sign-In Button & Spinner
=========================== */
.signup-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: #b6c1a3;
  color: #ffffff;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.signup-btn:hover {
  background-color: rgba(204, 218, 165, 0.864);
}

/* Spinner for button loading state */
.signup-btn .spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  display: none; /* show when submitting */
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* =======================
   7. Redirect / Extra Text
=========================== */
.redirect-text {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #666;
}

.redirect-text a {
  color: #82020b;
  text-decoration: none;
  font-weight: 500;
}
