/* ==========================================================================
   HEXARISE ONBOARDING - ENGINEERING SKETCHBOOK STYLES
   ========================================================================== */

:root {
  --onboarding-max-w: 1100px;
}

body.onboarding-body {
  background-color: var(--canvas);
  color: var(--body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  font-family: var(--font-primary);
  overflow-x: hidden;
  position: relative;
}

/* Header */
.onboarding-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) clamp(16px, 4vw, 32px);
  height: 64px;
  width: 100%;
  max-width: var(--onboarding-max-w);
  margin: 0 auto;
  flex-shrink: 0;
}

.icon-close-btn {
  color: var(--mute);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--hairline);
  background: var(--surface-card);
  transition: all 0.15s ease;
}

.icon-close-btn:hover {
  color: var(--ink);
  background-color: var(--surface-soft);
  border-color: var(--ink);
}

/* Main Container */
.onboarding-main {
  position: relative;
  z-index: 10;
  flex: 1;
  width: 100%;
  max-width: var(--onboarding-max-w);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) var(--space-xxl) clamp(16px, 4vw, 32px);
  display: flex;
  flex-direction: column;
}

/* Progress Wrapper */
.progress-wrapper {
  margin-bottom: var(--space-lg);
  max-width: 100%;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-xs);
}

.progress-step-text {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.progress-percentage {
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background-color: var(--surface-soft);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--hairline-soft);
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Step Card Desktop Layout */
.step-card {
  display: none;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
  flex: 1;
}

.step-card.active {
  display: grid;
}

.step-intro {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.step-subtitle {
  font-size: clamp(14px, 1.8vw, 15px);
  color: var(--body);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.desktop-value-box {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.desktop-value-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--body);
}

.desktop-value-item span.icon {
  color: var(--ink);
  font-size: 18px;
}

/* Question Box & Card Grid */
.question-box {
  background-color: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: clamp(20px, 4vw, 32px);
  display: flex;
  flex-direction: column;
}

.question-heading {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-lg);
}

/* Search Input for Step 2 */
.search-box-wrapper {
  position: relative;
  margin-bottom: var(--space-lg);
  width: 100%;
}

.search-icon-inside {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mute);
  pointer-events: none;
  font-size: 18px;
}

.search-input-field {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 38px;
  height: 38px;
  color: var(--ink);
  font-family: var(--font-primary);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-field:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Industry Cards/Chips Grid */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
  width: 100%;
}

.industry-chip {
  background-color: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s ease;
  min-height: 80px;
  user-select: none;
}

.industry-chip:hover {
  border-color: var(--ink);
  background-color: var(--surface-soft);
}

.industry-chip.chip-selected {
  background-color: var(--primary-light);
  color: var(--ink);
  border-color: var(--primary);
  font-weight: 700;
}

.industry-chip .chip-icon {
  font-size: 22px;
  color: var(--ink);
}

.industry-chip .chip-label {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* Step 4 Multi-Select Goal Cards Grid */
.goal-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--space-md);
  width: 100%;
}

.goal-select-card {
  position: relative;
  background-color: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  user-select: none;
}

.goal-select-card:hover {
  border-color: var(--ink);
}

.goal-select-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.goal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: var(--space-md);
}

.goal-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--surface-soft);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--hairline);
  background-color: var(--surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-select-card.selected .goal-checkbox-box {
  background-color: var(--primary);
  border-color: var(--ink);
}

.goal-checkbox-box span {
  font-size: 13px;
  color: var(--on-primary);
  opacity: 0;
}

.goal-select-card.selected .goal-checkbox-box span {
  opacity: 1;
}

.goal-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

/* Options Grid */
.options-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

.option-card {
  display: block;
  cursor: pointer;
  position: relative;
}

.option-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-content {
  width: 100%;
  height: 100%;
  min-height: 60px;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background-color: var(--surface-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.option-card:hover .option-content {
  border-color: var(--ink);
}

.option-card.active .option-content,
.option-radio:checked + .option-content {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.option-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.custom-radio {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface-card);
}

.option-card.active .custom-radio,
.option-radio:checked + .option-content .custom-radio {
  border-color: var(--ink);
  background-color: var(--primary);
}

.radio-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--on-primary);
  transform: scale(0);
}

.option-card.active .radio-dot,
.option-radio:checked + .option-content .radio-dot {
  transform: scale(1);
}

/* Action Footer Bar */
.onboarding-action-bar {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--onboarding-max-w);
  margin: auto auto 0 auto;
  padding: var(--space-lg) clamp(16px, 4vw, 32px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.btn-back {
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
  color: var(--ink);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  transition: all 0.15s ease;
}

.btn-back:hover:not(:disabled) {
  background-color: var(--surface-soft);
  border-color: var(--ink);
}

.btn-back:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-continue {
  height: 42px;
  min-width: 180px;
  padding: 0 28px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  transition: background-color 0.15s ease;
}

.btn-continue:hover {
  background-color: var(--primary-pressed);
}

/* Responsive */
@media (max-width: 768px) {
  .step-card {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

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

  .desktop-value-box {
    display: none;
  }

  .btn-continue {
    flex: 1;
    min-width: auto;
  }
}
