/* No-scroll wizard design - fits in viewport */

/* Responsive wizard layout - adapts to content */
.wizard-content {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  position: relative;
  /* Adaptive dimensions */
  width: 500px !important;
  max-width: 500px !important;
  min-height: 400px;
  max-height: 90vh;
  height: auto !important;
  overflow: hidden;
}

/* Compact wizard header */
.wizard-header {
  padding: 16px 24px 0 24px;
  flex-shrink: 0;
  text-align: center;
}

.wizard-header h2 {
  font-size: 20px;
  margin: 0 0 8px 0;
  color: var(--text);
  font-weight: 600;
}

/* Compact progress bar */
.wizard-progress {
  padding: 0 24px 16px 24px;
  flex-shrink: 0;
}

.wizard-progress-bar {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.wizard-progress-text {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

/* Wizard form container */
#consult-wizard-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Adaptive wizard steps */
.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  /* Adaptive height based on content */
  min-height: 300px;
  height: auto;
  overflow-y: auto;
  max-height: calc(90vh - 180px);
}

.wizard-step.hidden {
  display: none;
}

.wizard-step-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

/* Compact step titles */
.wizard-step h2 {
  font-size: 18px;
  margin: 0 0 8px 0;
  color: var(--text);
  font-weight: 600;
}

.wizard-step-description {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px 0;
  line-height: 1.4;
}

/* Compact form elements */
.wizard-step label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Checkbox label styling */
.wizard-step label.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  cursor: pointer;
}

.wizard-step label.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  margin-top: 2px;
}

.wizard-step .privacy-text {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.wizard-step .privacy-text a {
  color: var(--accent-green);
  text-decoration: underline;
}

.wizard-step input,
.wizard-step select,
.wizard-step textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  margin-top: 4px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.wizard-step input:focus,
.wizard-step select:focus,
.wizard-step textarea:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(130, 196, 81, 0.1);
}

.wizard-step textarea {
  height: 150px;
  resize: vertical;
  min-height: 120px;
  max-height: 250px;
}



/* Compact radio/checkbox groups */
.option-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 8px 0;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.option-item:hover {
  border-color: var(--accent-green);
  background: rgba(130, 196, 81, 0.05);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  margin-right: 8px;
  width: auto;
}

/* Compact buttons */
.wizard-buttons {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 24px;
  margin: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
  border-radius: 0 0 16px 16px;
}

.wizard-buttons .btn {
  margin: 0;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-buttons .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wizard-buttons .btn-primary {
  background: var(--brand-primary);
  color: var(--brand-contrast);
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(130, 196, 81, 0.3);
}

.wizard-buttons .btn-primary:hover {
  background: var(--accent-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(130, 196, 81, 0.4);
}

.wizard-buttons .btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.wizard-buttons .btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent-olive);
  background: rgba(164, 158, 121, 0.05);
}

/* Mobile adaptations - adaptive height */
@media (max-width: 600px) {
  .wizard-content {
    width: 95vw !important;
    max-width: 95vw !important;
    height: auto !important;
    min-height: 70vh;
    max-height: 95vh !important;
    margin: 2.5vh auto;
    border-radius: 12px;
  }
  
  .wizard-header {
    padding: 12px 16px 0 16px;
  }
  
  .wizard-progress {
    padding: 0 16px 12px 16px;
  }
  
  .wizard-step {
    padding: 0 16px;
    min-height: 400px;
    max-height: calc(95vh - 160px);
    height: auto;
  }
  

  
  .option-group {
    grid-template-columns: 1fr;
  }
  
  .wizard-buttons {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
  }
  
  .wizard-buttons .btn {
    width: 100%;
    order: initial;
  }
  
  .wizard-buttons .btn-primary {
    order: 1;
  }
  
  .wizard-buttons .btn-ghost {
    order: 2;
  }
}

/* Extra small screens - minimal design */
@media (max-width: 480px) {
  .wizard-content {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: 100vh !important;
    margin: 0;
    border-radius: 0;
  }
  
  .wizard-header {
    padding: 10px 12px 0 12px;
  }
  
  .wizard-header h2 {
    font-size: 16px;
  }
  
  .wizard-progress {
    padding: 0 12px 10px 12px;
  }
  
  .wizard-step {
    padding: 0 12px;
    height: calc(100vh - 120px);
  }
  
  .wizard-step h2 {
    font-size: 16px;
  }
  
  .wizard-buttons {
    padding: 10px 12px;
  }
}
