/* ========================================
   Authentication Pages Styles
   ======================================== */

/* ========== Password Strength Indicator ========== */
.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  transition: background-color 0.3s ease;
}

.strength-bar.active-weak {
  background-color: #ef4444;
}

.strength-bar.active-fair {
  background-color: #f59e0b;
}

.strength-bar.active-good {
  background-color: #10b981;
}

.strength-bar.active-strong {
  background-color: #059669;
}

/* ========== Auth Form Animations ========== */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.auth-form-container {
  animation: slideInRight 0.5s ease-out;
}

.auth-branding-container {
  animation: slideInLeft 0.5s ease-out;
}

/* ========== Input Focus Effects ========== */
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(215, 125, 97, 0.1);
}

.form-input.valid {
  border-color: #10b981;
}

.form-input.invalid {
  border-color: #ef4444;
}

/* ========== Toggle Password Button ========== */
.toggle-password {
  cursor: pointer;
  transition: color 0.2s ease;
}

.toggle-password:hover .material-icons {
  color: inherit;
}

/* ========== Social Auth Buttons ========== */
.google-auth-btn {
  position: relative;
  overflow: hidden;
}

.google-auth-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(215, 125, 97, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.google-auth-btn:hover::before {
  width: 300px;
  height: 300px;
}

.google-auth-btn span,
.google-auth-btn img {
  relative: z-10;
}

/* ========== Checkbox Styling ========== */
input[type="checkbox"]:checked {
  background-color: #D77D61;
  border-color: #D77D61;
}

input[type="checkbox"]:focus {
  ring-color: rgba(215, 125, 97, 0.5);
  border-color: #D77D61;
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 1024px) {
  .auth-branding-container {
    display: none;
  }
}

/* ========== Loading State for Forms ========== */
.form-loading {
  pointer-events: none;
  opacity: 0.6;
}

.form-loading .btn-primary {
  position: relative;
}

.form-loading .btn-primary::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

/* ========== Error State ========== */
.form-error {
  color: #ef4444;
  font-size: 0.75rem;
  display: none;
  margin-top: 0.25rem;
}

.form-error.show {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* ========== Success Message ========== */
.success-message {
  background-color: #d1fae5;
  color: #065f46;
  padding: 1rem;
  border-radius: 0.75rem;
  border-left: 4px solid #10b981;
  margin-bottom: 1rem;
  display: none;
}

.dark .success-message {
  background-color: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
}

.success-message.show {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideDown 0.3s ease-out;
}

/* ========== Verification Code Input ========== */
.verification-input {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.verification-input input {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.dark .verification-input input {
  border-color: #374151;
  background-color: #1e1e1e;
  color: #e5e7eb;
}

.verification-input input:focus {
  border-color: #D77D61;
  box-shadow: 0 0 0 3px rgba(215, 125, 97, 0.1);
  outline: none;
}

/* ========== Resend Code Timer ========== */
.resend-timer {
  text-align: center;
  margin-top: 1rem;
  color: #6b7280;
}

.dark .resend-timer {
  color: #9ca3af;
}

.resend-timer button {
  color: #D77D61;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

.resend-timer button:disabled {
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: none;
}

/* ========== Progress Steps ========== */
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 1rem;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #e5e7eb;
  z-index: 0;
}

.dark .progress-steps::before {
  background-color: #374151;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.progress-step-circle {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.dark .progress-step-circle {
  background-color: #374151;
}

.progress-step.active .progress-step-circle {
  background-color: #D77D61;
  color: white;
}

.progress-step.completed .progress-step-circle {
  background-color: #10b981;
  color: white;
}

.progress-step-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
}

.dark .progress-step-label {
  color: #9ca3af;
}

.progress-step.active .progress-step-label {
  color: #374151;
  font-weight: 600;
}

.dark .progress-step.active .progress-step-label {
  color: #e5e7eb;
}

/* ========== Divider with Text ========== */
.divider-text {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.dark .divider-text::before,
.dark .divider-text::after {
  border-bottom-color: #374151;
}

.divider-text span {
  padding: 0 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.dark .divider-text span {
  color: #9ca3af;
}

/* ========== Auth Link Hover ========== */
a.auth-link {
  color: #D77D61;
  font-weight: 600;
  transition: all 0.2s ease;
}

a.auth-link:hover {
  text-decoration: underline;
  color: #c06d51;
}

/* ========== Mobile Optimizations ========== */
@media (max-width: 640px) {
  .verification-input input {
    width: 2.5rem;
    height: 3rem;
    font-size: 1.25rem;
  }

  .progress-step-label {
    font-size: 0.625rem;
  }
}

/* ========== Accessibility ========== */
.form-input:focus-visible,
.btn-primary:focus-visible,
.google-auth-btn:focus-visible {
  outline: 2px solid #D77D61;
  outline-offset: 2px;
}

/* ========== Print Styles ========== */
@media print {
  .dark-mode-toggle,
  .google-auth-btn {
    display: none;
  }
}
