/**
 * PopTop - Authentication & Registration Stylesheet
 * Responsive, Modern, Light & Dark Mode Compatible
 */

/* ─── Main Wrapper ─── */
.auth-main-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: var(--bg, #f4f6f9) !important;
}

.auth-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background-color: var(--bg, #f4f6f9);
  position: relative;
  overflow-x: hidden;
}

/* ─── Floating Top Actions (Theme & Language) ─── */
.auth-top-actions {
  position: absolute;
  top: 24px;
  inset-inline-start: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 50;
}

.auth-top-actions .auth-theme-toggle,
.auth-top-actions a.auth-theme-toggle,
.auth-top-actions button.auth-theme-toggle {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.auth-theme-toggle {
  position: absolute;
  top: 24px;
  inset-inline-start: 24px;
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--border-color, #e2e8f0);
  color: var(--text-secondary, #64748b);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
  z-index: 10;
}

.auth-theme-toggle:hover {
  color: var(--primary-orange, #fe5d29);
  border-color: var(--primary-orange, #fe5d29);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(254, 93, 41, 0.2);
}

/* ─── Auth Card ─── */
.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card, #ffffff);
  border-radius: 20px;
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08);
  padding: 38px 34px;
  position: relative;
  z-index: 2;
  margin: auto;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .auth-card,
body.dark-mode .auth-card {
  background: var(--bg-card, #1e1e2e);
  border-color: var(--border-color, #313244);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.55);
}

/* ─── Logo ─── */
.auth-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 22px;
}

.auth-logo img {
  max-height: 48px;
  max-width: 190px;
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.auth-logo .logo-light {
  display: block;
}

.auth-logo .logo-dark {
  display: none;
}

[data-bs-theme="dark"] .auth-logo .logo-light,
body.dark-mode .auth-logo .logo-light {
  display: none !important;
}

[data-bs-theme="dark"] .auth-logo .logo-dark,
body.dark-mode .auth-logo .logo-dark {
  display: block !important;
}

/* ─── Titles & Subtitles ─── */
.auth-title {
  font-size: 23px;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
  text-align: center;
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary, #64748b);
  text-align: center;
  margin: 0 0 22px 0;
  line-height: 1.6;
}

/* ─── Steps Progress ─── */
.steps-container {
  width: 100%;
  margin: 0 0 24px 0;
}

.steps-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 50px;
}

.steps-progress::before {
  content: '';
  position: absolute;
  top: 19px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 2px;
  background: var(--border-color, #e2e8f0);
  z-index: 1;
}

[data-bs-theme="dark"] .steps-progress::before,
body.dark-mode .steps-progress::before {
  background: var(--border-color, #313244);
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  text-decoration: none;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card, #ffffff);
  border: 2px solid var(--border-color, #e2e8f0);
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.step-item.active .step-circle {
  background: var(--primary-orange, #fe5d29);
  border-color: var(--primary-orange, #fe5d29);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(254, 93, 41, 0.22);
}

.step-item.active .step-label {
  color: var(--primary-orange, #fe5d29);
  font-weight: 700;
}

.step-item.completed .step-circle {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.step-item.completed .step-label {
  color: #10b981;
  font-weight: 700;
}

/* ─── Alerts ─── */
.auth-card .alert {
  border-radius: 12px;
  font-size: 13.5px;
  padding: 13px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  line-height: 1.55;
}

.auth-card .alert i {
  font-size: 17px;
  flex-shrink: 0;
}

.auth-card .alert-info {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
}

[data-bs-theme="dark"] .auth-card .alert-info,
body.dark-mode .auth-card .alert-info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.auth-card .alert-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #047857;
}

[data-bs-theme="dark"] .auth-card .alert-success,
body.dark-mode .auth-card .alert-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.auth-card .alert-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

[data-bs-theme="dark"] .auth-card .alert-danger,
body.dark-mode .auth-card .alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.auth-card .alert-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

[data-bs-theme="dark"] .auth-card .alert-warning,
body.dark-mode .auth-card .alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

/* ─── Form Elements ─── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form .form-group {
  margin-bottom: 0;
}

.auth-form .form-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary, #475569);
  margin-bottom: 7px;
  display: block;
}

[data-bs-theme="dark"] .auth-form .form-label,
body.dark-mode .auth-form .form-label {
  color: var(--text-secondary, #cbd5e1);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon input.form-control {
  width: 100%;
  height: 48px;
  padding: 10px 42px 10px 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color, #e2e8f0);
  background: var(--bg, #f8fafc);
  color: var(--text-primary, #0f172a);
  font-size: 14.5px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.2s ease;
}

[data-bs-theme="dark"] .input-with-icon input.form-control,
body.dark-mode .input-with-icon input.form-control {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color, #313244);
  color: #f1f5f9;
}

.input-with-icon input.form-control:focus {
  border-color: var(--primary-orange, #fe5d29);
  background: var(--bg-card, #ffffff);
  box-shadow: 0 0 0 3.5px rgba(254, 93, 41, 0.16);
  outline: none;
}

[data-bs-theme="dark"] .input-with-icon input.form-control:focus,
body.dark-mode .input-with-icon input.form-control:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--primary-orange, #fe5d29);
}

.input-with-icon input.form-control:disabled {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-muted, #94a3b8);
  cursor: not-allowed;
  border-style: dashed;
  border-color: var(--border-color, #cbd5e1);
  opacity: 0.85;
}

[data-bs-theme="dark"] .input-with-icon input.form-control:disabled,
body.dark-mode .input-with-icon input.form-control:disabled {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #64748b;
}

.input-with-icon > i:not(.toggle-password-icon):not(#toggleIcon),
.input-with-icon .input-icon {
  position: absolute;
  right: 14px;
  color: var(--text-muted, #94a3b8);
  font-size: 16px;
  pointer-events: none;
  z-index: 2;
}

.input-with-icon .toggle-password-icon,
.input-with-icon > i#toggleIcon {
  position: absolute;
  left: 14px;
  right: auto;
  color: var(--text-muted, #94a3b8);
  font-size: 17px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
  z-index: 3;
}

.input-with-icon .toggle-password-icon:hover,
.input-with-icon > i#toggleIcon:hover {
  color: var(--primary-orange, #fe5d29);
}

/* ─── Data Review Box ─── */
.data-review {
  background: var(--bg, #f8fafc);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 22px;
  border: 1px solid var(--border-color, #e2e8f0);
  width: 100%;
}

[data-bs-theme="dark"] .data-review,
body.dark-mode .data-review {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color, #313244);
}

.data-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

[data-bs-theme="dark"] .data-item,
body.dark-mode .data-item {
  border-bottom-color: var(--border-color, #313244);
}

.data-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.data-item:first-child {
  padding-top: 0;
}

.data-label {
  color: var(--text-secondary, #64748b);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-label i {
  color: var(--primary-orange, #fe5d29);
  font-size: 15px;
}

.data-value {
  color: var(--text-primary, #0f172a);
  font-weight: 700;
  text-align: left;
  font-size: 14px;
}

[data-bs-theme="dark"] .data-value,
body.dark-mode .data-value {
  color: #f1f5f9;
}

/* ─── Buttons ─── */
.auth-btn {
  background: linear-gradient(135deg, #fe5d29, #e04a17);
  color: #ffffff !important;
  border: none;
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(254, 93, 41, 0.28);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.auth-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 7px 20px rgba(254, 93, 41, 0.38);
  color: #ffffff !important;
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn-secondary {
  background: transparent;
  color: var(--text-secondary, #64748b) !important;
  border: 1.5px solid var(--border-color, #e2e8f0);
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.auth-btn-secondary:hover {
  background: var(--bg, #f8fafc);
  border-color: var(--text-muted, #94a3b8);
  color: var(--text-primary, #0f172a) !important;
  transform: translateY(-1px);
}

[data-bs-theme="dark"] .auth-btn-secondary,
body.dark-mode .auth-btn-secondary {
  border-color: var(--border-color, #313244);
  color: #cdd6f4 !important;
}

[data-bs-theme="dark"] .auth-btn-secondary:hover,
body.dark-mode .auth-btn-secondary:hover {
  background: #313244 !important;
  color: #ffffff !important;
}

.auth-woo-btn {
  background: #7f54b3;
  color: #ffffff !important;
  border-color: #7f54b3;
}

.auth-woo-btn:hover {
  background: #6c3da6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(127, 84, 179, 0.3);
}

/* ─── Mobile Responsiveness ─── */
@media (max-width: 576px) {
  .auth-card {
    padding: 26px 20px;
    border-radius: 16px;
  }

  .auth-wrapper {
    padding: 20px 12px;
  }

  .auth-title {
    font-size: 20px;
  }

  .auth-subtitle {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .steps-progress {
    gap: 32px;
  }

  .steps-progress::before {
    width: 90px;
  }

  .step-circle {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .step-label {
    font-size: 12px;
  }

  .auth-theme-toggle {
    top: 16px;
    left: 16px;
    width: 38px;
    height: 38px;
  }
}
