/* ── CV Generator Modal ─────────────────────────────────────────────────────── */

.cv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}
.cv-overlay.open { display: flex; }

.cv-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 760px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
  margin: auto;
}

.cv-modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.cv-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #1C2B3A;
  margin-bottom: 4px;
}
.cv-modal-subtitle {
  font-size: 14px;
  color: #6B7A8D;
}
.cv-modal-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: #6B7A8D;
  padding: 4px;
  line-height: 1;
}
.cv-modal-close:hover { color: #1C2B3A; }

.cv-modal-body {
  padding: 28px 32px;
  max-height: 70vh;
  overflow-y: auto;
}

.cv-modal-footer {
  padding: 20px 32px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Buttons ── */
.cv-btn-cancel {
  background: none;
  border: none;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #6B7A8D;
  cursor: pointer;
  padding: 0;
}
.cv-btn-cancel:hover { color: #1C2B3A; }

.cv-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #0FBDA1;
  border: none;
  padding: 13px 24px;
  border-radius: 100px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.cv-btn-primary:hover { opacity: 0.88; }
.cv-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.cv-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1C2B3A;
  background: none;
  border: 1.5px solid #D1D9E0;
  padding: 11px 20px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.15s;
  text-decoration: none;
}
.cv-btn-secondary:hover { border-color: #1C2B3A; }

/* ── Step 1 — Title ── */
.cv-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1C2B3A;
  margin-bottom: 4px;
}
.cv-section-sub {
  font-size: 13px;
  color: #6B7A8D;
  margin-bottom: 20px;
}

.cv-title-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }

.cv-title-card {
  padding: 16px 20px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #1C2B3A;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cv-title-card:hover { border-color: #0FBDA1; }
.cv-title-card.selected {
  border-color: #0FBDA1;
  background: #F0FDF9;
  color: #0FBDA1;
  font-weight: 600;
}
.cv-title-card .cv-check { display: none; color: #0FBDA1; }
.cv-title-card.selected .cv-check { display: block; }

.cv-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #94A3B8;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.cv-divider::before, .cv-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E2E8F0;
}

.cv-custom-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.15s;
}
.cv-custom-input-wrap:focus-within { border-color: #0FBDA1; }
.cv-custom-input-wrap svg { color: #6B7A8D; flex-shrink: 0; }
.cv-custom-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  color: #1C2B3A;
  background: transparent;
}
.cv-custom-input::placeholder { color: #94A3B8; }

/* ── Step 2 — Skills ── */
.cv-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.cv-search-wrap:focus-within { border-color: #0FBDA1; }
.cv-search-wrap svg { color: #6B7A8D; flex-shrink: 0; }
.cv-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  color: #1C2B3A;
  background: transparent;
}
.cv-search-input::placeholder { color: #94A3B8; }

.cv-selected-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #F0FDF9;
  border: 1px solid #C6F6EE;
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #0A9882;
}
.cv-selected-bar.visible { display: flex; }
.cv-clear-all {
  background: none;
  border: none;
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #0A9882;
  cursor: pointer;
  padding: 0;
}

.cv-skills-label {
  font-size: 14px;
  font-weight: 700;
  color: #1C2B3A;
  margin-bottom: 14px;
}

.cv-skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.cv-skill-chip {
  padding: 14px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1C2B3A;
  background: #fff;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s, background 0.15s;
}
.cv-skill-chip:hover { border-color: #0FBDA1; }
.cv-skill-chip.selected {
  border-color: #38A169;
  background: #F0FFF4;
  color: #276749;
  font-weight: 600;
}
.cv-skill-chip .cv-skill-check { display: none; color: #38A169; }
.cv-skill-chip.selected .cv-skill-check { display: block; }

.cv-custom-skill-section { margin-top: 8px; }
.cv-custom-skill-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.cv-custom-skill-input {
  flex: 1;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  color: #1C2B3A;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 11px 16px;
  outline: none;
  transition: border-color 0.15s;
}
.cv-custom-skill-input:focus { border-color: #0FBDA1; }
.cv-custom-skill-input::placeholder { color: #94A3B8; }
.cv-add-skill-btn {
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #0FBDA1;
  border: none;
  padding: 11px 20px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.cv-add-skill-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cv-add-skill-btn:not(:disabled):hover { opacity: 0.88; }

/* ── Step 3 — Preview ── */
.cv-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #6B7A8D;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
}
.cv-back-btn:hover { color: #1C2B3A; }

/* ── CV Document (preview + print) ── */
.cv-doc {
  font-family: 'Figtree', Georgia, serif;
  color: #1C2B3A;
  line-height: 1.5;
}

.cv-doc-name {
  font-size: 26px;
  font-weight: 800;
  color: #1C2B3A;
  margin-bottom: 4px;
}
.cv-doc-role {
  font-size: 16px;
  font-weight: 600;
  color: #0FBDA1;
  margin-bottom: 10px;
}
.cv-doc-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 13px;
  color: #4A5568;
  margin-bottom: 20px;
}
.cv-doc-contacts span { display: flex; align-items: center; gap: 5px; }
.cv-doc-contacts a { color: #0FBDA1; text-decoration: none; }

.cv-verified-badge {
  background: #F0FDF9;
  border: 1px solid #C6F6EE;
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cv-verified-badge-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0A9882;
  flex-shrink: 0;
}
.cv-verified-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.cv-verified-stat { font-size: 12px; color: #4A5568; }
.cv-verified-stat strong { display: block; font-size: 18px; font-weight: 800; color: #1C2B3A; }
.cv-verified-stat.highlight strong { color: #0FBDA1; }

.cv-doc-section { margin-bottom: 22px; }
.cv-doc-section-title {
  font-size: 15px;
  font-weight: 800;
  color: #1C2B3A;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #E2E8F0;
}

.cv-doc-summary {
  font-size: 14px;
  color: #374151;
  line-height: 1.65;
}

.cv-skills-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}
.cv-skill-bullet {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}
.cv-skill-bullet::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #0FBDA1;
  border-radius: 50%;
  flex-shrink: 0;
}

.cv-work-item { margin-bottom: 18px; }
.cv-work-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
  flex-wrap: wrap;
  gap: 4px;
}
.cv-work-title { font-size: 15px; font-weight: 700; color: #1C2B3A; }
.cv-work-date  { font-size: 13px; color: #6B7A8D; white-space: nowrap; }
.cv-work-company { font-size: 14px; font-weight: 600; color: #0FBDA1; margin-bottom: 8px; }
.cv-work-bullets { padding-left: 0; list-style: none; margin: 0; }
.cv-work-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  margin-bottom: 4px;
  line-height: 1.55;
}
.cv-work-bullets li::before {
  content: '';
  width: 5px;
  height: 5px;
  background: #0FBDA1;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.cv-spec-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-spec-pill {
  background: #F0FDF9;
  border: 1px solid #C6F6EE;
  color: #0A9882;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
}

.cv-doc-footer {
  text-align: center;
  font-size: 12px;
  color: #94A3B8;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
}

/* ── Print styles ── */
@media print {
  body > *:not(#cvPrintArea) { display: none !important; }
  #cvPrintArea {
    display: block !important;
    position: fixed;
    inset: 0;
    background: #fff;
    padding: 32px 40px;
    z-index: 99999;
  }
  .cv-doc-footer { display: block !important; }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .cv-modal-header, .cv-modal-body, .cv-modal-footer { padding-left: 20px; padding-right: 20px; }
  .cv-skills-grid { grid-template-columns: 1fr; }
  .cv-skills-two-col { grid-template-columns: 1fr; }
  .cv-verified-stats { gap: 16px; }
}
