/* ══════════════════════════════════════════
   RESUME BUILDER TOOL — TOP STRIP
   (Slim strip instead of the big image banner — this page needs
   vertical room for the form + live preview, not a hero image.)
══════════════════════════════════════════ */
.rb-topstrip {
  background: linear-gradient(120deg, #0a1628 0%, #16213a 100%);
  padding-top: calc(var(--header-h, 75px) + var(--topbar-h, 38px) + 28px);
  padding-bottom: 28px;
}
.rb-topstrip-inner { text-align: left; }
.rb-topstrip-crumb {
  font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.6);
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.rb-topstrip-crumb a { color: rgba(255,255,255,0.6); text-decoration: none; }
.rb-topstrip-crumb a:hover { color: #ff8433; }
.rb-topstrip-crumb i { font-size: 8px; color: rgba(255,255,255,0.35); }
.rb-topstrip-crumb span { color: #ffffff; }
.rb-topstrip-title {
  font-family: 'Sora', sans-serif; font-size: clamp(22px, 3vw, 28px); font-weight: 800;
  color: #ffffff; margin: 0 0 6px; letter-spacing: -0.4px;
}
.rb-topstrip-desc { font-size: 14px; color: rgba(255,255,255,0.75); max-width: 640px; margin: 0; }

/* ══════════════════════════════════════════
   BUILDER LAYOUT
══════════════════════════════════════════ */
.rb-builder { background: var(--bg); padding: 36px 0 64px; }
.rb-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Left column: form card ── */
.rb-form-col {
  background: #ffffff; border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow);
}

.rb-steps {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border); padding-bottom: 14px;
}
.rb-step-tab {
  border: none; background: var(--light); color: var(--muted);
  font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 50px;
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.rb-step-tab.active { background: var(--saffron); color: #ffffff; }
.rb-step-tab:not(.active):hover { background: var(--saffron-glow); color: var(--saffron); }

.rb-step-panel { display: none; }
.rb-step-panel.active { display: block; animation: rbFadeIn 0.2s ease; }
@keyframes rbFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.rb-step-hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

.rb-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rb-field { margin-bottom: 14px; }
.rb-field label {
  display: block; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.rb-optional { font-weight: 400; color: var(--muted); text-transform: none; }
.rb-field input,
.rb-field textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 12px; font-size: 13.5px; font-family: 'DM Sans', sans-serif;
  color: var(--text); background: #fff; resize: vertical;
}
.rb-field input:focus, .rb-field textarea:focus {
  outline: none; border-color: var(--saffron); box-shadow: 0 0 0 3px var(--saffron-glow);
}

/* ── Repeatable entry cards (experience / education) ── */
.rb-entry-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px;
  margin-bottom: 14px; position: relative; background: var(--light);
}
.rb-entry-remove {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: #fff; color: #ef4444; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); font-size: 12px;
}
.rb-entry-empty {
  text-align: center; color: var(--muted); font-size: 13px;
  padding: 18px 0; border: 1.5px dashed var(--border); border-radius: 12px; margin-bottom: 14px;
}

/* ── Buttons ── */
.rb-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; border-radius: 50px;
  padding: 10px 18px; cursor: pointer; border: none; transition: all 0.15s ease;
}
.rb-btn-primary { background: var(--saffron); color: #fff; }
.rb-btn-primary:hover { background: #e65f00; transform: translateY(-1px); }
.rb-btn-outline {
  background: #fff; color: var(--saffron); border: 1.5px solid var(--saffron);
  width: 100%; justify-content: center; margin-bottom: 6px;
}
.rb-btn-outline:hover { background: var(--saffron-glow); }
.rb-btn-ghost { background: transparent; color: var(--muted); padding: 10px 6px; }
.rb-btn-ghost:hover { color: var(--text); }

.rb-step-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
}

/* ── Skills step ── */
.rb-skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; min-height: 20px; }
.rb-skill-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--saffron-glow); color: var(--saffron);
  font-size: 12.5px; font-weight: 700; padding: 6px 10px 6px 12px; border-radius: 50px;
}
.rb-skill-tag button {
  border: none; background: transparent; color: var(--saffron); cursor: pointer; font-size: 11px;
}

/* ── Template step ── */
.rb-template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 6px; }
.rb-template-swatch {
  border: 1.5px solid var(--border); border-radius: 12px; background: #fff;
  padding: 10px; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.rb-template-swatch.active { border-color: var(--saffron); color: var(--saffron); background: var(--saffron-glow); }
.rb-swatch-bar { display: block; width: 100%; height: 34px; border-radius: 6px; }
.rb-swatch-classic { background: linear-gradient(180deg, #0a1628 0 30%, #f4f6f8 30%); }
.rb-swatch-modern { background: linear-gradient(180deg, #ff6b00 0 30%, #fff 30%); }
.rb-swatch-minimal { background: linear-gradient(180deg, #64748b 0 12%, #fff 12%); }

.rb-draft-note {
  margin-top: 16px; font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.rb-draft-note button {
  border: none; background: transparent; color: var(--saffron); font-weight: 700; cursor: pointer;
  margin-left: auto; font-size: 12px;
}

/* ══════════════════════════════════════════
   LIVE PREVIEW (right column)
══════════════════════════════════════════ */
.rb-preview-col { position: sticky; top: calc(var(--header-scroll-h, 60px) + 20px); }

.rb-preview-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.rb-preview-label { font-size: 12.5px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }

.rb-preview-frame {
  background: #e9edf1; border-radius: 16px; padding: 18px;
  max-height: 78vh; overflow-y: auto; box-shadow: var(--shadow);
}

.rb-resume {
  background: #ffffff; border-radius: 4px; padding: 34px;
  min-height: 400px; font-family: 'DM Sans', sans-serif; color: #1e293b;
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
}
.rb-resume h2.rb-r-name { font-family: 'Sora', sans-serif; font-size: 24px; font-weight: 800; margin: 0 0 2px; }
.rb-resume .rb-r-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.rb-resume .rb-r-contact { font-size: 12px; color: #64748b; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.rb-resume .rb-r-section { margin-bottom: 18px; }
.rb-resume .rb-r-section-title {
  font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 2px solid #e2e8f0;
}
.rb-resume .rb-r-summary { font-size: 13px; line-height: 1.7; color: #334155; margin: 0; }
.rb-resume .rb-r-entry { margin-bottom: 12px; }
.rb-resume .rb-r-entry-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 700; }
.rb-resume .rb-r-entry-sub { font-size: 12.5px; color: #64748b; margin: 1px 0 5px; }
.rb-resume .rb-r-entry ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.7; color: #334155; }
.rb-resume .rb-r-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-resume .rb-r-skill-pill { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 50px; }
.rb-resume .rb-r-empty { font-size: 13px; color: #94a3b8; text-align: center; padding: 40px 0; }

/* Theme: Classic — navy header bar */
.rb-theme-classic .rb-r-name { color: #0a1628; }
.rb-theme-classic .rb-r-title { color: #ff6b00; }
.rb-theme-classic .rb-r-section-title { color: #0a1628; border-bottom-color: #0a1628; }
.rb-theme-classic .rb-r-skill-pill { background: #eef1f5; color: #0a1628; }

/* Theme: Modern — saffron accents throughout */
.rb-theme-modern .rb-resume { border-top: 6px solid #ff6b00; }
.rb-theme-modern .rb-r-name { color: #1e293b; }
.rb-theme-modern .rb-r-title { color: #ff6b00; }
.rb-theme-modern .rb-r-section-title { color: #ff6b00; border-bottom-color: #ffd9b8; }
.rb-theme-modern .rb-r-skill-pill { background: #fff1e6; color: #ff6b00; }

/* Theme: Minimal — grayscale, understated */
.rb-theme-minimal .rb-r-name { color: #111827; }
.rb-theme-minimal .rb-r-title { color: #6b7280; font-weight: 500; }
.rb-theme-minimal .rb-r-section-title { color: #374151; border-bottom-color: #d1d5db; letter-spacing: 0.1em; }
.rb-theme-minimal .rb-r-skill-pill { background: #f3f4f6; color: #374151; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 980px) {
  .rb-builder-grid { grid-template-columns: 1fr; }
  .rb-preview-col { position: static; order: -1; }
  .rb-preview-frame { max-height: 60vh; }
}

@media (max-width: 600px) {
  .rb-topstrip { padding-top: calc(var(--header-h, 75px) + var(--topbar-h, 38px) + 18px); }
  .rb-field-row { grid-template-columns: 1fr; gap: 0; }
  .rb-template-grid { grid-template-columns: 1fr; }
  .rb-form-col { padding: 16px; }
  .rb-resume { padding: 20px; }
}

/* Hide everything except the resume itself when the browser print
   dialog is used as a fallback download path. */
@media print {
  body * { visibility: hidden; }
  #rb-preview, #rb-preview * { visibility: visible; }
  #rb-preview { position: absolute; top: 0; left: 0; width: 100%; box-shadow: none; }
}
