/* ==========================================================================
   REAL RESUME — BUILDER INTERFACE STYLING
   ========================================================================== */

.builder-layout {
  display: grid;
  grid-template-columns: 520px 1fr;
  min-height: calc(100vh - 72px);
  background-color: var(--bg-main);
  position: relative;
}

/* --- Left Editor Panel --- */
.editor-panel {
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  position: sticky;
  top: 72px;
  overflow: hidden;
  z-index: 10;
}

.editor-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-progress-bar-wrap {
  width: 100%;
  height: 4px;
  background-color: var(--border-subtle);
  position: relative;
}

.editor-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  transition: width var(--transition-normal);
}

.editor-stepper-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  overflow-x: auto;
  scrollbar-width: none;
}

.editor-stepper-nav::-webkit-scrollbar {
  display: none;
}

.step-pill {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.step-pill:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-subtle);
}

.step-pill.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.step-pill.completed {
  color: var(--accent-emerald);
}

.editor-content-scroll {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.section-group-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  transition: border-color var(--transition-fast);
}

.section-group-card:hover {
  border-color: var(--border-medium);
}

.section-group-card.collapsed .card-collapsible-content {
  display: none;
}

.item-card-row {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.85rem;
  position: relative;
}

.item-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.item-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.item-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* --- AI Trigger Button Badge --- */
.ai-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.12) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-indigo);
  font-size: 0.775rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.ai-trigger-btn:hover {
  background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-cyan) 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-1px);
}

/* --- Action Verb Suggester Pill Box --- */
.action-verbs-box {
  background-color: var(--bg-surface-subtle);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.action-verb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.verb-pill {
  font-size: 0.725rem;
  padding: 0.2rem 0.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.verb-pill:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* --- Right Preview Workspace --- */
.preview-workspace {
  background-color: var(--bg-main);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  position: relative;
  overflow: hidden;
}

.preview-toolbar {
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 5;
}

.preview-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.toolbar-pill-btn:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

/* --- Zoom Controls --- */
.zoom-control {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.zoom-btn {
  padding: 0.45rem 0.65rem;
  color: var(--text-secondary);
  transition: background-color var(--transition-fast);
}

.zoom-btn:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-primary);
}

.zoom-level-text {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 0.5rem;
  color: var(--text-muted);
  user-select: none;
}

/* --- Resume Canvas Viewport --- */
.resume-viewport {
  flex: 1;
  overflow: auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: #0b111e;
  position: relative;
}

[data-theme="light"] .resume-viewport {
  background-color: #e2e8f0;
}

.resume-paper-container {
  transform-origin: top center;
  transition: transform var(--transition-fast);
}

/* --- Actual Resume Document (A4 standard) --- */
.resume-paper {
  width: 210mm;
  min-height: 297mm;
  background-color: #ffffff;
  color: #1e293b;
  box-shadow: var(--paper-shadow);
  border-radius: 2px;
  position: relative;
  margin: 0 auto;
  box-sizing: border-box;
}

/* --- Page Break Simulator Indicator --- */
.page-break-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, #ef4444, #ef4444 6px, transparent 6px, transparent 12px);
  z-index: 20;
  pointer-events: none;
}

.page-break-label {
  position: absolute;
  right: 12px;
  top: -18px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Quick Color Palette Swatches --- */
.color-swatches {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.color-swatch:hover, .color-swatch.active {
  transform: scale(1.15);
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--primary);
}

/* --- Mobile View Toggle Tabs --- */
.mobile-view-tabs {
  display: none;
}

@media (max-width: 1024px) {
  .builder-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .editor-panel {
    height: auto;
    position: static;
    border-right: none;
  }
  .preview-workspace {
    height: 700px;
  }
  .mobile-view-tabs {
    display: flex;
    position: sticky;
    top: 72px;
    z-index: 100;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
  }
  .mobile-tab-btn {
    flex: 1;
    padding: 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    border-bottom: 2px solid transparent;
  }
  .mobile-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: var(--primary-light);
  }
}

/* --- Persistent Floating Download Action Bar --- */
.floating-download-bar {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 1000;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  padding: 4px;
  gap: 4px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.floating-download-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.55);
}

.floating-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.floating-menu-btn {
  padding: 0.65rem 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

