/* Progress Indicator Styles */
.progress-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 1.5rem 0;
  padding: 0 1rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid #e0e0e0;
  background: white;
  color: #666;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 12px;
  color: #666;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
}

.progress-line {
  width: 50px;
  height: 2px;
  background: #e0e0e0;
  transition: all 0.3s ease;
}

/* Active step styles */
.progress-step.active .step-circle {
  background: #f39200;
  border-color: #f39200;
  color: white;
  transform: scale(1.1);
}

.progress-step.active .step-label {
  color: #f39200;
  font-weight: 600;
}

/* Completed step styles */
.progress-step.completed .step-circle {
  background: #f3920095;
  border-color: #f3920095;
  color: white;
}

.progress-step.completed .step-label {
  color: #f3920095;
  font-weight: 600;
}

/* Completed line styles */
.progress-line.completed {
  background: #f3920095;
}

/* Animation for step completion */
.progress-step.completing .step-circle {
  animation: completeStep 0.5s ease-in-out;
}

@keyframes completeStep {
  0% { transform: scale(1.1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Responsive adjustments for progress indicator */
@media (max-width: 576px) {
  .progress-indicator {
    gap: 8px;
    padding: 0 0.5rem;
  }
  
  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .step-label {
    font-size: 10px;
    max-width: 60px;
    line-height: 1.2;
  }
  
  .progress-line {
    width: 30px;
  }
}

/* Step Title Styles - Override Bootstrap */
.onboarding-container .onboarding-step h3.step-title {
  font-weight: 400;
  font-size: 20pt;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: left;
}

/* Onboarding Styles */
.onboarding-container {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease-in-out;
}

.onboarding-container.show {
  opacity: 1;
  transform: translateY(0);
}

/* Ensure content doesn't hide behind fixed controls */
body:has(.onboarding-controls) .left-panel > div:first-child {
  padding-bottom: 120px;
}

/* Sticky controls for onboarding actions across all sizes */
.onboarding-controls {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 1000;
}

/* Email Verification Styles */
.verification-container {
  opacity: 1;
  transform: translateY(20px);
  transition: all 0.4s ease-in-out;
  padding: 2rem 0;
}

.verification-container.show {
  opacity: 1;
  transform: translateY(0);
}

.verification-icon {
  animation: bounceIn 0.6s ease-out;
}

.verification-container h3 {
  font-weight: 600;
  color: #333;
}

.verification-container p {
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.verification-container .btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.verification-container .btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(243, 146, 0, 0.3);
}

.verification-container .btn:disabled {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.onboarding-step {
  display: none;
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.3s ease-in-out;
}

.onboarding-step.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.onboarding-step.slide-out-left {
  opacity: 0;
  transform: translateX(-30px);
}

.onboarding-step.slide-in-right {
  opacity: 0;
  transform: translateX(30px);
}

/* Sector Tags */
.sectors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sector-tag {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  overflow: hidden;
  transform: scale(1);
}

.sector-tag:hover {
  border-color: #f39200;
  color: #f39200;
  transform: translateY(-2px);
}

.sector-tag.selected {
  background: #f39200;
  border-color: #f39200;
  color: white;
  transform: scale(1);
}

.sector-tag.selected .add-icon {
  transform: rotate(45deg);
}

.add-icon {
  font-size: 12px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

/* Investor Type Buttons */
.investor-types {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.investor-type-btn {
  background: white;
  border: 2px solid #f39200;
  border-radius: 4px;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
}

.investor-type-btn:hover {
  border-color: #f39200;
  color: #f39200;
  transform: translateY(-2px);
}

.onboarding-step .investor-type-btn.selected {
  background: #f39200 !important;
  border-color: #f39200 !important;
  color: white !important;
  transform: scale(1.02) !important;
}

/* Location Form */
.location-form .form-control {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.location-form .form-control:focus {
  border-color: #f39200;
  box-shadow: 0 0 0 0.2rem rgba(243, 146, 0, 0.25);
}

.location-form .form-label {
  color: #333;
  margin-bottom: 8px;
}

/* Enhanced Country Selector */
.country-selector {
  position: relative;
}

/* Style the internal label to match floating label appearance */
.country-display .form-label {
  position: absolute !important;
  top: 0 !important;
  left: 10px !important;
  font-size: 11px !important;
  color: #f39200 !important;
  font-weight: 500 !important;
  background: #fff !important;
  padding: 0 4px !important;
  z-index: 10 !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
}

.country-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  /* Let content be vertically centered like other inputs */
  padding-top: 0 !important;
  /* Remove all the custom styling to let form-control take precedence */
}

/* Position the dropdown arrow on the right */
.dropdown-arrow {
  position: absolute !important;
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #666 !important;
  transition: transform 0.3s ease !important;
  font-size: 12px !important;
  pointer-events: none !important;
}

.country-selector.open .dropdown-arrow {
  transform: translateY(-50%) rotate(180deg) !important;
}

/* Placeholder visible by default; it will be replaced when a country is selected */
.country-display .placeholder-text {
  flex: 1;
  padding-top: 6px;
  padding-right: 40px; /* Leave space for arrow */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-display:hover {
  border-color: #f39200 !important;
}

.country-display.active {
  border-color: #f39200 !important;
  box-shadow: 0 0 0 0.2rem rgba(243, 146, 0, 0.25) !important;
}

.selected-country {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding-right: 40px; /* Leave space for arrow */
  padding-top: 6px;
}

.country-flag {
  width: 24px;
  height: 18px;
  border-radius: 2px;
  object-fit: cover;
}

.placeholder-text {
  color: #333;
}

.country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #f39200;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow: hidden;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.country-selector.open .country-dropdown {
  display: block;
}

.country-search {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.country-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  font-size: 14px;
}

.country-search input:focus {
  border-color: #f39200;
  box-shadow: 0 0 0 0.1rem rgba(243, 146, 0, 0.25);
}

.country-list {
  max-height: 200px;
  overflow-y: auto;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f8f9fa;
}

.country-option:last-child {
  border-bottom: none;
}

.country-option:hover {
  background-color: #f8f9fa;
}

.country-option.highlighted {
  background-color: #fff3e0;
}

.country-option.selected {
  background-color: #f39200;
  color: white;
}

.country-name {
  font-size: 14px;
  color: #333;
}

.country-option.selected .country-name {
  color: white;
}

.loading {
  padding: 20px;
  text-align: center;
  color: #666;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}
    
/* Registration form and related elements hiding */
.registration-form,
.registration-header,
.help-section {
  transition: all 0.4s ease-in-out;
}

.registration-form.hide,
.registration-header.hide,
.help-section.hide {
  opacity: 0;
  transform: translateX(-30px);
  pointer-events: none;
}

/* Social section hiding */
.social-section,
.signin-section {
  transition: all 0.4s ease-in-out;
}

.social-section.hide,
.signin-section.hide {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Step transition animations */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

.step-enter {
  animation: slideInRight 0.3s ease-out;
}

.step-exit {
  animation: slideOutLeft 0.3s ease-out;
}

/* Mobile layout fixes - Only for onboarding page */
@media (max-width: 991.98px) {
  /* Only apply to pages with onboarding container */
  .onboarding-container .left-panel {
    min-height: 100vh;
    display: flex !important;
    flex-direction: column !important;
    padding-top: 0 !important;
  }

  /* Target the specific onboarding page structure */
  body:has(.onboarding-container) .left-panel > div:first-child {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 120px; /* Space for fixed button */
    padding-top: 1rem !important; /* Ensure top padding */
  }

  /* Keep sticky behavior consistent on mobile */
  body:has(.onboarding-controls) .left-panel > div:last-child {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    padding: 1rem 1.5rem !important;
  }

  /* Ensure brand logo is visible on onboarding page only */
  body:has(.onboarding-container) .brand {
    margin-top: 0.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Adjust welcome header spacing on onboarding page only */
  body:has(.onboarding-container) .welcome-header {
    margin-bottom: 2rem !important;
    margin-top: 1rem !important;
  }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .sectors-grid {
    gap: 8px;
  }

  .sector-tag {
    font-size: 13px;
    padding: 6px 12px;
  }

  .investor-type-btn {
    padding: 10px;
    font-size: 15px;
  }

  .welcome-header h4 {
    font-size: 1.5rem;
  }

  .step-title {
    font-size: 18pt !important;
  }

  /* Ensure proper mobile spacing - Only for onboarding page */
  body:has(.onboarding-controls) .left-panel > div:first-child {
    padding-top: 0.75rem !important;
    padding-bottom: 140px !important; /* More space for button */
  }

  body:has(.onboarding-container) .brand-ir-img {
    max-height: 40px !important;
  }
}
