@import url("./candidate-tokens.css");

/* ==========================================================================
   GLOBAL BRANDING DESIGN SETUP
   ========================================================================== */
:root {
  --canvas-bg: var(--ph-canvas);
  --surface-panel: var(--ph-surface);
  --brand-primary: var(--ph-brand-navy);       
  --brand-accent: var(--ph-brand-blue);        
  --brand-accent-glow: var(--ph-brand-blue-glow);
  --success-emerald: var(--ph-success);
  --crimson-signal: var(--ph-error);      
  --crimson-bg: var(--ph-error-bg);
  
  --ink-primary: var(--ph-text-primary);
  --ink-secondary: var(--ph-text-secondary);
  --ink-muted: var(--ph-text-muted);
  
  --structural-border: var(--ph-border-medium);
  --radius-premium: var(--ph-radius-lg);
  --radius-component: var(--ph-radius-sm);
  --transition-fluid: var(--ph-transition-fast);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--canvas-bg);
  color: var(--ink-primary);
  min-height: 100vh;
  display: block;
  padding: 12px 14px;
}

/* ==========================================================================
   CONTAINER & PROGRESS STRUCTURES (Enterprise SaaS Candidate Experience)
   ========================================================================== */
.wizard-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--surface-panel);
  border-radius: 16px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 20px 40px -10px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.wizard-header {
  padding: 16px 28px 12px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.brand-badge svg {
  color: #2563eb;
  flex-shrink: 0;
}

.wizard-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin-bottom: 3px;
  line-height: 1.25;
}

.wizard-header p {
  color: #475569;
  font-size: 13.5px;
  line-height: 1.45;
  max-width: 820px;
}

.progress-section {
  padding: 10px 28px 8px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

/* Visual Horizontal Stepper */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}

.wizard-stepper::-webkit-scrollbar {
  display: none;
}

.wizard-step-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: default;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.step-circle,
.step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.step-label,
.step-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.wizard-step-connector {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 4px;
  min-width: 12px;
  transition: all 0.2s ease;
}

/* Active Step */
.wizard-step-node.active {
  background: #eff6ff;
  border-color: #bfdbfe;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.wizard-step-node.active .step-circle,
.wizard-step-node.active .step-icon {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.wizard-step-node.active .step-label,
.wizard-step-node.active .step-title {
  color: #1e3a8a;
  font-weight: 700;
}

/* Completed Step */
.wizard-step-node.completed .step-circle,
.wizard-step-node.completed .step-icon {
  background: #10b981;
  border-color: #10b981;
  color: transparent !important;
  position: relative;
}

.wizard-step-node.completed .step-circle::after,
.wizard-step-node.completed .step-icon::after {
  content: "";
  position: absolute;
  top: 45%;
  left: 50%;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.wizard-step-node.completed .step-label,
.wizard-step-node.completed .step-title {
  color: #0f172a;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 3.5px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 7px;
}

.progress-fill {
  width: 16.666%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

#stepCounter, #stepProgressPercentage {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.profile-completion {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-label {
  font-size: 12px;
  color: #64748b;
}

/* ==========================================================================
   CV-FIRST ONBOARDING HERO STYLES (Phase 3 Enterprise Redesign)
   ========================================================================== */
.cv-hero-intro {
  margin-bottom: 10px;
}

.cv-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2.5px 8px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cv-hero-badge svg {
  color: #2563eb;
  flex-shrink: 0;
}

.cv-hero-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
  line-height: 1.25;
}

.cv-hero-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  max-width: 820px;
}

/* 3-Step Guided Journey Cards */
.cv-steps-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.cv-guide-card,
.cv-guide-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.cv-guide-card:hover,
.cv-guide-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.cv-guide-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.cv-guide-content,
.cv-guide-text {
  display: flex;
  flex-direction: column;
}

.cv-guide-content strong,
.cv-guide-text strong {
  font-size: 12px;
  color: #0f172a;
  font-weight: 600;
  margin-bottom: 1px;
}

.cv-guide-content span,
.cv-guide-text span {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

/* Hero Dropzone Experience */
#cvDropzone,
.integrity-dropzone,
.dropzone {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

#cvDropzone:hover,
#cvDropzone.dragover,
.integrity-dropzone:hover,
.integrity-dropzone.dragover,
.dropzone:hover,
.dropzone.dragover {
  border-color: #2563eb;
  background: #f0f7ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 12px 28px -6px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.dropzone-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #dbeafe;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
  transition: all 0.2s ease;
}

#cvDropzone:hover .dropzone-icon,
.integrity-dropzone:hover .dropzone-icon,
.dropzone:hover .dropzone-icon {
  transform: scale(1.06);
  border-color: #93c5fd;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
}

.dropzone-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: block;
  margin-bottom: 3px;
}

.dropzone-text span {
  font-size: 12.5px;
  color: #64748b;
}

.browse-pill {
  display: inline-block;
  padding: 2px 10px;
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  border-radius: 5px;
  font-weight: 600;
  color: #2563eb;
  font-size: 11.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-left: 6px;
  transition: all 0.15s ease;
}

#cvDropzone:hover .browse-pill,
.integrity-dropzone:hover .browse-pill,
.dropzone:hover .browse-pill {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.dropzone-formats {
  margin-top: 6px;
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.format-tag {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  padding: 1.5px 7px;
  font-weight: 700;
  font-size: 10.5px;
  color: #1e40af;
}

.dropzone-privacy {
  margin-top: 6px;
  font-size: 10.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* File Selected Box */
.cv-file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.cv-file-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
}

.file-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
}

.remove-file-btn {
  background: #ffffff;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.remove-file-btn:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

/* AI Pulse Bar & Extraction States */
.cv-extraction-status,
.cv-upload-status {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1.5px solid #93c5fd;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.ai-pulse-bar {
  width: 100%;
  height: 3.5px;
  background: #bfdbfe;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}

.ai-pulse-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  border-radius: 5px;
  animation: pulseBar 1.5s infinite ease-in-out;
}

@keyframes pulseBar {
  0% { left: -40%; width: 30%; }
  50% { width: 50%; }
  100% { left: 100%; width: 30%; }
}

.ai-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-status-copy strong {
  display: block;
  font-size: 13px;
  color: #1e3a8a;
  font-weight: 700;
  margin-bottom: 1px;
}

.ai-status-copy .status-text {
  font-size: 12px;
  color: #3b82f6;
}

.status-indicator.processing {
  width: 18px;
  height: 18px;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Extraction Result Card */
.cv-extraction-result {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #065f46;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.result-header svg {
  color: #059669;
  flex-shrink: 0;
}

.result-note {
  font-size: 12px;
  color: #047857;
  margin-bottom: 6px;
  line-height: 1.4;
}

.extracted-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.extracted-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #86efac;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #065f46;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

.chip-check-svg {
  flex-shrink: 0;
}

/* Extraction Error Card */
.cv-extraction-error {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 8px;
}

.error-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #92400e;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.error-header svg {
  color: #d97706;
  flex-shrink: 0;
}

.error-note {
  font-size: 12.5px;
  color: #b45309;
  line-height: 1.45;
}

/* ==========================================================================
   FORM RESPONSIVE GRID LAYOUTS & FIELD SUBHEADINGS
   ========================================================================== */
form {
  padding: 16px 28px;
}

.step {
  display: none;
}

.step.active-step {
  display: block;
  animation: stepEntrance 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-intro {
  margin-bottom: 12px;
  border-left: 3px solid var(--brand-accent);
  padding-left: 10px;
}

.section-intro h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: -0.015em;
  margin: 0;
}

.section-intro p {
  font-size: 13px;
  color: var(--ink-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

/* Logical Field Group Sub-Headings */
.form-subheading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  margin-bottom: 2px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ph-border-light);
}

.form-subheading h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ph-text-muted);
  margin: 0;
}

.form-subheading .subheading-icon {
  font-size: 15px;
  color: var(--ph-brand-blue);
}

/* AI Prefilled Visual Badge */
.ai-extracted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ph-brand-blue-subtle);
  color: var(--ph-brand-blue);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--ph-radius-full);
  border: 1px solid #bfdbfe;
  margin-left: 8px;
  letter-spacing: 0.2px;
  user-select: none;
  animation: badgeFadeIn 0.25s ease-out;
}

@keyframes badgeFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.ai-prefilled {
  border-left: 3px solid var(--ph-brand-blue) !important;
  background-color: #fcfdfe !important;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-bottom: 0;
}
.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 3px;
}
label .required,
.required {
  color: #ef4444;
  font-weight: 700;
}
.full-width {
  grid-column: 1 / -1;
}

/* Highly Accessible Dynamic Date Grids */
.date-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.2fr;
  gap: 8px;
}

.secondary-date-grid {
  grid-template-columns: 1.5fr 1.2fr !important;
}

.input-addon-group {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   FIX 1: Added input[type="password"] and input[type="file"] to selector
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],  /* <-- FIXED: was missing, caused unstyled password fields */
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink-primary);
  border: 1px solid var(--structural-border);
  border-radius: var(--radius-component);
  transition: var(--transition-fluid);
  background-color: #ffffff;
  font-family: inherit;
}

/* FIX 2: File input basic styling (separate rule — padding looks wrong on file inputs) */
input[type="file"] {
  width: 100%;
  font-size: 14px;
  color: var(--ink-secondary);
  border: 1px solid var(--structural-border);
  border-radius: var(--radius-component);
  background-color: #ffffff;
  padding: 7px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-fluid);
}

input[type="file"]::file-selector-button {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  margin-right: 12px;
  border: 1px solid var(--structural-border);
  border-radius: var(--radius-component);
  background-color: #f1f5f9;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: var(--transition-fluid);
}

input[type="file"]::file-selector-button:hover {
  background-color: #e2e8f0;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}
input[readonly],
textarea[readonly] {
  background: #f8fafc;
}
input:hover,
select:hover,
textarea:hover {
  border-color: #94a3b8;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow:
0 0 0 1px var(--brand-accent),
0 0 0 4px var(--brand-accent-glow);
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}
textarea {
  min-height: 60px;
  resize: vertical;
}

/* ==========================================================================
   ATS COMPLIANT CONTAINERS
   ========================================================================== */
.section-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.current-tenure-card {
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  padding: 12px 14px;
  border-radius: var(--radius-component);
  margin-bottom: 10px;
  transition: all .2s ease;
}
.current-tenure-card:hover {
  box-shadow:
    0 4px 10px rgba(0,0,0,.04);
}

.tenure-card-header {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.section-description {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 6px;
  line-height: 1.35;
}

.employment-history {
  margin-top: 10px;
  padding: 12px 14px;
  background-color: #f8fafc;
  border-radius: var(--radius-component);
  border: 1px solid #e2e8f0;
}

.history-meta-header {
  margin-bottom: 6px;
}

.history-meta-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-primary);
  margin: 0;
}

.history-meta-header p {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 1px;
}

.experience-card {
  background: var(--surface-panel);
  padding: 12px 14px;
  border-radius: var(--radius-component);
  border: 1px solid #e2e8f0;
  margin-top: 8px;
  transition: all .2s ease;
}

.experience-card:hover {
  border-color: #94a3b8;
  box-shadow:
    0 4px 10px rgba(0,0,0,.04);
}

.employment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 4px;
}

.employment-card-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-accent);
  letter-spacing: .02em;
  margin: 0;
}

.field-helper {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 3px;
  line-height: 1.35;
}

/* ==========================================================================
   INPUT RUNTIME RUNNING ERROR ACCENTS
   ========================================================================== */
.field.error-state label {
  color: var(--crimson-signal);
}

.field.error-state input,
.field.error-state select,
.field.error-state textarea {
  border-color: var(--crimson-signal);
  background-color: var(--crimson-bg);
}

.error-message {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--crimson-signal);
  margin-top: 2px;
  min-height: 0;
  line-height: 1.25;
}

.error-message:empty {
  display: none;
}

/* ==========================================================================
   ACTION CONTROLS
   ========================================================================== */
.wizard-buttons {
  display: flex;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

button {
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: var(--radius-component);
  cursor: pointer;
  transition: var(--transition-fluid);
  border: 1px solid transparent;
}
button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.btn-primary {
  background-color: var(--brand-accent);
  color: #ffffff;
  margin-left: auto;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #ffffff;
  border-color: var(--structural-border);
  color: var(--ink-secondary);
}

.btn-secondary:hover:not(:disabled) {
  background-color: #f8fafc;
  border-color: #94a3b8;
  color: var(--ink-primary);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.add-btn-premium {
  background-color: #ffffff;
  color: var(--brand-accent);
  border: 1px dashed var(--brand-accent);
  width: 100%;
  margin-top: 8px;
  padding: 7px;
}

.add-btn-premium:hover {
  background-color: var(--brand-accent-glow);
}

/* Remove button for Past Jobs */
.removeEmployment {
  background-color: #fef2f2;
  color: var(--crimson-signal);
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid #fca5a5;
}

.removeEmployment:hover {
  background-color: var(--crimson-signal);
  color: #ffffff;
  border-color: var(--crimson-signal);
}

/* FIX 3: Remove button for Languages — was completely missing from CSS */
.removeLanguage {
  background-color: #fef2f2;
  color: var(--crimson-signal);
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid #fca5a5;
}

.removeLanguage:hover {
  background-color: var(--crimson-signal);
  color: #ffffff;
  border-color: var(--crimson-signal);
}

@media (max-width: 768px) {
  body { padding: 8px 6px; }
  .cv-steps-guide { grid-template-columns: 1fr; gap: 6px; }
  .form-grid, .date-dropdown-grid { grid-template-columns: 1fr; gap: 10px; }
  .secondary-date-grid { grid-template-columns: 1fr !important; }
  .wizard-buttons { flex-direction: column-reverse; gap: 6px; margin-top: 10px; padding-top: 8px; }
  button { width: 100%; }
  form { padding: 12px 10px; }
  .wizard-header { padding: 12px 12px; }
  .progress-section { padding: 8px 10px; }
  #cvDropzone, .integrity-dropzone, .dropzone { padding: 14px 10px; }
}

@keyframes stepEntrance {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TERMS & PRIVACY MODAL
   ========================================================================== */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-premium);

    border: 1px solid #e2e8f0;
transition: var(--transition-fluid);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.modal-header { padding: 20px 24px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; color: var(--brand-primary); }
.close-modal { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--ink-muted); padding: 0; }
.modal-body { padding: 24px; overflow-y: auto; flex-grow: 1; font-size: 14px; line-height: 1.6; color: var(--ink-secondary); }
.modal-body h4 { color: var(--ink-primary); margin-bottom: 8px; font-size: 15px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; background: #f8fafc; border-radius: 0 0 var(--radius-premium) var(--radius-premium); }
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

::selection {
  background: rgba(37, 99, 235, 0.15);
}

a {
  color: var(--brand-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {

  * {
    animation: none !important;
    transition: none !important;
  }

}

/* ==========================================================================
   CUSTOM SEARCHABLE SELECT PRESENTATION LAYER
   ========================================================================== */
.custom-select-wrapper {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.custom-select-wrapper.wrapper-country-code {
  width: 40%;
  flex-shrink: 0;
}

.custom-select-wrapper.wrapper-country,
.custom-select-wrapper.wrapper-state,
.custom-select-wrapper.wrapper-city {
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  height: 36px;
  padding: 0 6px 0 8px;
  border: 1px solid #d5ddea;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12.5px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

.custom-select-trigger:disabled,
.custom-select-wrapper.is-disabled .custom-select-trigger {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.75;
}

.custom-select-trigger:disabled .select-chevron-svg,
.custom-select-wrapper.is-disabled .select-chevron-svg {
  color: #94a3b8;
}

.field.error-state .custom-select-trigger {
  border-color: var(--crimson-signal);
  background-color: var(--crimson-bg);
}

.custom-select-trigger:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
}

.custom-select-wrapper.is-open .custom-select-trigger,
.custom-select-trigger:focus,
.custom-select-trigger:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
  outline: none;
}

.custom-select-trigger .trigger-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
  font-weight: 500;
}

.custom-select-trigger .material-symbols-outlined,
.custom-select-trigger .select-chevron-svg {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: #64748b;
  transition: transform 0.18s ease;
  flex-shrink: 0;
  margin-left: 2px;
}

.custom-select-wrapper.is-open .custom-select-trigger .material-symbols-outlined,
.custom-select-wrapper.is-open .custom-select-trigger .select-chevron-svg {
  transform: rotate(180deg);
  color: #2563eb;
}

.custom-select-menu {
  position: fixed;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 28px -5px rgba(15, 23, 42, 0.16), 0 8px 12px -6px rgba(15, 23, 42, 0.08);
  padding: 4px;
  max-height: 250px;
  overflow-y: auto;
  display: none;
  margin: 0;
  box-sizing: border-box;
}

.custom-select-wrapper.is-open .custom-select-menu,
.custom-select-menu.is-open {
  display: block;
}

.custom-select-search {
  padding: 4px;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
}

.custom-select-search input {
  width: 100%;
  box-sizing: border-box;
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

.custom-select-search input:focus {
  border-color: #2563eb;
  background: #ffffff;
}

.custom-select-empty {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #64748b;
  padding: 6px 10px;
}

.custom-select-option.is-filtered {
  display: none;
}

.custom-select-option {
  min-height: 32px;
  border-radius: 6px;
  font-size: 12px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: #0f172a;
  transition: background 0.12s ease;
  word-break: break-word;
  line-height: 1.3;
}

.custom-select-option:hover {
  background: #f1f5f9;
}

.custom-select-option.is-highlighted {
  background: #f1f5f9;
}

.custom-select-option.is-selected {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.custom-select-option .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #2563eb;
  flex-shrink: 0;
}

.custom-select-option .check-icon svg {
  color: #2563eb;
}

