/* ATS resume builder */
.container--builder {
  max-width: 1180px;
}

.rb-page--build {
  padding-bottom: 4.5rem;
}

@media (min-width: 992px) {
  .rb-page--build {
    padding-bottom: 0;
  }
}

.rb-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: flex-start;
}

@media (min-width: 992px) {
  .rb-hero-stats {
    justify-content: flex-end;
  }
}

.rb-hero-stats li {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rb-hero-stats .bi {
  color: var(--brand-primary, #6366f1);
}

.rb-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.rb-banner--info {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.rb-banner__body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.rb-banner__body > .bi {
  font-size: 1.25rem;
  color: var(--brand-primary, #6366f1);
  margin-top: 0.1rem;
}

.rb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1rem 1.25rem;
}

.rb-toolbar__progress {
  flex: 1 1 200px;
  min-width: 0;
}

.rb-toolbar__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.rb-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  overflow: hidden;
}

.rb-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.35s ease;
}

.rb-save-indicator {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rb-save-indicator.is-pending {
  opacity: 0.6;
}

.rb-save-indicator.is-pending .bi::before {
  content: '\F130';
}

.rb-step-nav {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rb-step-nav::-webkit-scrollbar {
  display: none;
}

.rb-step-nav__item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 999px;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.rb-step-nav__item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  font-size: 0.65rem;
  color: var(--brand-primary, #6366f1);
}

.rb-step-nav__item:hover {
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--brand-primary, #6366f1);
}

.rb-step-nav__item.is-active {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--brand-primary, #6366f1);
}

.rb-step-nav__item.is-done span {
  background: #16a34a;
  color: #fff;
}

.rb-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .rb-layout--build {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .rb-layout--fix {
    grid-template-columns: 280px minmax(0, 1fr) 340px;
    align-items: start;
  }

  .rb-preview-col {
    position: sticky;
    top: 1rem;
  }
}

.rb-section {
  margin-bottom: 1rem;
}

.rb-section__head {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.rb-section__head--actions {
  flex-wrap: wrap;
  align-items: flex-start;
}

.rb-section__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-primary, #6366f1);
  font-size: 1.1rem;
}

.rb-section__title {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.rb-section__desc {
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

.rb-template-picker {
  position: relative;
}

.rb-template-current {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rb-template-current:hover,
.rb-template-current[aria-expanded='true'] {
  border-color: var(--brand-primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.rb-template-current .bi {
  color: var(--text-secondary, #64748b);
  transition: transform 0.2s;
}

.rb-template-current[aria-expanded='true'] .bi {
  transform: rotate(180deg);
}

.rb-template-panel {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  padding: 0.75rem;
  background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

.rb-template-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rb-template-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.85rem;
  cursor: pointer;
}

.rb-template-option:hover,
.rb-template-option.is-selected {
  background: rgba(99, 102, 241, 0.08);
  color: var(--brand-primary, #6366f1);
}

.rb-template-option.is-blank {
  font-weight: 600;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  margin-bottom: 0.25rem;
  padding-bottom: 0.65rem;
  border-radius: 0;
}

.rb-template-empty {
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
}

.rb-job-card {
  background: var(--bg-page, #f8fafc);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 12px;
}

.rb-job-card + .rb-job-card {
  margin-top: 0.75rem;
}

.rb-job-card textarea {
  resize: vertical;
  min-height: 2.75rem;
}

.rb-preview-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rb-preview-wrap {
  position: relative;
  min-height: 200px;
}

.rb-preview {
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.7rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  margin: 0;
}

.rb-preview-wrap.has-content .rb-preview-empty {
  display: none;
}

.rb-preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-secondary, #64748b);
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed rgba(99, 102, 241, 0.2);
}

.rb-preview-empty .bi {
  font-size: 1.75rem;
  opacity: 0.45;
}

.rb-checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rb-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.rb-checklist .bi-check-circle-fill {
  color: #16a34a;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.rb-checklist .bi-circle {
  color: #cbd5e1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.rb-privacy-note .bi {
  color: #16a34a;
}

.rb-mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--border-color, #e2e8f0);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
}

.rb-mobile-bar__progress {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}

.rb-fix-score__num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-primary, #6366f1);
  line-height: 1;
}

.rb-rewrite-item:last-child {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Legacy step pills (fix wizard) */
.rb-step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.rb-step-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--brand-primary, #6366f1);
}

.rb-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

/* Info section below builder */
.rb-info {
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding-top: var(--space-xl, 2rem);
}

.rb-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rb-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  line-height: 1.55;
}

.rb-info-list .bi-dot {
  font-size: 1.5rem;
  line-height: 1;
  margin-top: -0.15rem;
}

.rb-info-list .bi-check2 {
  flex-shrink: 0;
  margin-top: 0.15rem;
}
