/* M&A Alternatives Decision Tool Styles */

/* Sticky footer layout */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tool-container {
  flex: 1;
}

/* Introduction Section */
.intro-section {
  background: linear-gradient(120deg, var(--accent1) 0%, var(--accent2) 100%);
  padding: 30px;
  border-radius: 10px;
  color: white;
  box-shadow: 0 8px 28px -6px rgba(0,0,0,0.25);
  margin-bottom: 30px;
}

.intro-section h2 {
  color: white;
  margin: 0 0 15px 0;
  font-size: 1.7rem;
}

.intro-section p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 12px;
  opacity: 0.95;
}

.intro-section ul,
.intro-section ol {
  margin: 15px 0 25px 0;
  padding-left: 25px;
  font-size: 0.95rem;
  list-style: decimal;
}

.intro-section li {
  margin-bottom: 4px;
  opacity: 0.95;
}

/* Progress Indicator */
.progress-indicator {
  margin-bottom: 30px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--accent1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Wizard Steps */
.wizard-step {
  background: white;
  padding: 25px 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 15px;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.wizard-step.completed {
  padding: 15px 20px;
  background: #f9f9f9;
  border-color: #e0e0e0;
  cursor: pointer;
  transition: all 0.2s;
}

.wizard-step.completed:hover {
  border-color: var(--accent1);
  background: #f0f0f0;
  transform: translateY(-1px);
}

.wizard-step.completed .step-content,
.wizard-step.completed .step-actions,
.wizard-step.completed .step-insight {
  display: none;
}

.wizard-step.completed .step-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.wizard-step.completed .step-header h2 {
  font-size: 1.1rem;
  margin: 0;
  flex-shrink: 0;
}

.wizard-step.completed .step-subtitle {
  display: none;
}

.wizard-step:last-child {
  border-color: var(--accent1);
  box-shadow: 0 4px 12px rgba(255, 127, 80, 0.15);
}

.step-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.step-header h2 {
  color: var(--accent1);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.step-subtitle {
  color: #666;
  font-size: 0.95rem;
  font-weight: 400;
}

.step-content {
  margin-bottom: 20px;
}

.step-summary {
  display: none;
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
  margin-left: 10px;
  flex: 1;
}

.wizard-step.completed .step-summary {
  display: inline-block;
}

.step-edit-hint {
  display: none;
  font-size: 0.85rem;
  color: var(--accent1);
  font-weight: 600;
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 4px;
  background: white;
  border: 2px solid var(--accent1);
  transition: all 0.2s;
}

.wizard-step.completed .step-edit-hint {
  display: inline-block;
}

.wizard-step.completed:hover .step-edit-hint {
  background: var(--accent1);
  color: white;
}

/* Options Grid */
.options-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.radio-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.checkbox-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.selection-hint {
  grid-column: 1 / -1;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 5px;
  font-style: italic;
}

/* Option Cards */
.option-card {
  position: relative;
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  min-height: 60px;
}

.option-card:hover {
  border-color: var(--accent1);
  box-shadow: 0 2px 8px rgba(255, 127, 80, 0.15);
  transform: translateY(-1px);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card.selected {
  border-color: var(--accent1);
  background: linear-gradient(135deg, rgba(255, 127, 80, 0.05) 0%, rgba(255, 99, 71, 0.05) 100%);
  box-shadow: 0 4px 12px rgba(255, 127, 80, 0.2);
}

.option-card.selected::before {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: var(--accent1);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.option-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.option-content-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.option-icon {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent1) 0%, var(--accent2) 100%);
  color: white;
}

.option-label {
  font-weight: 600;
  color: var(--accent1);
  font-size: 0.95rem;
  flex: 1;
}

.option-description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

/* Mixed Questions */
.mixed-questions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.question-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-label {
  font-weight: 600;
  color: var(--accent1);
  font-size: 1.1rem;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 15px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
  background-color: #ccc;
  border-radius: 32px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent1);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(28px);
}

.toggle-labels {
  display: flex;
  gap: 80px;
  font-weight: 600;
  font-size: 0.95rem;
}

.toggle-label-off {
  color: #999;
}

.toggle-label-on {
  color: var(--accent1);
}

.toggle-switch input:checked ~ .toggle-labels .toggle-label-off {
  color: #999;
}

.toggle-switch input:not(:checked) ~ .toggle-labels .toggle-label-on {
  color: #999;
}

/* Radio Group (for mixed steps) */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-option:hover {
  border-color: var(--accent1);
  background: rgba(255, 127, 80, 0.05);
}

.radio-option input[type="radio"] {
  cursor: pointer;
}

.radio-option input[type="radio"]:checked {
  accent-color: var(--accent1);
}

/* Step Insight */
.step-insight {
  margin-top: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #fff9e6 0%, #fff3d9 100%);
  border-left: 4px solid #ffc107;
  border-radius: 6px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.insight-icon {
  font-size: 24px;
  flex-shrink: 0;
  color: #ffc107;
}

.insight-text {
  color: #7d5b00;
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Step Actions */
.step-actions {
  display: flex;
  flex-direction: row;
  gap: 15px;
  justify-content: flex-start;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-link {
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 127, 80, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 127, 80, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: var(--accent1);
  border: 2px solid var(--accent1);
}

.btn-secondary:hover {
  background: var(--accent1);
  color: white;
}

.btn-link {
  background: transparent;
  color: var(--accent1);
  padding: 8px 16px;
  text-decoration: underline;
}

.btn-continue,
.btn-back {
  min-width: 150px;
}

/* Results Section */
#resultsContainer {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-top: 30px;
  border-top: 4px solid var(--accent1);
}

#resultsContainer h2 {
  color: var(--accent1);
  font-size: 2rem;
  margin-bottom: 15px;
  text-align: center;
}

.results-intro {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.results-review-hint {
  display: inline-block;
  color: var(--accent1);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 8px;
}

/* Recommendation Cards */
.recommendation-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 25px;
  transition: all 0.3s;
}

.recommendation-card:hover {
  border-color: var(--accent1);
  box-shadow: 0 8px 20px rgba(255, 127, 80, 0.15);
  transform: translateY(-2px);
}

.recommendation-card:first-child {
  border-color: var(--accent1);
  background: linear-gradient(135deg, rgba(255, 127, 80, 0.03) 0%, rgba(255, 99, 71, 0.03) 100%);
}

.recommendation-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.recommendation-rank {
  background: var(--accent1);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.recommendation-header h3 {
  color: var(--accent1);
  font-size: 1.5rem;
  margin: 0;
  flex-grow: 1;
}

.confidence-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.confidence-high {
  background: #d4edda;
  color: #155724;
}

.confidence-medium {
  background: #fff3cd;
  color: #856404;
}

.confidence-moderate {
  background: #d1ecf1;
  color: #0c5460;
}

.recommendation-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.recommendation-section {
  margin-bottom: 20px;
}

.recommendation-section h4 {
  color: var(--accent1);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.recommendation-section p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 0;
}

.recommendation-section ul {
  margin: 10px 0 0 0;
  padding-left: 25px;
  color: #555;
  list-style: disc;
}

.recommendation-section li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Results Actions */
.results-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .intro-section {
    padding: 25px 20px;
  }

  .wizard-step {
    padding: 20px 18px;
  }

  .wizard-step.completed {
    padding: 12px 15px;
  }

  .step-header h2 {
    font-size: 1.3rem;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .toggle-labels {
    gap: 40px;
    font-size: 0.85rem;
  }

  .recommendation-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .recommendation-header h3 {
    font-size: 1.3rem;
  }

  .results-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .tool-header h1 {
    font-size: 1.6rem;
  }

  .intro-section h2 {
    font-size: 1.4rem;
  }

  .step-header h2 {
    font-size: 1.2rem;
  }

  .option-icon {
    font-size: 1.3rem;
  }

  .option-label {
    font-size: 0.9rem;
  }
}
