/**
 * Corvanta - Modern Registration Page Styles
 * Fully responsive multi-step registration form
 * Optimized for all device sizes
 */

/* ============================================
   Variables
   ============================================ */
:root {
  --register-primary: #2563eb;
  --register-primary-dark: #1e40af;
  --register-secondary: #3b82f6;
  --register-success: #10b981;
  --register-error: #ef4444;
  --register-warning: #f59e0b;
  --register-text: #1a202c;
  --register-text-secondary: #6b7280;
  --register-bg: #f9fafb;
  --register-card-bg: #ffffff;
  --register-border: #e2e8f0;
  --register-input-bg: #f7fafc;
  --register-radius: 12px;
  --register-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Box-sizing for all elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ============================================
   Container & Layout
   ============================================ */
.auth-container {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 3rem;
  background: var(--register-bg);
}

.auth-card {
  width: 100%;
  max-width: 700px;
  background: var(--register-card-bg);
  border-radius: var(--register-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  padding: 2.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ============================================
   Header
   ============================================ */
.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--register-text);
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  font-size: 16px;
  color: var(--register-text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ============================================
   Progress Indicator
   ============================================ */
.form-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  z-index: 1;
}

.progress-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  background: var(--register-input-bg);
  color: var(--register-text-secondary);
  border: 3px solid var(--register-border);
  transition: var(--register-transition);
}

.progress-step.active .progress-circle {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: white;
  border-color: var(--register-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: scale(1.1);
}

.progress-step.completed .progress-circle {
  background: var(--register-success);
  color: white;
  border-color: var(--register-success);
}

.progress-step span {
  font-size: 13px;
  font-weight: 600;
  color: var(--register-text-secondary);
  text-align: center;
  white-space: nowrap;
}

.progress-step.active span {
  color: var(--register-primary);
}

.progress-step.completed span {
  color: var(--register-success);
}

.progress-line {
  flex: 1;
  height: 3px;
  background: var(--register-border);
  position: relative;
  top: -24px;
  margin: 0 -10px;
}

/* ============================================
   Form Steps
   ============================================ */
.form-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--register-text);
  margin: 0 0 1.5rem 0;
}

/* ============================================
   Form Groups
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--register-text);
  margin-bottom: 0.5rem;
}

.required {
  color: var(--register-error);
  margin-left: 2px;
}

/* ============================================
   Form Inputs
   ============================================ */
.form-input,
.form-select {
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--register-text);
  background: var(--register-input-bg);
  border: 2px solid var(--register-border);
  border-radius: 10px;
  transition: var(--register-transition);
  outline: none;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: #a0aec0;
}

.form-input:hover,
.form-select:hover {
  border-color: #cbd5e0;
  background: white;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--register-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.error,
.form-select.error {
  border-color: var(--register-error);
  background: #fef2f2;
}

.form-input.success,
.form-select.success {
  border-color: var(--register-success);
  background: #f0fdf4;
}

/* ============================================
   Form Errors & Hints
   ============================================ */
.form-error {
  display: block;
  font-size: 13px;
  color: var(--register-error);
  margin-top: 0.5rem;
  min-height: 20px;
}

.form-error.success {
  color: var(--register-success);
}

.form-hint {
  display: block;
  font-size: 13px;
  color: var(--register-text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ============================================
   Buttons
   ============================================ */
.btn-next,
.btn-submit,
.btn-back {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--register-transition);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-next,
.btn-submit {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-next:hover,
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-next:active,
.btn-submit:active {
  transform: translateY(0);
}

.btn-next:disabled,
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-back {
  background: transparent;
  color: var(--register-text-secondary);
  border: 2px solid var(--register-border);
}

.btn-back:hover {
  background: var(--register-input-bg);
  border-color: #cbd5e0;
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-spinner {
  display: none;
  align-items: center;
  gap: 8px;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   Form Actions
   ============================================ */
.form-actions,
.step-navigation {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.form-actions .btn-back,
.step-navigation .btn-back {
  flex: 0 0 auto;
}

.form-actions .btn-next,
.form-actions .btn-submit,
.step-navigation .btn-next,
.step-navigation .btn-submit {
  flex: 1;
}

/* ============================================
   Password Input Wrapper
   ============================================ */
.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper .form-input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--register-text-secondary);
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--register-primary);
}

.password-toggle .eye-icon {
  width: 20px;
  height: 20px;
}

/* ============================================
   Password Strength Indicator
   ============================================ */
.password-strength {
  margin-top: 0.75rem;
  padding: 12px;
  background: var(--register-input-bg);
  border-radius: 8px;
}

.strength-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.strength-fill.weak {
  width: 33%;
  background: var(--register-error);
}

.strength-fill.medium {
  width: 66%;
  background: var(--register-warning);
}

.strength-fill.strong {
  width: 100%;
  background: var(--register-success);
}

.strength-text {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--register-text-secondary);
}

.strength-text.weak {
  color: var(--register-error);
}

.strength-text.medium {
  color: var(--register-warning);
}

.strength-text.strong {
  color: var(--register-success);
}

.password-requirements {
  margin-top: 0.5rem;
  list-style: none;
  padding: 0;
}

.requirement-item,
.requirement {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--register-text-secondary);
  margin-top: 0.25rem;
}

.requirement-item.met,
.requirement.met {
  color: var(--register-success);
}

.requirement-item::before,
.requirement::before {
  content: '✓';
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.requirement-item.met::before,
.requirement.met::before {
  background: var(--register-success);
  color: white;
}

.requirement-item:not(.met)::before,
.requirement:not(.met)::before {
  background: #e2e8f0;
  color: #a0aec0;
}

/* ============================================
   Checkboxes
   ============================================ */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin: 1rem 0;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--register-primary);
  margin-top: 2px;
}

.checkbox-text {
  font-size: 14px;
  color: var(--register-text);
  line-height: 1.5;
}

.checkbox-text a {
  color: var(--register-primary);
  text-decoration: none;
  font-weight: 600;
}

.checkbox-text a:hover {
  text-decoration: underline;
}

/* ============================================
   Summary Section
   ============================================ */
.summary-section {
  background: var(--register-input-bg);
  border: 2px solid var(--register-border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.summary-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--register-text);
  margin: 0 0 1rem 0;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--register-border);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--register-text-secondary);
}

.summary-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--register-text);
  text-align: right;
  word-break: break-word;
  max-width: 60%;
}

/* ============================================
   Footer
   ============================================ */
.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--register-border);
  font-size: 15px;
  color: var(--register-text-secondary);
}

.auth-footer a {
  color: var(--register-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ============================================
   Trust Indicators
   ============================================ */
.trust-indicators {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--register-text-secondary);
  font-weight: 500;
}

.trust-icon {
  width: 24px;
  height: 24px;
  color: var(--register-primary);
  flex-shrink: 0;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.alert-success {
  background: #f0fdf4;
  color: var(--register-success);
  border: 2px solid var(--register-success);
}

.alert-error {
  background: #fef2f2;
  color: var(--register-error);
  border: 2px solid var(--register-error);
}

.alert-icon {
  flex-shrink: 0;
}

.alert-close {
  margin-left: auto;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.alert-close:hover {
  opacity: 1;
}

/* ============================================
   Responsive Design - Tablet
   ============================================ */
@media (max-width: 768px) {
  .auth-container {
    padding: 2rem 1rem;
    min-height: calc(100vh - 60px);
  }

  .auth-card {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }

  .auth-header h1 {
    font-size: 26px;
  }

  .auth-subtitle {
    font-size: 14px;
  }

  .progress-circle {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .progress-step span {
    font-size: 12px;
  }

  .step-title {
    font-size: 22px;
  }

  .form-actions,
  .step-navigation {
    flex-direction: column;
  }

  .form-actions .btn-back,
  .form-actions .btn-next,
  .form-actions .btn-submit,
  .step-navigation .btn-back,
  .step-navigation .btn-next,
  .step-navigation .btn-submit {
    width: 100%;
    flex: 1;
  }

  .trust-indicators {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }

  /* Make summary items stack on small tablets */
  .summary-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .summary-value {
    text-align: left;
    max-width: 100%;
  }
}

/* ============================================
   Responsive Design - Mobile
   ============================================ */
@media (max-width: 480px) {
  .auth-container {
    padding: 1rem 0.5rem;
    min-height: calc(100vh - 60px);
  }

  .auth-card {
    padding: 1.5rem 1rem;
    border-radius: 10px;
    max-width: 100%;
  }

  .auth-header {
    margin-bottom: 1.5rem;
  }

  .auth-header h1 {
    font-size: 22px;
  }

  .auth-subtitle {
    font-size: 13px;
  }

  .form-progress {
    margin-bottom: 1.5rem;
  }

  .progress-circle {
    width: 36px;
    height: 36px;
    font-size: 14px;
    border-width: 2px;
  }

  .progress-step span {
    font-size: 10px;
  }

  .progress-line {
    top: -20px;
    height: 2px;
  }

  .step-title {
    font-size: 20px;
    margin-bottom: 1.25rem;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-label {
    font-size: 14px;
  }

  .form-input,
  .form-select {
    padding: 11px 14px;
    font-size: 14px;
  }

  .password-input-wrapper .form-input {
    padding-right: 42px;
  }

  .btn-next,
  .btn-submit,
  .btn-back {
    padding: 12px 20px;
    font-size: 15px;
  }

  .form-actions,
  .step-navigation {
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .summary-section {
    padding: 1rem;
  }

  .summary-section h3 {
    font-size: 16px;
  }

  .summary-item {
    padding: 0.5rem 0;
    flex-direction: column;
    gap: 0.25rem;
  }

  .summary-label,
  .summary-value {
    font-size: 13px;
  }

  .summary-value {
    text-align: left;
    max-width: 100%;
  }

  .trust-indicators {
    padding: 1rem 0.5rem;
  }

  .trust-item {
    font-size: 13px;
  }

  .trust-icon {
    width: 20px;
    height: 20px;
  }

  .password-strength {
    padding: 10px;
  }

  .password-requirements {
    margin-top: 0.5rem;
  }

  .requirement-item,
  .requirement {
    font-size: 12px;
    gap: 6px;
  }

  .requirement-item::before,
  .requirement::before {
    width: 14px;
    height: 14px;
    font-size: 10px;
  }

  .checkbox-label {
    gap: 10px;
  }

  .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  .checkbox-text {
    font-size: 13px;
  }

  .auth-footer {
    font-size: 14px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .alert {
    padding: 12px 14px;
    font-size: 13px;
    gap: 10px;
  }
}

/* ============================================
   Responsive Design - Extra Small Mobile
   ============================================ */
@media (max-width: 375px) {
  .auth-container {
    padding: 0.75rem 0.5rem;
  }

  .auth-card {
    padding: 1.25rem 0.75rem;
  }

  .auth-header h1 {
    font-size: 20px;
  }

  .auth-subtitle {
    font-size: 12px;
  }

  .progress-circle {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .progress-step span {
    font-size: 9px;
  }

  .step-title {
    font-size: 18px;
  }

  .form-label {
    font-size: 13px;
  }

  .form-input,
  .form-select {
    padding: 10px 12px;
    font-size: 13px;
  }

  .password-input-wrapper .form-input {
    padding-right: 40px;
  }

  .password-toggle {
    right: 10px;
    padding: 4px;
  }

  .password-toggle .eye-icon {
    width: 18px;
    height: 18px;
  }

  .btn-next,
  .btn-submit,
  .btn-back {
    padding: 11px 18px;
    font-size: 14px;
  }

  .btn-icon {
    width: 18px;
    height: 18px;
  }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.form-input:focus-visible,
.form-select:focus-visible,
.btn-next:focus-visible,
.btn-submit:focus-visible,
.btn-back:focus-visible {
  outline: 3px solid var(--register-primary);
  outline-offset: 2px;
}
