/* =============================================
   cv-builder.css - Harvard Style CV & Locker UX
   ============================================= */

.cv-builder-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 120px);
}

@media (max-width: 1024px) {
  .cv-builder-container {
    grid-template-columns: 1fr;
  }
}

/* 🎒 LEFT PANE: Achievement Locker ("The Store") */
.achievement-locker {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 140px);
  position: sticky;
  top: 80px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.locker-header h3 {
  margin: 0 0 4px 0;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main, #0f172a);
}

.locker-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}

.locker-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.locker-chip {
  background: var(--bg-body, #f8fafc);
  border: 1px solid var(--border-color, #cbd5e1);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-main, #334155);
}

.locker-chip.active, .locker-chip:hover {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.locker-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.locker-card {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg-card, #ffffff);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.locker-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}

.locker-card.in-cart {
  background: #f0fdf4;
  border-color: #22c55e;
}

.locker-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.locker-card-sub {
  font-size: 0.78rem;
  color: #64748b;
}

.locker-card-actions {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-verified {
  font-size: 0.7rem;
  background: #dcfce7;
  color: #15803d;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-add-cart {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-cart:hover {
  background: #3b82f6;
  color: #ffffff;
}

.btn-add-cart.added {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
}

/* 📄 RIGHT PANE: Live Harvard Canvas */
.cv-preview-wrapper {
  background: #f1f5f9;
  padding: 24px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cv-toolbar {
  width: 100%;
  max-width: 800px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.cv-toolbar-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
}

.cv-toolbar-buttons {
  display: flex;
  gap: 8px;
}

/* 🎓 HARVARD RESUME CANVAS (Exact Paper Specs) */
.harvard-cv-paper {
  width: 100%;
  max-width: 800px;
  min-height: 1030px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 48px 56px;
  box-sizing: border-box;
  font-family: 'Times New Roman', Times, Georgia, serif;
  color: #000000;
  line-height: 1.35;
  font-size: 10.5pt;
  position: relative;
}

.harvard-header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.harvard-name {
  font-size: 22pt;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-family: 'Times New Roman', Times, Georgia, serif;
}

.harvard-contact-line {
  font-size: 9.5pt;
  color: #222222;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.harvard-qr-box {
  position: absolute;
  top: 0;
  right: 0;
  text-align: center;
}

.harvard-qr-img {
  width: 54px;
  height: 54px;
}

.harvard-qr-label {
  font-size: 6.5pt;
  color: #555555;
  margin-top: 2px;
}

.harvard-section {
  margin-bottom: 16px;
}

.harvard-section-title {
  font-size: 11pt;
  font-weight: bold;
  text-transform: uppercase;
  border-bottom: 1.25px solid #000000;
  padding-bottom: 2px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.harvard-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.harvard-title-left {
  font-weight: bold;
  font-style: italic;
  font-size: 10.5pt;
}

.harvard-date-right {
  font-style: italic;
  font-size: 10pt;
  white-space: nowrap;
}

.harvard-sub-left {
  font-size: 10pt;
  margin-bottom: 4px;
}

.harvard-bullets {
  margin: 4px 0 8px 18px;
  padding: 0;
  list-style-type: disc;
}

.harvard-bullets li {
  margin-bottom: 3px;
  font-size: 10pt;
}

.verified-inline-tag {
  font-family: sans-serif;
  font-size: 6.5pt;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* 🖨️ PRINT & PDF EXPORT OVERRIDES */
@media print {
  body * {
    visibility: hidden;
  }
  .harvard-cv-paper, .harvard-cv-paper * {
    visibility: visible;
  }
  .harvard-cv-paper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }
  .cv-builder-container, .achievement-locker, .cv-toolbar {
    display: none !important;
  }
}
