/* IMPORT ROOT VARIABLES FROM LANDING PAGE STYLE */
@import url("../../css/landing_page/style.css");

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

/* MAIN LAYOUT */
.auth-container {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 50% 50%;
  transition: grid-template-columns 0.6s ease;
  background: var(--color-gray-100);
}

/* WHEN SIGN UP IS ACTIVE */
.auth-container.signup-active {
  grid-template-columns: 1fr 1fr; /* 50 / 50 */
}

/* LEFT HERO IMAGE */
.auth-left {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: var(--spacing-3xl);
  background:
    linear-gradient(135deg, rgba(26, 35, 50, 0.85), rgba(44, 62, 80, 0.75)),
    url("../../images/landing_page.png");
  background-size: cover;
  background-position: center;
}

.auth-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 20% 40%,
      rgba(255, 107, 53, 0.15),
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 60%,
      rgba(255, 107, 53, 0.1),
      transparent 50%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  color: var(--color-white);
  animation: fadeInUp 0.8s ease;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
}

.hero-title-highlight {
  color: var(--color-primary);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-dark)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-white);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.brand span {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
}

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-white);
}

.hero-content p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

.hero-content small {
  display: block;
  margin-top: var(--spacing-2xl);
  color: rgba(255, 255, 255, 0.5);
}

/* RIGHT AUTH - FIXED SCROLLING */
.auth-right {
  height: 100vh;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  width: 100%;
}
/* When SIGN UP tab is active → push content down */
.auth-container.signup-active .auth-right {
  align-items: flex-start;   /* instead of center */
  padding-top: 60px;         /* adjust spacing */
}

/* Optional: extra breathing space for long form */
.auth-container.signup-active .auth-box {
  margin-top: 20px;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl) var(--spacing-lg);
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.6s ease;
  margin: var(--spacing-xl) 0;
}

.auth-box h1 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-xs);
  font-family: var(--font-display);
}

.subtitle {
  color: var(--color-gray-600);
  margin-bottom: var(--spacing-md);
  font-size: 0.9rem;
}

/* ERROR */
/* .error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  font-size: 0.875rem;
}
*/

/* TABS */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  background: var(--color-gray-100);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
}

.tab-btn {
  padding: 0.65rem;
  background: transparent;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--color-gray-600);
  font-size: 0.95rem;
}

.tab-btn.active {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* FORMS */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

form label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
  color: var(--color-gray-800);
}

form input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin-bottom: var(--spacing-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-300);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition:
    border var(--transition-base),
    box-shadow var(--transition-base);
}

form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

/* BUTTON */
form button {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-dark)
  );
  color: var(--color-white);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
  transition: all var(--transition-base);
  margin-top: var(--spacing-sm);
}

form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 107, 53, 0.45);
}

/* HINT */
.hint {
  margin-top: var(--spacing-sm);
  font-size: 0.8125rem;
  color: var(--color-gray-600);
  text-align: center;
}

.hint span {
  background: var(--color-gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.forgot-password {
  float: right;
  font-size: 0.875rem;
  color: var(--color-primary);
  cursor: pointer;
}

.forgot-password:hover {
  text-decoration: underline;
}

.create-account {
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 600;
}

.name-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.name-field {
  flex: 1;
  min-width: 0;
}

.name-field-small {
  flex: 0 0 70px;
}

.name-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  font-weight: 500;
}

.name-field input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
}

.required {
  color: #ff6b6b;
}

/* .success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #c3e6cb;
}
*/ 

/*.error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #f5c6cb;
}
  */

.create-account:hover {
  text-decoration: underline;
}

/* RESPONSIVE STYLING */

/* 1280px and above - LARGER DESKTOPS */
@media (min-width: 1280px) {
  .auth-container {
    grid-template-columns: 50% 50%;
  }
  .hero-title {
    font-size: 3.5rem;
  }
}

/* 769px to 1279px - LARGER TABLETS, LAPTOPS */
@media (min-width: 769px) and (max-width: 1279px) {
  .auth-container,
  .auth-container.signup-active {
    grid-template-columns: 50% 50%;
  }
  .auth-left {
    padding: var(--spacing-2xl);
  }
}

/* 481px to 768px - TABLETS AND LARGER SMARTPHONES */
@media (min-width: 481px) and (max-width: 768px) {
  .auth-container,
  .auth-container.signup-active {
    grid-template-columns: 1fr !important;
    height: auto; /* Allow container to grow with content */
  }

  .auth-left {
    display: none;
  }

  .auth-right {
    padding: var(--spacing-xl) var(--spacing-lg);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* IMPORTANT: Changed from center to flex-start */
    min-height: 100vh;
    height: auto;
    width: 100%;
  }

  .auth-box {
    width: 100%;
    max-width: 500px;
    margin: 2rem auto; /* Adds spacing at top/bottom so it doesn't touch edges */
  }
}

/* 0px to 480px - SMALLER SMARTPHONES */
@media (max-width: 480px) {
  .auth-container,
  .auth-container.signup-active {
    grid-template-columns: 1fr !important;
    height: auto;
  }

  .auth-left {
    display: none;
  }

  .auth-right {
    padding: var(--spacing-md);
    align-items: flex-start; /* Ensure top of form is always visible */
    min-height: 100vh;
  }

  .auth-box {
    padding: var(--spacing-lg) var(--spacing-md);
    margin: 1rem 0;
  }
}
/* PASSWORD TOGGLE */

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 45px; /* space for eye icon */
}

.toggle-password {
  position: absolute;
  right: 12px;
  cursor: pointer;
  font-size: 1rem;
  user-select: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.toggle-password:hover {
  opacity: 1;
}

/* Mobile friendly */
@media (max-width: 480px) {
  .toggle-password {
    right: 10px;
    font-size: 1.1rem;
  }
}
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  cursor: pointer;
  color: #777;
  font-size: 1rem;
  transition: color 0.2s ease;
  padding-bottom: 12px;
}

.toggle-password:hover {
  color: var(--color-primary);
}

/* ============================= */
/* FLOATING TOAST NOTIFICATION  */
/* ============================= */

.toast {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Visible state */
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Error */
.toast-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Success */
.toast-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .toast {
    width: 90%;
    text-align: center;
    font-size: 0.85rem;
    padding: 12px 16px;
  }
}

/* =============================== */
/* HIDE SCROLLBAR (BUT KEEP SCROLL) */
/* =============================== */

.auth-right {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE and Edge */
}

.auth-right::-webkit-scrollbar {
  display: none;                /* Chrome, Safari */
}

/* =================== */
/* TERMS & CONDITIONS MODAL */
/* =================== */

.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.5);
  padding-top: 60px;
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px 30px;
  border-radius: 12px;
  max-width: 600px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  animation: fadeInUp 0.4s ease;
}

.modal-body {
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.6;
}

.modal .close {
  color: #333;
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.terms-text {
  font-size: 0.85rem;
  color: #666;
  margin: 10px 0;
  text-align: center;
}

.terms-link {
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 600;
}

.terms-link:hover {
  text-decoration: underline;
}