/* assets/css/auth-register.css */
/* Registration page specific styles */

:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #8b5cf6;
  --success-color: #10b981;
  --error-color: #ef4444;
  --border-color: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-light);
  color: var(--text-primary);
}

.form-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--bg-white);
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:disabled {
  background: var(--bg-light);
  cursor: not-allowed;
  opacity: 0.6;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field .form-input {
  flex: 1;
}

.phone-field {
  display: flex;
  align-items: center;
}

.country-code {
  padding: 0.875rem 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 0.5rem 0 0 0.5rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.phone-field .form-input {
  flex: 1;
  border-radius: 0 0.5rem 0.5rem 0;
  border-left: none;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--primary-color);
}

.eye-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.password-strength {
  margin-top: 0.5rem;
}

.strength-meter {
  height: 0.25rem;
  background: var(--border-color);
  border-radius: 0.25rem;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-bar {
  height: 100%;
  transition: var(--transition);
  width: 25%;
}

.strength-bar.strength-weak {
  background: var(--error-color);
  width: 25%;
}

.strength-bar.strength-medium {
  background: #f59e0b;
  width: 50%;
}

.strength-bar.strength-strong {
  background: #3b82f6;
  width: 75%;
}

.strength-bar.strength-very-strong {
  background: var(--success-color);
  width: 100%;
}

.strength-text {
  font-size: 0.75rem;
  font-weight: 600;
}

.strength-text.strength-weak {
  color: var(--error-color);
}

.strength-text.strength-medium {
  color: #f59e0b;
}

.strength-text.strength-strong {
  color: #3b82f6;
}

.strength-text.strength-very-strong {
  color: var(--success-color);
}

.form-error {
  font-size: 0.85rem;
  color: var(--error-color);
  display: none;
  margin-top: -0.25rem;
}

.form-error.show {
  display: block;
}

.form-field.checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

#terms {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  cursor: pointer;
  accent-color: var(--primary-color);
  flex-shrink: 0;
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.4;
  flex: 1;
}

.checkbox-label a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  min-height: 2.75rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-full {
  width: 100%;
}

.btn-text {
  transition: var(--transition);
}

.btn-text.hidden {
  display: none;
}

.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-loader.hidden {
  display: none;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert.hidden {
  display: none;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-secondary);
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
  z-index: 0;
}

.divider span {
  background: var(--bg-white);
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.auth-links {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.auth-links p {
  margin: 0;
}

.link-primary {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.link-primary:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.security-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 1rem;
  background: #f0f9ff;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.security-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.security-info p {
  margin: 0;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form-title {
    font-size: 1.5rem;
  }

  .form-subtitle {
    font-size: 0.9rem;
  }

  .btn {
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
  }
}
