/* ============================================================
   Resume Builder WordPress Plugin — resume-builder.css
   All selectors scoped to .rb-wrap to avoid theme conflicts.
   ============================================================ */

.rb-wrap *, .rb-wrap *::before, .rb-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.rb-wrap {
  --rb-ink:         #1a1a2e;
  --rb-ink-soft:    #4a4a6a;
  --rb-ink-muted:   #8888aa;
  --rb-paper:       #f8f7f4;
  --rb-surface:     #ffffff;
  --rb-accent:      #c8773a;
  --rb-accent-lt:   #f5ede4;
  --rb-accent-dk:   #a85e28;
  --rb-border:      #e2e0da;
  --rb-success:     #3a8c6e;
  --rb-shadow-sm:   0 1px 3px rgba(26,26,46,.08);
  --rb-shadow-md:   0 4px 16px rgba(26,26,46,.10);
  --rb-shadow-lg:   0 12px 40px rgba(26,26,46,.14);
  --rb-radius:      10px;
  --rb-radius-sm:   6px;

  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--rb-ink);
  background: var(--rb-paper);
  border-radius: var(--rb-radius);
  overflow: hidden;
  box-shadow: var(--rb-shadow-lg);
}

/* ── HEADER ── */
.rb-wrap .rb-header {
  background: var(--rb-ink);
  color: #fff;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.rb-wrap .rb-header-logo { display: flex; align-items: center; gap: 10px; }
.rb-wrap .logo-icon {
  width: 34px; height: 34px;
  background: var(--rb-accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.rb-wrap .rb-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -.02em;
  color: #fff;
  margin: 0;
  border: none;
  padding: 0;
}
.rb-wrap .rb-title span { color: var(--rb-accent); }
.rb-wrap .rb-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── BUTTONS ── */
.rb-wrap .rb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--rb-radius-sm);
  border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500;
  transition: all .18s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}
.rb-wrap .rb-btn-primary  { background: var(--rb-accent); color: #fff; }
.rb-wrap .rb-btn-primary:hover { background: var(--rb-accent-dk); transform: translateY(-1px); box-shadow: var(--rb-shadow-sm); color: #fff; }
.rb-wrap .rb-btn-secondary { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.rb-wrap .rb-btn-secondary:hover { background: rgba(255,255,255,.18); color: #fff; }
.rb-wrap .rb-btn-ghost { background: transparent; color: var(--rb-ink-soft); border: 1.5px solid var(--rb-border); }
.rb-wrap .rb-btn-ghost:hover { background: var(--rb-accent-lt); color: var(--rb-accent); border-color: var(--rb-accent); }
.rb-wrap .rb-btn-add {
  background: var(--rb-accent-lt); color: var(--rb-accent);
  border: 1.5px dashed var(--rb-accent);
  font-size: 13px; padding: 7px 14px;
  width: 100%; justify-content: center;
  margin-top: 8px;
}
.rb-wrap .rb-btn-add:hover { background: var(--rb-accent); color: #fff; }
.rb-wrap .rb-btn svg { flex-shrink: 0; }

/* ── APP LAYOUT ── */
.rb-wrap .rb-app {
  display: grid;
  grid-template-columns: 400px 1fr;
  height: 780px;
  overflow: hidden;
}

/* ── FORM PANEL ── */
.rb-wrap .rb-form-panel {
  background: var(--rb-surface);
  border-right: 1px solid var(--rb-border);
  overflow-y: auto;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}
.rb-wrap .rb-form-panel::-webkit-scrollbar { width: 5px; }
.rb-wrap .rb-form-panel::-webkit-scrollbar-thumb { background: var(--rb-border); border-radius: 10px; }

/* ── STEP NAV ── */
.rb-wrap .rb-steps {
  display: flex;
  border-bottom: 1px solid var(--rb-border);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.rb-wrap .rb-steps::-webkit-scrollbar { display: none; }
.rb-wrap .rb-step-btn {
  flex: 1; min-width: 68px;
  padding: 11px 6px 9px;
  border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 500; color: var(--rb-ink-muted);
  border-bottom: 2px solid transparent;
  transition: all .18s ease;
}
.rb-wrap .rb-step-btn.active { color: var(--rb-accent); border-bottom-color: var(--rb-accent); }
.rb-wrap .rb-step-btn .step-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--rb-paper); border: 2px solid var(--rb-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  transition: all .18s ease;
}
.rb-wrap .rb-step-btn.active .step-dot { background: var(--rb-accent); border-color: var(--rb-accent); color: #fff; }
.rb-wrap .rb-step-btn.done .step-dot  { background: var(--rb-success); border-color: var(--rb-success); color: #fff; }
.rb-wrap .rb-step-btn.done { color: var(--rb-success); }

/* ── FORM SECTIONS ── */
.rb-wrap .rb-section { display: none; padding: 22px 24px; flex: 1; animation: rbFadeSlide .25s ease; }
.rb-wrap .rb-section.active { display: block; }
@keyframes rbFadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rb-wrap .rb-section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem; font-weight: 400;
  color: var(--rb-ink); margin-bottom: 3px;
  display: flex; align-items: center; gap: 9px;
}
.rb-wrap .rb-section-title .section-icon {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--rb-accent-lt); color: var(--rb-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.rb-wrap .rb-section-desc { font-size: 12.5px; color: var(--rb-ink-muted); margin-bottom: 18px; padding-left: 39px; }

/* ── FORM FIELDS ── */
.rb-wrap .rb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.rb-wrap .rb-form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.rb-wrap .rb-form-group label {
  font-size: 12px; font-weight: 600; color: var(--rb-ink-soft);
  letter-spacing: .03em; text-transform: uppercase;
}
.rb-wrap .rb-form-group input,
.rb-wrap .rb-form-group textarea {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--rb-border);
  border-radius: var(--rb-radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px; color: var(--rb-ink);
  background: var(--rb-surface);
  transition: border-color .18s, box-shadow .18s;
  outline: none;
  -webkit-appearance: none;
}
.rb-wrap .rb-form-group input:focus,
.rb-wrap .rb-form-group textarea:focus {
  border-color: var(--rb-accent);
  box-shadow: 0 0 0 3px rgba(200,119,58,.12);
}
.rb-wrap .rb-form-group input::placeholder,
.rb-wrap .rb-form-group textarea::placeholder { color: var(--rb-ink-muted); }
.rb-wrap .rb-form-group textarea { resize: vertical; min-height: 85px; }

/* ── ENTRY CARDS ── */
.rb-wrap .rb-entry-card {
  background: var(--rb-paper); border: 1.5px solid var(--rb-border);
  border-radius: var(--rb-radius); padding: 14px;
  margin-bottom: 12px; transition: border-color .18s;
}
.rb-wrap .rb-entry-card:hover { border-color: var(--rb-accent); }
.rb-wrap .rb-entry-card-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.rb-wrap .rb-entry-label { font-size: 11px; font-weight: 700; color: var(--rb-accent); text-transform: uppercase; letter-spacing: .05em; }
.rb-wrap .rb-btn-remove {
  background: none; border: none; cursor: pointer; color: var(--rb-ink-muted);
  font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 4px; transition: all .15s;
}
.rb-wrap .rb-btn-remove:hover { background: #fee2e2; color: #b91c1c; }

/* ── FORM FOOTER ── */
.rb-wrap .rb-form-footer {
  padding: 14px 24px; border-top: 1px solid var(--rb-border);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--rb-surface); flex-shrink: 0;
  position: sticky; bottom: 0;
}
.rb-wrap .rb-progress { font-size: 12px; color: var(--rb-ink-muted); }
.rb-wrap .rb-progress span { color: var(--rb-accent); font-weight: 600; }

/* ── PREVIEW PANEL ── */
.rb-wrap .rb-preview-panel {
  background: #d4d0cc;
  overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 18px; gap: 14px;
}
.rb-wrap .rb-preview-panel::-webkit-scrollbar { width: 5px; }
.rb-wrap .rb-preview-panel::-webkit-scrollbar-thumb { background: #b8b4b0; border-radius: 10px; }
.rb-wrap .rb-preview-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 660px;
  background: var(--rb-ink); border-radius: var(--rb-radius);
  padding: 9px 16px; color: rgba(255,255,255,.7); font-size: 12px;
}

/* ── RESUME DOCUMENT ── */
#rb-resume-preview {
  width: 660px;
  min-height: 934px;
  background: #fff;
  box-shadow: var(--rb-shadow-lg);
  border-radius: 2px;
  padding: 48px 52px;
  font-family: 'DM Sans', sans-serif;
  color: #1a1a2e;
}
.rb-wrap .rb-resume-header {
  border-bottom: 3px solid #1a1a2e;
  padding-bottom: 18px; margin-bottom: 20px;
}
.rb-wrap .rb-resume-name {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem; font-weight: 400;
  line-height: 1.1; color: #1a1a2e; letter-spacing: -.02em;
}
.rb-wrap .rb-name-placeholder { color: #ccc; }
.rb-wrap .rb-resume-contact {
  display: flex; flex-wrap: wrap; gap: 5px 18px;
  margin-top: 9px; font-size: 12.5px; color: #4a4a6a;
}
.rb-wrap .rb-contact-item { display: flex; align-items: center; gap: 5px; }
.rb-wrap .rb-contact-item svg { color: #c8773a; flex-shrink: 0; }
.rb-wrap .rb-resume-body { display: grid; grid-template-columns: 1fr 200px; gap: 28px; }
.rb-wrap .rb-resume-section { margin-bottom: 20px; }
.rb-wrap .rb-resume-section-title {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: #c8773a; border-bottom: 1.5px solid #f0ede8;
  padding-bottom: 5px; margin-bottom: 10px;
}
.rb-wrap .rb-resume-summary { font-size: 13px; line-height: 1.7; color: #3a3a5a; }
.rb-wrap .rb-resume-entry { margin-bottom: 13px; }
.rb-wrap .rb-entry-title { font-size: 14px; font-weight: 600; color: #1a1a2e; }
.rb-wrap .rb-entry-subtitle { font-size: 12.5px; color: #c8773a; font-weight: 500; }
.rb-wrap .rb-entry-date { font-size: 11.5px; color: #8888aa; margin-top: 1px; }
.rb-wrap .rb-entry-desc { font-size: 12.5px; color: #4a4a6a; margin-top: 5px; line-height: 1.6; }
.rb-wrap .rb-skills-list { display: flex; flex-wrap: wrap; gap: 5px; }
.rb-wrap .rb-skill-tag {
  background: #f5ede4; color: #a85e28;
  font-size: 11.5px; font-weight: 500;
  padding: 3px 9px; border-radius: 20px;
  border: 1px solid #e8d4c2;
}
.rb-wrap .rb-langs-list { display: flex; flex-direction: column; gap: 5px; }
.rb-wrap .rb-lang-item { font-size: 12.5px; color: #4a4a6a; }
.rb-wrap .rb-placeholder { color: #d0cfc8; font-style: italic; font-size: 12.5px; }

/* ── TOAST ── */
.rb-wrap .rb-toast {
  position: fixed; bottom: 22px; right: 22px;
  background: var(--rb-ink); color: #fff;
  padding: 11px 18px; border-radius: var(--rb-radius-sm);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--rb-shadow-lg);
  transform: translateY(80px); opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 99999; display: flex; align-items: center; gap: 7px;
  pointer-events: none;
}
.rb-wrap .rb-toast.rb-toast-show { transform: translateY(0); opacity: 1; }
.rb-wrap .rb-toast.rb-toast-success { background: var(--rb-success); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .rb-wrap .rb-app { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .rb-wrap .rb-form-panel { height: auto; overflow-y: visible; }
  .rb-wrap .rb-preview-panel { padding: 16px 10px; }
  #rb-resume-preview { width: 100%; min-width: 300px; padding: 28px 20px; }
  .rb-wrap .rb-resume-body { grid-template-columns: 1fr; gap: 0; }
  .rb-wrap .rb-resume-name { font-size: 1.7rem; }
  .rb-wrap .rb-form-row { grid-template-columns: 1fr; gap: 0; }
  .rb-wrap .rb-preview-toolbar { max-width: 100%; }
  .rb-wrap .rb-btn-label { display: none; }
  .rb-wrap .rb-header { padding: 12px 16px; }
}

@media print {
  body > * { display: none !important; }
  #rb-resume-preview { display: block !important; position: static !important; width: 100% !important; box-shadow: none !important; padding: 0 !important; }
}
