/* ============================================
   MERCHANT LOGIN & SIGNUP STYLES
   ============================================ */

/* Using existing project color variables */
:root {
  --transition-base: 0.3s ease;
}

/* ============================================
   LAYOUT - SPLIT CONTAINER
   ============================================ */

.split-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ============================================
   FORM SIDE (LEFT)
   ============================================ */

.form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-bg-color);
  padding: 2rem;
  position: relative;
  overflow-y: auto;
}

.form-wrapper {
  width: 100%;
  max-width: 440px;
  animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   LOGO
   ============================================ */

.auth-logo {
  display: block;
  width: 60px;
  height: 60px;
  margin: 0 auto 2rem;
  object-fit: contain;
}

/* ============================================
   FORM STYLES
   ============================================ */

.auth-form {
  padding: 2rem;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.auth-form.hidden {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.auth-form h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-color-primary);
  margin: 0 0 0.5rem;
  text-align: center;
}

.auth-form .subtitle {
  color: var(--text-color-secondary);
  font-size: 0.938rem;
  margin: 0 0 2rem;
  text-align: center;
}

/* ============================================
   FORM GROUPS & INPUTS
   ============================================ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.938rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--card-bg-color);
  color: var(--text-color-primary);
  transition: all var(--transition-base);
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(217, 110, 59, 0.1);
}

.form-group input::placeholder {
  color: var(--text-color-secondary);
  opacity: 0.7;
}

.form-group input:disabled {
  background: var(--container-bg-color);
  cursor: not-allowed;
}

/* Error States */
.form-group input.error {
  border-color: var(--error-color);
}

.form-group input.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
  display: block;
  color: var(--error-color);
  font-size: 0.813rem;
  margin-top: 0.375rem;
  min-height: 1.25rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 0.938rem;
  font-weight: 600;
  color: white;
  background: var(--button-color);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: 0.5rem;
}

.btn-primary:hover {
  background: var(--button-hover-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-light);
}

.btn-primary:disabled {
  background: var(--text-color-secondary);
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   FORM FOOTER & LINKS
   ============================================ */

.form-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.form-footer p {
  color: var(--text-color-secondary);
  font-size: 0.875rem;
  margin: 0.75rem 0;
}

.link-primary {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-base);
}

.link-primary:hover {
  color: var(--accent-color-hover);
  text-decoration: underline;
}

.link-secondary {
  color: var(--text-color-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-base);
  display: inline-block;
  margin-bottom: 1rem;
}

.link-secondary:hover {
  color: var(--text-color-primary);
}

/* ============================================
   IMAGE SIDE (RIGHT) - SLIDESHOW
   ============================================ */

.image-side {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--button-hover-color) 100%);
  position: relative;
  display: none;
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

/* Overlay for better text readability */
.slideshow-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* ============================================
   SLIDE CONTENT
   ============================================ */

.slide-content {
  position: absolute;
  bottom: 4rem;
  left: 0;
  right: 0;
  padding: 0 3rem;
  z-index: 3;
  text-align: center;
  color: white;
}

.slide-content h3 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

.slide-content p {
  font-size: 1.125rem;
  margin: 0;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

/* ============================================
   SLIDE CONTROLS (DOTS)
   ============================================ */

.slide-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: none;
  gap: 0.5rem;
}

.slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.slide-dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.slide-dot.active {
  background: white;
  width: 28px;
  border-radius: 5px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets and larger */
@media (min-width: 768px) {
  .image-side {
    display: block;
  }
}

/* Large tablets and small desktops */
@media (min-width: 1024px) {
  .form-side {
    padding: 3rem;
  }

  .slide-content {
    padding: 0 4rem;
  }
}

/* Medium screens - adjust split ratio */
@media (min-width: 768px) and (max-width: 1024px) {
  .form-side {
    flex: 1.2;
  }

  .image-side {
    flex: 0.8;
  }
}

/* Small tablets and mobile landscape */
@media (max-width: 767px) {
  .form-side {
    padding: 1.5rem 1rem;
  }

  .form-wrapper {
    max-width: 100%;
  }

  .auth-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 1.5rem;
  }

  .auth-form h2 {
    font-size: 1.5rem;
  }

  .auth-form .subtitle {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .btn-primary {
    padding: 0.75rem 1.25rem;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .split-container {
    min-height: 100vh;
  }

  .form-side {
    padding: 1rem;
  }

  .auth-logo {
    width: 45px;
    height: 45px;
    margin-bottom: 1.25rem;
  }

  .auth-form h2 {
    font-size: 1.375rem;
  }

  .form-group input {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
  }

  .btn-primary {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .form-footer p {
    font-size: 0.813rem;
  }
}

/* ============================================
   DARK MODE SUPPORT (OPTIONAL)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Dark mode uses project colors - no overrides needed */
  .form-side {
    background: var(--container-bg-color);
  }
}

/* ============================================
   LOADING STATES (OPTIONAL ENHANCEMENT)
   ============================================ */

.btn-primary.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .slide {
    transition: none;
  }
}