/* Free CV Builder — AMZ Prints */

.amz-cv-builder .amz-dock,
.amz-cv-builder .float-stack,
.amz-cv-builder .amz-popup,
.amz-cv-builder .amz-cursor,
.amz-cv-builder .site-footer { display: none !important; }

.amz-cv-builder .site-main { padding: 0; }

.cv-portal {
  --cv-accent: #0747a3;
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(255, 109, 0, 0.08), transparent 55%),
    radial-gradient(700px 240px at 100% 0%, rgba(7, 71, 163, 0.1), transparent 50%),
    var(--amz-paper);
  min-height: calc(100vh - var(--header-h, 80px));
}

.cv-portal__bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 1.15rem 1.25rem 1rem;
  border-bottom: 1px solid var(--amz-line);
  background: #fff;
}

.cv-portal__free {
  margin: 0 0 0.2rem;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amz-accent);
}

.cv-portal__bar h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.cv-portal__bar-copy p:last-child {
  margin: 0;
  color: var(--amz-muted);
  max-width: 62ch;
}

.cv-portal__bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.cv-page-pill {
  background: var(--amz-primary-soft);
  color: var(--amz-primary);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
}

.cv-portal__layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  min-height: calc(100vh - 210px);
}

.cv-portal__editor {
  border-right: 1px solid var(--amz-line);
  background: #fff;
  overflow: auto;
  max-height: calc(100vh - 210px);
  padding: 1rem 1rem 3rem;
}

.cv-portal__preview {
  overflow: auto;
  max-height: calc(100vh - 210px);
  padding: 1.1rem;
}

.cv-editor-block {
  border: 1px solid var(--amz-line);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.75rem;
  background: #fff;
}

.cv-editor-block h3 {
  margin: 0;
  font-size: 0.92rem;
}

.cv-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.cv-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amz-primary);
  cursor: pointer;
}
.cv-toggle input { accent-color: var(--amz-accent); }

.cv-field { display: grid; gap: 0.28rem; margin-bottom: 0.55rem; }
.cv-field span { font-size: 0.75rem; font-weight: 700; color: var(--amz-ink); }
.cv-field input,
.cv-field textarea,
.cv-field select {
  width: 100%;
  border: 1px solid var(--amz-line-strong);
  border-radius: 8px;
  padding: 0.48rem 0.6rem;
  font: inherit;
  color: var(--amz-ink);
  background: #fff;
}
.cv-field textarea { min-height: 88px; resize: vertical; }
.cv-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.cv-item {
  border-top: 1px dashed var(--amz-line);
  padding-top: 0.65rem;
  margin-top: 0.55rem;
}
.cv-item__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--amz-muted);
}

.cv-linkish {
  border: 0;
  background: none;
  color: var(--amz-primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.cv-linkish:hover { color: var(--amz-accent); }
.cv-linkish--danger { color: #b91c1c; }

.cv-add {
  margin-top: 0.45rem;
}

.cv-photo-row { display: flex; gap: 0.75rem; align-items: center; }
.cv-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--amz-paper-2);
  border: 2px solid var(--amz-line);
}
.cv-photo-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.cv-templates { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.cv-tpl-btn {
  border: 1px solid var(--amz-line);
  background: #fff;
  border-radius: 10px;
  padding: 0.45rem;
  cursor: pointer;
  text-align: left;
}
.cv-tpl-btn.is-active {
  border-color: var(--amz-accent);
  box-shadow: 0 0 0 2px rgba(255, 109, 0, 0.18);
}
.cv-tpl-btn strong { display: block; font-size: 0.78rem; }
.cv-tpl-btn span { font-size: 0.68rem; color: var(--amz-muted); }
.cv-tpl-mini {
  height: 42px;
  border-radius: 6px;
  margin-bottom: 0.35rem;
  border: 1px solid var(--amz-line);
}
.cv-tpl-mini--classic { background: linear-gradient(90deg, var(--amz-primary) 32%, #fff 32%); }
.cv-tpl-mini--modern { background: linear-gradient(180deg, var(--amz-accent) 38%, #fff 38%); }
.cv-tpl-mini--elegant { background: linear-gradient(180deg, #fff 20%, var(--amz-primary-soft) 20%, #fff 55%); }
.cv-tpl-mini--executive { background: linear-gradient(90deg, var(--amz-accent) 8%, #fff 8%); }

.cv-colors { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.cv-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(17,17,17,0.18);
  cursor: pointer;
  padding: 0;
}
.cv-swatch.is-active { box-shadow: 0 0 0 2px var(--amz-ink); }
.cv-colors input[type="color"] {
  width: 36px;
  height: 28px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.cv-preview-scroll { display: flex; justify-content: center; }
.cv-preview-scale {
  transform-origin: top center;
}
.cv-pages { display: grid; gap: 14px; }

.cv-page {
  width: 210mm;
  height: 297mm;
  background: #fff;
  color: #111;
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.12);
  --cv-accent: #0747a3;
}

.cv-page * { box-sizing: border-box; }
.cv-page h1, .cv-page h2, .cv-page h3, .cv-page p, .cv-page ul { margin: 0; }
.cv-page ul { padding-left: 1.05em; }

.cv-rail, .cv-main { min-height: 0; }
.cv-photo {
  width: 34mm;
  height: 34mm;
  object-fit: cover;
  background: rgba(255,255,255,0.2);
  display: block;
}
.cv-name { font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.cv-role { font-weight: 600; opacity: 0.92; margin-top: 2mm; }
.cv-sec { margin: 0 0 4.2mm; break-inside: avoid; page-break-inside: avoid; }
.cv-sec h2 {
  font-size: 11pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cv-accent);
  border-bottom: 1.5px solid var(--cv-accent);
  padding-bottom: 1.2mm;
  margin-bottom: 2.2mm;
}
.cv-item-cv { margin-bottom: 2.8mm; }
.cv-item-cv strong { display: block; font-size: 10.5pt; }
.cv-item-cv em { font-style: normal; color: #444; font-size: 9.2pt; }
.cv-item-cv p, .cv-item-cv li { font-size: 9.3pt; line-height: 1.35; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 1.4mm; }
.cv-chip {
  border: 1px solid var(--cv-accent);
  color: var(--cv-accent);
  border-radius: 99px;
  padding: 0.6mm 2.2mm;
  font-size: 8.6pt;
  font-weight: 700;
}
.cv-contact-line { font-size: 8.8pt; line-height: 1.45; }

/* Classic: coloured sidebar */
.cv-tpl-classic {
  display: grid;
  grid-template-columns: 68mm 1fr;
  font-family: "Manrope", "Segoe UI", sans-serif;
}
.cv-tpl-classic .cv-rail {
  background: var(--cv-accent);
  color: #fff;
  padding: 12mm 7mm;
}
.cv-tpl-classic .cv-rail .cv-sec h2,
.cv-tpl-classic .cv-rail .cv-chip,
.cv-tpl-classic .cv-rail .cv-contact-line { color: #fff; border-color: rgba(255,255,255,0.55); }
.cv-tpl-classic .cv-rail .cv-sec h2 { border-bottom-color: rgba(255,255,255,0.45); }
.cv-tpl-classic .cv-photo { border-radius: 50%; margin: 0 auto 6mm; border: 2px solid #fff; }
.cv-tpl-classic .cv-name { font-size: 16pt; color: #fff; text-align: center; }
.cv-tpl-classic .cv-role { text-align: center; font-size: 9.5pt; }
.cv-tpl-classic .cv-main { padding: 12mm 11mm 12mm 9mm; }
.cv-tpl-classic .cv-main .cv-identity { display: none; }

/* Modern: accent header */
.cv-tpl-modern {
  display: grid;
  grid-template-rows: auto 1fr;
  font-family: "Manrope", "Segoe UI", sans-serif;
}
.cv-tpl-modern .cv-rail {
  background: var(--cv-accent);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6mm;
  align-items: center;
  padding: 10mm 12mm;
}
.cv-tpl-modern .cv-photo { border-radius: 8px; width: 28mm; height: 28mm; order: 2; }
.cv-tpl-modern .cv-identity { order: 1; }
.cv-tpl-modern .cv-name { font-size: 22pt; color: #fff; }
.cv-tpl-modern .cv-role { color: rgba(255,255,255,0.92); font-size: 11pt; }
.cv-tpl-modern .cv-rail .cv-sec { display: none; }
.cv-tpl-modern .cv-rail .cv-contact-wrap { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3mm 8mm; }
.cv-tpl-modern .cv-rail .cv-contact-line { color: #fff; }
.cv-tpl-modern .cv-main { padding: 8mm 12mm 12mm; }
.cv-tpl-modern .cv-main .cv-identity { display: none; }
.cv-tpl-modern .cv-sec h2 {
  background: var(--cv-accent);
  color: #fff;
  border: 0;
  display: inline-block;
  padding: 1mm 3.2mm;
  border-radius: 99px;
  font-size: 9pt;
}

/* Elegant: centred, serif headings */
.cv-tpl-elegant {
  display: flex;
  flex-direction: column;
  font-family: "Source Serif 4", Georgia, serif;
  padding: 12mm 14mm;
}
.cv-tpl-elegant .cv-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 6mm;
  border-bottom: 0.6pt solid var(--cv-accent);
  margin-bottom: 6mm;
}
.cv-tpl-elegant .cv-photo { border-radius: 50%; margin-bottom: 4mm; width: 28mm; height: 28mm; }
.cv-tpl-elegant .cv-name { font-size: 24pt; color: #111; font-weight: 600; }
.cv-tpl-elegant .cv-role { color: var(--cv-accent); letter-spacing: 0.12em; text-transform: uppercase; font-size: 9pt; }
.cv-tpl-elegant .cv-rail .cv-sec { display: none; }
.cv-tpl-elegant .cv-contact-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 2mm 8mm; margin-top: 3mm; }
.cv-tpl-elegant .cv-main .cv-identity { display: none; }
.cv-tpl-elegant .cv-sec h2 {
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-size: 10.5pt;
}

/* Executive: left accent bar */
.cv-tpl-executive {
  display: grid;
  grid-template-columns: 10mm 1fr;
  font-family: "Manrope", "Segoe UI", sans-serif;
}
.cv-tpl-executive::before {
  content: "";
  background: var(--cv-accent);
}
.cv-tpl-executive .cv-rail,
.cv-tpl-executive .cv-main { grid-column: 2; }
.cv-tpl-executive .cv-rail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5mm;
  align-items: center;
  padding: 11mm 12mm 4mm 8mm;
}
.cv-tpl-executive .cv-photo { border-radius: 4px; width: 26mm; height: 32mm; }
.cv-tpl-executive .cv-name { font-size: 20pt; text-transform: uppercase; letter-spacing: 0.06em; }
.cv-tpl-executive .cv-role { color: var(--cv-accent); font-size: 10.5pt; }
.cv-tpl-executive .cv-rail .cv-sec { display: none; }
.cv-tpl-executive .cv-contact-wrap { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2mm 8mm; }
.cv-tpl-executive .cv-main { padding: 2mm 12mm 12mm 8mm; }
.cv-tpl-executive .cv-main .cv-identity { display: none; }
.cv-tpl-executive .cv-sec h2 { border-bottom-width: 2.5px; }

.cv-muted { color: #6b7280; font-size: 9pt; }

.cv-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(14, 20, 27, 0.55);
  padding: 1.2rem;
  overflow: auto;
}
.cv-lightbox__panel {
  max-width: 920px;
  margin: 0 auto;
  background: var(--amz-paper);
  border-radius: 16px;
  padding: 0.9rem;
}
.cv-lightbox__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
}
.cv-lightbox__body { display: grid; gap: 12px; justify-items: center; }
.cv-lightbox__body .cv-page { transform: scale(0.72); transform-origin: top center; margin-bottom: -80px; }

.cv-home-band {
  background:
    linear-gradient(120deg, rgba(7, 71, 163, 0.08), rgba(255, 109, 0, 0.1));
  border-top: 1px solid var(--amz-line);
  border-bottom: 1px solid var(--amz-line);
}
.cv-home-band__inner {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1.6rem 0;
}
.cv-home-band h2 { margin: 0.2rem 0 0.35rem; }
.cv-home-band p { margin: 0; color: var(--amz-muted); max-width: 52ch; }

@media (max-width: 980px) {
  .cv-portal__layout {
    grid-template-columns: 1fr;
  }
  .cv-portal__editor,
  .cv-portal__preview {
    max-height: none;
    border-right: 0;
  }
  .cv-portal__editor { border-bottom: 1px solid var(--amz-line); }
  .cv-grid-2 { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  .skip-link, .amz-progress, .site-header, .mega-menu, .site-footer, .amz-dock,
  .float-stack, .amz-popup, .product-modal, .cv-portal__bar, .cv-portal__editor,
  .cv-lightbox, .nav-toggle { display: none !important; }
  .cv-portal, .cv-portal__layout, .cv-portal__preview, .cv-preview-scroll, .cv-preview-scale, .cv-pages {
    display: block !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    width: auto !important;
    box-shadow: none !important;
  }
  .cv-page {
    box-shadow: none !important;
    page-break-after: always;
    break-after: page;
    margin: 0;
  }
  .cv-page:last-child { page-break-after: auto; }
}
