/* Shared Authentication Styles (Login & Signup) */

/* Main Content */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 2rem 1rem;
}

.auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
  padding: 3rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--fs-text-primary);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 1rem;
  color: var(--fs-text-secondary);
  margin: 0;
  font-weight: 400;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  padding-left: 3rem;
  padding-right: 3rem;
  border: 1.5px solid var(--fs-border-default);
  border-radius: 12px;
  font-size: 1rem;
  background: #fafafa;
  transition: all 0.2s ease;
  color: var(--fs-text-primary);
}

.form-input::placeholder {
  color: var(--fs-text-muted);
}

.form-input:focus {
  outline: none;
  border-color: var(--fs-accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(240, 138, 18, 0.08);
}

.input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fs-text-muted);
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-wrapper:has(.form-input:focus) .input-icon {
  color: var(--fs-accent);
}

.input-wrapper:has(.form-input:focus) .input-icon path {
  stroke: var(--fs-accent);
}

/* Password Toggle Button */
.password-toggle {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--fs-text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--fs-text-secondary);
}

.password-toggle:hover path {
  stroke: var(--fs-text-secondary);
}

/* Checkbox Styles */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 0.5rem;
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--fs-border-hover);
  border-radius: 4px;
  background: white;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--fs-accent);
  border-color: var(--fs-accent);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--fs-text-secondary);
  user-select: none;
}

/* Primary Button */
.btn-primary {
  width: 100%;
  background: var(--fs-accent);
  border: none;
  border-radius: 12px;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
}

.btn-primary:hover:not(:disabled) {
  background: #d67a0d;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(240, 138, 18, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Loading State */
.btn-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spinner-border {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
    border-radius: 12px;
  }

  .auth-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 320px) {
  .auth-card {
    padding: 1.5rem 1rem;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for better keyboard navigation */
.form-input:focus-visible {
  outline: none; /* We use box-shadow instead for inputs */
}
