/* Base styles for the Wealthsimple-inspired onboarding layout */
:root {
  --primary-color: #006BB6;
  --secondary-color: #232323;
  --accent-color: #005bc0;
  --text-color: #232323;
  --light-text: #4a4a4a;
  --bg-color: #ffffff;
  --light-bg: #f5f8fc;
  --form-bg: #fff;
  --left-bg: #f0e9e6; /* Light beige color similar to Wealthsimple */
  --border-color: #dce1e8;
  --success-color: #1e8e3e;
}

body, html {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  height: 100%;
  color: var(--text-color);
}

.onboarding-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
}

/* Left visual container */
.visual-container {
  flex: 1;
  background: linear-gradient(rgba(0, 107, 182, 0.85), rgba(0, 0, 0, 0.7)), url('../../images/login-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Add an overlay effect to the visual container background */
.visual-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(0, 107, 182, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

.visual-container img {
  max-width: 80%;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

/* Right form container */
.form-container {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background-color: var(--form-bg);
  min-height: 100vh;
  justify-content: space-between;
  box-sizing: border-box;
  overflow-x: hidden;
}

.form-content {
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
}

.form-content > * {
  width: 100%;
}

.onboarding-header {
  padding: 20px 0;
  text-align: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.onboarding-header img {
  max-height: 40px;
  width: auto;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-control::placeholder {
  color: #ababab;
}

/* Password field with eye icon */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #777;
}

/* Helper text */
.helper-text {
  font-size: 12px;
  color: var(--light-text);
  margin-top: 8px;
}

/* Terms text */
.terms-text {
  font-size: 13px;
  color: var(--light-text);
  margin: 24px 0;
  line-height: 1.5;
}

.terms-text a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}

.terms-text a:hover {
  text-decoration: underline;
}

/* Button styles */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  padding: 14px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--success-color);
  color: white;
}

.btn-primary:hover {
  background-color: #17783a;
  color: white;
}

.btn-secondary {
  background-color: white;
  color: var(--secondary-color);
  border: 1px solid var(--border-color);
  display: inline-block;
  font-weight: 600;
  text-align: center;
  padding: 14px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: #f5f5f5;
  color: var(--secondary-color);
}

.account-link {
  text-align: center;
  margin-top: 16px;
  font-size: 15px;
}

.account-link a {
  color: var(--text-color);
  font-weight: 600;
  text-decoration: none;
}

.account-link a:hover {
  text-decoration: underline;
}

/* Progress bar */
.progress-bar {
  height: 8px;
  background-color: var(--left-bg);
  border-radius: 4px;
  margin: 16px 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--success-color);
  transition: width 0.3s ease;
}

/* Footer */
.onboarding-footer {
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 8px;
}

.footer-links a, .app-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.copyright {
  font-size: 12px;
  color: var(--light-text);
}

.app-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 8px 0;
}

.app-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .onboarding-container {
    flex-direction: column;
  }
  
  .visual-container {
    display: none; /* Hide the visual container on mobile */
  }
  
  .form-container {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
  }
  
  .form-content {
    padding: 20px 0;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Fix button styling on mobile */
  .btn {
    display: inline-block !important;
    box-sizing: border-box;
    text-decoration: none;
  }
  
  .btn-row {
    display: flex !important;
    gap: 16px !important;
    width: 100% !important;
    align-items: center !important;
  }
  
  .btn-row .btn {
    flex: 1 !important;
    width: auto !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .btn-secondary {
    background-color: white !important;
    color: var(--secondary-color) !important;
    border: 1px solid var(--border-color) !important;
    flex: 1 !important;
    width: auto !important;
  }
  
  .btn-primary {
    background-color: var(--success-color) !important;
    color: white !important;
    flex: 1 !important;
    width: auto !important;
  }
  
  .footer-links {
    gap: 15px;
  }
  
  .copyright {
    font-size: 10px;
  }
}

/* Radio buttons */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 8px 0;
}

.radio-option input[type="radio"] {
  margin-right: 10px;
  transform: scale(1.3);
  accent-color: var(--success-color);
}

/* File upload */
.upload-container {
  border: 2px dashed #c8e6d0;
  border-radius: 12px;
  padding: 36px;
  text-align: center;
  margin-bottom: 24px;
  background-color: #f2fbf5;
  cursor: pointer;
}

.upload-container:hover {
  border-color: var(--success-color);
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: #9e9e9e;
}

.photo-preview {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
  object-fit: cover;
}

/* Skip link */
.skip-link {
  display: block;
  text-align: right;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 16px;
}

/* Success icon */
.success-icon {
  width: 80px;
  height: 80px;
  background-color: var(--success-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px auto;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}
