/* ============================================
   AI STACK BUILDER STYLES
   ============================================ */

/* ---- Hero ---- */
.rn-sb-hero {
  background: var(--rn-secondary);
  color: var(--rn-white);
  padding: 3rem 0 2.5rem;
  margin-top: -2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.rn-sb-hero__title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.rn-sb-hero__subtitle {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---- Wizard ---- */
.rn-sb-wizard {
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* ---- Progress Bar ---- */
.rn-sb-progress {
  height: 6px;
  background: var(--rn-gray-200);
  border-radius: var(--rn-radius-full);
  margin-bottom: 2rem;
  overflow: hidden;
}

.rn-sb-progress__bar {
  height: 100%;
  background: var(--rn-primary);
  border-radius: var(--rn-radius-full);
  transition: width 0.3s ease;
}

/* ---- Question ---- */
.rn-sb-question {
  min-height: 200px;
}

.rn-sb-loading {
  text-align: center;
  color: var(--rn-gray-400);
  padding: 3rem;
}

.rn-sb-question__text {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--rn-gray-900);
  margin-bottom: 1.5rem;
  text-align: center;
}

.rn-sb-question__step {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rn-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

/* ---- Options ---- */
.rn-sb-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.rn-sb-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  background: var(--rn-white);
  border: 2px solid var(--rn-gray-200);
  border-radius: var(--rn-radius-md);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--rn-gray-700);
  text-align: center;
  transition: all var(--rn-transition);
  font-family: var(--rn-font-sans);
}

.rn-sb-option:hover {
  border-color: var(--rn-primary);
  background: var(--rn-primary-light);
}

.rn-sb-option.is-selected {
  border-color: var(--rn-primary);
  background: var(--rn-primary-light);
  color: var(--rn-primary);
  font-weight: 600;
}

/* ---- Navigation ---- */
.rn-sb-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rn-gray-100);
}

.rn-sb-nav .rn-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Results ---- */
.rn-sb-results {
  text-align: center;
}

.rn-sb-results__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--rn-gray-900);
  margin-bottom: 0.5rem;
}

.rn-sb-results__subtitle {
  color: var(--rn-gray-500);
  margin-bottom: 2rem;
}

.rn-sb-results__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

/* ---- Result Card ---- */
.rn-sb-result-card {
  background: var(--rn-white);
  border: 1px solid var(--rn-gray-200);
  border-radius: var(--rn-radius-lg);
  padding: 1.25rem;
  transition: border-color var(--rn-transition), box-shadow var(--rn-transition);
}

.rn-sb-result-card:hover {
  border-color: var(--rn-primary);
  box-shadow: var(--rn-shadow-md);
}

.rn-sb-result-card__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--rn-radius-sm);
  object-fit: cover;
  margin-bottom: 0.75rem;
  background: var(--rn-gray-100);
}

.rn-sb-result-card__fallback {
  width: 40px;
  height: 40px;
  border-radius: var(--rn-radius-sm);
  background: var(--rn-primary-light);
  color: var(--rn-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.rn-sb-result-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rn-gray-900);
  margin-bottom: 0.25rem;
}

.rn-sb-result-card__title a {
  color: inherit;
}

.rn-sb-result-card__title a:hover {
  color: var(--rn-primary);
}

.rn-sb-result-card__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.rn-sb-result-card__meta span {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--rn-radius-full);
  background: var(--rn-gray-100);
  color: var(--rn-gray-600);
}

.rn-sb-result-card__excerpt {
  font-size: 0.8125rem;
  color: var(--rn-gray-500);
  line-height: 1.5;
}

.rn-sb-results__actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.rn-sb-results__empty {
  padding: 2rem;
  color: var(--rn-gray-400);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .rn-sb-hero__title {
    font-size: 1.75rem;
  }

  .rn-sb-question__text {
    font-size: 1.125rem;
  }

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

  .rn-sb-results__grid {
    grid-template-columns: 1fr;
  }
}
