/* ========================================= */
/* PAGE VARIABLES                            */
/* ========================================= */
:root {
  --login-orange: #d27e2b;
  --text-dark: #000;
  --text-sub: #333;
  --border-grey: #ccc;
  --input-bg: #fff;
}

/* ========================================= */
/* LAYOUT & HERO                             */
/* ========================================= */
.login-section,
.contact-section,
.register-section,
.forgot-password-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 40px 50px;
  position: relative;
}

/* ========================================= */
/* LOGIN CARD                                */
/* ========================================= */
.login-card,
.contact-card,
.register-card,
.forgot-password-card {
  background: white;
  width: 100%;
  max-width: 720px;
  padding: 36px 32px; /* Exact padding from design feel */
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.signup-card {
  max-width: 760px;
}

.forgot-password-card {
  max-width: 780px;
}

.contact-card {
  max-width: 1050px;
}

.contact-form {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.login-heading {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-heading {
  font-size: 28px;
  font-weight: 600;
  color: #000;
}

.welcome-sub {
  line-height: 1.5;
}

.login-main,
.contact-main,
.forgot-password-main,
.register-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ========================================= */
/* TOGGLE BUTTONS (Login/Register)           */
/* ========================================= */
.auth-toggle {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.toggle-btn {
  flex: 1;
  padding: 8px 0;
  font-size: 20px;
  font-weight: 500;
  color: white;
  background: black;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.toggle-btn.active {
  background-color: #d27e2b; /* Muted Orange/Brown */
}

/* ========================================= */
/* FORM ELEMENTS                             */
/* ========================================= */
.login-form,
.contact-form,
.register-form,
.forgot-password-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group label {
  font-size: 26px;
  font-weight: 600;
  color: #d27e2b;
}

.form-group input,
.form-select,
.form-group textarea {
  width: 100%;
  padding: 20px 15px;
  font-size: 20px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  outline: none;
  font-family: "Afacad", sans-serif;
  color: #000;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-select:focus,
.form-group textarea:focus {
  outline: none; /* Removes the default ugly browser outline */
  border-color: var(--login-orange); /* Turns border orange */
  /* Adds a soft orange halo ring */
  box-shadow: 0 0 0 4px rgba(210, 126, 43, 0.15);
  /* Optional: Adds a very subtle warm tint to the background */
  background-color: #fffaf4;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #000;
}

/* --- Message Textarea Styling --- */
.form-group textarea {
  /* specific to textarea */
  min-height: 160px; /* Makes the box tall like in the image */
  resize: vertical; /* Allows user to resize vertically if needed */
}

/* --- CUSTOM DROPDOWN ARROW --- */

/* 1. Wrapper: Needed to position the arrow */
.select-wrapper {
  position: relative;
  width: 100%;
}

/* 2. The Select Field: Remove default browser arrow */
.form-select {
  /* CRITICAL: Hides the default ugly arrow */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* 3. The Custom Arrow (Using CSS to draw a 'V') */
.select-wrapper::after {
  content: "";
  position: absolute;
  right: 20px; /* Distance from right */
  top: 45%; /* Center vertically */

  /* Size of the arrow */
  width: 8px;
  height: 8px;

  /* Draw the arrow lines */
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;

  /* Rotate it 45 degrees to make it point down */
  transform: translateY(-50%) rotate(45deg);

  /* Important: Allows clicks to pass through the arrow to the dropdown */
  pointer-events: none;
}

/* Optional: Focus State color change */
.form-select:focus {
  border-color: var(--login-orange);
}

/* ---------Error-tooltip Positioning----------- */
.error-tooltip {
  top: 115px;
}

/* --- Password Wrapper --- */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 45px;
}

/* --- Toggle Icon using CSS SVG --- */
.toggle-password {
  position: absolute;
  right: 20px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  transition:
    opacity 0.2s,
    background-image 0.2s;

  /* DEFAULT ICON: Eye with Slash (Hidden Password) */
  background-image: url("../assets/icons/password-hidden-icon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.toggle-password:hover {
  opacity: 1;
}

/* ACTIVE ICON: Eye Open (Visible Password - No Slash) */
.toggle-password.visible {
  background-image: url("../assets/icons/passord-icon.svg");
}

/* Forgot Password Link */
.forgot-row {
  text-align: right;
}

.forgot-link,
.checkbox-group a {
  font-weight: 500;
  color: #4e2fda; /* Blueish purple */
  text-decoration: none;
}

.forgot-link:hover,
.checkbox-group a:hover,
.signup-text a:hover {
  color: #d27e2b;
  text-decoration: underline;
  text-decoration-color: #d27e2b;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  width: 100%;
}

.checkbox-group input {
  width: 22px;
  height: 22px;
  accent-color: var(--text-dark);
  border-radius: 4px;
  border: 1px solid #000;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 20px;
  color: var(--text-dark);
  cursor: pointer;
}

/* Login Button */
.btn-login,
.btn-contact,
.btn-reset-password,
.btn-register {
  background-color: #d27e2b;
  color: white;
  border: none;
  padding: 12px;
  font-size: 20px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  max-width: 170px;
  margin: 5px auto 0; /* Center button */
  display: block;
}

.btn-contact {
  margin: 20px 0 0;
}

.btn-reset-password {
  max-width: 230px;
}

.btn-login:hover,
.btn-contact:hover,
.btn-reset-password:hover,
.btn-register:hover {
  background-color: #000000;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: rgba(0, 0, 0, 0.6);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);
}

.divider span {
  padding: 0 10px;
  background: #fff; /* Masks line behind text */
}

/* Social Icons */
.social-login {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: #ffd6ac; /* Light peach bg */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.social-btn:hover {
  background-color: #d27e2b;
  transform: scale(1.08);
}
.social-btn:hover img {
  filter: invert(1);
}

.social-btn img {
  width: 30px;
  height: 30px;
}

/* Signup Text */
.signup-text {
  text-align: center;
  color: var(--text-dark);
}

.signup-text a {
  color: #4e2fda;
  font-weight: 500;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .login-card,
  .contact-card,
  .register-card,
  .forgot-password-card {
    padding: 36px 28px;
    gap: 36px;
  }

  .signup-card,
  .forgot-password-card {
    padding: 36px 32px;
  }

  .contact-heading {
    font-size: 26px;
  }

  .login-main,
  .contact-main,
  .register-main,
  .forgot-password-main {
    gap: 24px;
  }

  .form-group label {
    font-size: 24px;
  }
}

/* ========================================= */
/* RESPONSIVE: MOBILE                        */
/* ========================================= */
@media (max-width: 767px) {
  .login-section,
  .contact-section,
  .register-section,
  .forgot-password-section {
    padding: 70px 25px 50px;
  }

  .login-card,
  .contact-card,
  .register-card,
  .forgot-password-card {
    padding: 24px 12px;
    gap: 24px;
  }

  .contact-heading {
    font-size: 24px;
  }

  .welcome-title {
    font-size: 30px;
  }

  .login-form,
  .contact-form,
  .register-form,
  .forgot-password-form {
    gap: 15px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .login-main,
  .contact-main,
  .register-main,
  .forgot-password-main {
    gap: 18px;
  }

  .form-group label {
    font-size: 22px;
  }

  .form-group input {
    padding: 15px;
  }

  .signup-card .checkbox-group {
    align-items: flex-start;
  }

  .signup-card .checkbox-group input {
    top: 5px;
    position: relative;
  }
}
