/* Resume Template CSS - Realistic Multi-Page A4 Layout & Screenshot Parity */

:root {
  --primary-accent: #4A86E8;
  --header-bg-light: #E8F0FE;
  --text-color: #000000;
  --text-muted: #333333;
  --border-color: #000000;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@page {
  size: A4 portrait;
  margin: 0;
}

/* Multi-Page A4 Canvas Container */
.resume-page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Individual A4 Page Card */
.resume-page {
  width: 210mm;
  min-height: 297mm;
  background: #ffffff;
  color: var(--text-color);
  font-family: var(--font-family);
  margin: 0 auto;
  padding: 0 0 30px 0;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid #CBD5E1;
  border-radius: 2px;
  overflow: hidden;
  page-break-after: always;
  break-after: page;
}

.page-number-badge {
  position: absolute;
  bottom: 10px;
  right: 20px;
  font-size: 10px;
  font-weight: 600;
  color: #94A3B8;
  background: #F8FAFC;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

/* Canva-like Inline Editable Canvas Elements */
[contenteditable="true"] {
  outline: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  border-radius: 2px;
  cursor: text;
  min-width: 10px;
}

[contenteditable="true"]:hover {
  background-color: rgba(74, 134, 232, 0.08);
  box-shadow: 0 0 0 1.5px rgba(74, 134, 232, 0.4);
}

[contenteditable="true"]:focus {
  background-color: rgba(74, 134, 232, 0.12);
  box-shadow: 0 0 0 2px rgba(74, 134, 232, 0.8);
}

/* Top Accent Band spanning full width */
.top-accent-bar {
  width: 100%;
  height: 38px;
  background-color: var(--primary-accent);
  margin-bottom: 24px;
}

/* Page 2+ Top Spacer */
.top-accent-bar-subsequent {
  width: 100%;
  height: 16px;
  background-color: var(--primary-accent);
  margin-bottom: 24px;
}

/* Inner content padding */
.resume-body {
  padding: 0 32px;
  display: flex;
  gap: 32px;
}

/* Left Main Column */
.resume-left-col {
  flex: 1 1 65%;
  min-width: 0;
}

/* Right Sidebar Column */
.resume-right-col {
  width: 240px;
  flex-shrink: 0;
}

/* Name Header */
.candidate-name {
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-color);
  letter-spacing: 0.5px;
  margin: 0 0 6px 0;
  line-height: 1.1;
}

.name-divider {
  width: 100%;
  height: 2px;
  background-color: var(--border-color);
  margin-bottom: 20px;
}

/* Section Header styling with light blue background bar */
.section-header-container {
  margin-top: 18px;
  margin-bottom: 10px;
  page-break-inside: avoid;
  break-inside: avoid;
}

.section-header-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-color);
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.section-title-fill {
  flex-grow: 1;
  height: 17px;
  background-color: var(--header-bg-light);
  border-radius: 1px;
}

.section-header-line {
  width: 100%;
  height: 1.5px;
  background-color: var(--border-color);
  margin-top: 3px;
}

/* Profile Photo */
.profile-photo-container {
  width: 100%;
  margin-bottom: 20px;
  page-break-inside: avoid;
  break-inside: avoid;
  position: relative;
  cursor: pointer;
}

.profile-photo-container:hover .photo-hover-overlay {
  opacity: 1;
}

.photo-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 2px;
  pointer-events: none;
}

.profile-photo-img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

/* Paragraph Content */
.section-paragraph {
  font-size: 11.5px;
  line-height: 1.48;
  color: var(--text-color);
  margin: 0 0 14px 0;
  text-align: justify;
}

/* Bullet lists */
.section-bullet-list {
  margin: 0 0 14px 0;
  padding-left: 15px;
  list-style-type: disc;
}

.section-bullet-list li {
  font-size: 11.5px;
  line-height: 1.42;
  color: var(--text-color);
  margin-bottom: 4px;
}

/* Work History Item */
.work-item {
  margin-bottom: 14px;
  page-break-inside: avoid;
  break-inside: avoid;
}

.work-header {
  margin-bottom: 2px;
}

.work-role-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-color);
  display: flex;
  justify-content: space-between;
}

.work-company-loc {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 4px;
}

/* Contact Info Item */
.contact-list {
  font-size: 11.5px;
  line-height: 1.55;
  margin-bottom: 14px;
  page-break-inside: avoid;
  break-inside: avoid;
}

.contact-row {
  margin-bottom: 3px;
  color: var(--text-color);
  word-break: break-word;
}

.contact-label {
  font-weight: 700;
}

/* Education Item */
.edu-item {
  margin-bottom: 12px;
  page-break-inside: avoid;
  break-inside: avoid;
}

.edu-degree {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.3;
}

.edu-date {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-color);
}

.edu-school {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-color);
  margin-top: 1px;
}

/* Subsequent Page Headers */
.subsequent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px 8px 32px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border-color);
}

.subsequent-name {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-color);
  letter-spacing: 0.5px;
}

.subsequent-badge {
  font-size: 10px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Custom & Generic Sections */
.custom-section-wrap {
  margin-bottom: 16px;
}

.custom-section-item {
  margin-bottom: 10px;
  page-break-inside: avoid;
  break-inside: avoid;
}

.custom-item-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 3px;
}

/* Print Styles */
@media print {
  body {
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .resume-page-container {
    gap: 0 !important;
  }
  .resume-page {
    box-shadow: none !important;
    border: none !important;
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
  }
  .page-number-badge, .app-header, .editor-pane, .preview-toolbar, .canva-toolbar {
    display: none !important;
  }
  [contenteditable="true"] {
    box-shadow: none !important;
    background-color: transparent !important;
  }
}

/* ====================================================
   TEMPLATE VARIATIONS: EXECUTIVE & MINIMAL
   ==================================================== */

/* --- CLASSIC EXECUTIVE TEMPLATE (.template-executive) --- */
.template-executive .top-accent-bar {
  height: 8px;
  margin-bottom: 20px;
}

.template-executive .executive-header {
  text-align: center;
  padding: 0 32px;
  margin-bottom: 20px;
}

.template-executive .executive-name {
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-color);
  margin-bottom: 8px;
}

.template-executive .executive-contact-line {
  font-size: 11px;
  color: #475569;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.template-executive .executive-divider {
  width: 100%;
  height: 2px;
  background-color: var(--primary-accent);
  margin-bottom: 16px;
}

.template-executive .resume-body-full {
  padding: 0 32px;
  display: flex;
  flex-direction: column;
}

.template-executive .section-header-container {
  border-bottom: 2px solid var(--primary-accent);
  padding-bottom: 4px;
  margin-top: 18px;
  margin-bottom: 10px;
}

.template-executive .section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-accent);
  letter-spacing: 0.5px;
}

.template-executive .section-title-fill, .template-executive .section-header-line {
  display: none;
}

/* --- MINIMALIST CLEAN TEMPLATE (.template-minimal) --- */
.template-minimal .top-accent-bar {
  height: 4px;
  margin-bottom: 16px;
}

.template-minimal .resume-body {
  padding: 0 24px;
  gap: 24px;
}

.template-minimal .resume-left-col {
  width: 200px;
  flex: 0 0 200px;
  background: #F8FAFC;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid #E2E8F0;
}

.template-minimal .resume-right-col {
  flex: 1;
  width: auto;
}

.template-minimal .section-header-container {
  margin-top: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid #CBD5E1;
  padding-bottom: 2px;
}

.template-minimal .section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-accent);
}

.template-minimal .section-title-fill, .template-minimal .section-header-line {
  display: none;
}
