/* HavenDrapes Shared Authentication Styles (Login/Register) */

:root {
  --hd-brand-dark: #3a3a3a;
  --hd-brand-neutral: #f9f7f4;
  --hd-brand-accent: #c4a484;
  --hd-text-muted: #8e8e8e;
  --hd-error: #e07a5f;
  --hd-success: #2d6a4f;
  --hd-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Removed restrictive height constraints to prevent content clipping */

body {
  margin: 0;
  padding: 0;
  background-color: #fff;
  font-family: 'Inter', sans-serif;
  color: var(--hd-brand-dark);
}

.auth-page-container {
  display: flex;
  width: 100%;
  min-height: 800px; /* Ensure sufficient space for form + hero */
}

/* Left side: Hero Image */
.auth-hero-side {
  flex: 1.2;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0ebe6; /* Warm fallback if image fails */
}

.auth-hero-side::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.05); 
}

/* Use clean, branded hero assets from the root IMG folder */
.login-bg { 
  background-image: url('https://res.cloudinary.com/dbouy31m6/image/upload/v1779548277/havendrapes/local/IMG/brand-story-bedroom.png'); 
}
.register-bg { 
  background-image: url('https://res.cloudinary.com/dbouy31m6/image/upload/v1779548278/havendrapes/local/IMG/brand-story-hero.png'); 
}

/* Right side: Form */
.auth-form-side {
  flex: 0.8;
  background-color: var(--hd-brand-neutral);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px; /* Increased padding to prevent clipping on links */
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: transparent;
}

.auth-card h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--hd-brand-dark);
}

.auth-card p.subtitle {
  color: var(--hd-text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.2rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--hd-brand-dark);
}

.input-wrapper {
  position: relative;
}

.input-wrapper i.prefix-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hd-text-muted);
}

.form-control {
  width: 100%;
  height: 54px; /* Slightly taller for luxury feel */
  padding: 10px 15px 10px 45px;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  background: #fff;
  font-size: 1rem;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--hd-brand-accent);
  box-shadow: 0 0 0 4px rgba(196, 164, 132, 0.1);
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--hd-text-muted);
  font-size: 0.9rem;
}

.validation-status {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  display: none;
}

.validation-status.correct { color: var(--hd-success); display: block; }
.validation-status.error { color: var(--hd-error); display: block; }

/* Avatar Selection */
.avatar-selection-area {
  margin: 1.5rem 0;
}

/* Removed avatar grid system for a cleaner registration flow */

/* Turnstile Area */
#turnstile-container {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.btn-auth-submit {
  width: 100%;
  height: 54px;
  background-color: var(--hd-brand-dark) !important; /* Ensure brand color */
  color: #fff !important;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-auth-submit:hover {
  background-color: #000;
  transform: translateY(-1px);
}

.btn-auth-submit:disabled {
  background-color: var(--hd-text-muted);
  cursor: not-allowed;
}

.auth-footer-links {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--hd-text-muted);
}

.auth-footer-links a {
  color: var(--hd-brand-dark);
  font-weight: 600;
  margin-left: 5px;
  text-decoration: none;
}

.auth-footer-links a:hover {
  text-decoration: underline;
}

.msg-feedback {
  font-size: 0.8rem;
  margin-top: 4px;
  min-height: 1.2rem;
  display: block;
}

.msg-feedback.error { color: var(--hd-error); }
.msg-feedback.success { color: var(--hd-success); }

/* Responsive */
@media (max-width: 992px) {
  .auth-hero-side {
    display: none;
  }
  .auth-form-side {
    flex: 1;
    background-color: #fff;
  }
}

.loading-dots:after {
  content: ' .';
  animation: auth-dots 1.5s steps(5, end) infinite;
}

@keyframes auth-dots {
  0%, 20% { content: ' .'; }
  40% { content: ' . .'; }
  60% { content: ' . . .'; }
  80%, 100% { content: ''; }
}
