/* ═══════════════════════════════════════════════════════════════
   VIOLA — Export Template CSS
   Output target: 1024 × 1536 px  (CSS 1024px card, html2canvas scale:1)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --orange:        #F05A22;
  --orange-hi:     #F7941D;
  --navy:          #1A2B5E;
  --card-bg:       #FFF8F5;
  --card-border:   #FADDD0;
  --text-primary:  #1A1A1A;
  --text-secondary:#444444;
  --text-muted:    #888888;
  --divider:       #EEEEEE;
  --white:         #FFFFFF;
}

/* ── Wrapper ─────────────────────────────────────────────────── */
#export-wrapper {
  position: fixed; left: -9999px; top: 0;
  z-index: -1; background: white; width: 1024px;
}

/* Card: 1024×1536 exact */
.export-card {
  width: 1024px;
  background: #fff;
  font-family: 'Segoe UI', 'Be Vietnam Pro', Montserrat, Arial, sans-serif;
  box-sizing: border-box; padding: 0;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

.v-logo img { display: block; }
.v-logo-lg img { height: 100px; }
.v-logo-sm img { height: 68px; }

/* Section header pill */
.sec-hdr {
  background: var(--orange); color: var(--white);
  font-weight: 700; font-size: 14px; letter-spacing: 1px;
  text-transform: uppercase; text-align: center;
  padding: 9px 24px; border-radius: 24px;
  display: block; width: 100%; box-sizing: border-box;
}

/* Badges on photos */
.badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 12px; border-radius: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; z-index: 2; pointer-events: none;
}
.badge-before { background: #E8E8E8; color: #333333; }
.badge-after  { background: var(--orange); color: #FFFFFF; }

/* Photo wrapper — img positioned by JS simulateObjectFitCover() */
.photo-wrap {
  position: relative; border-radius: 10px; overflow: hidden;
  background: #e8e8e8; flex-shrink: 0;
}
.photo-wrap img { position: absolute; display: block; }

/* Arrow circles */
.arrow-sm {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
}
.arrow-lg {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}

/* Info row — 2 cards */
.info-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  padding: 18px 30px; border-bottom: 1px solid var(--divider);
}
.info-card {
  background: var(--card-bg); border: 1.5px solid var(--card-border);
  border-radius: 14px; padding: 16px 18px;
}
.info-card-title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 13px; text-transform: uppercase;
  color: var(--navy); margin-bottom: 10px;
}
.info-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
}
.info-bullets {
  list-style: none; padding: 0; margin: 0;
  font-size: 13px; line-height: 1.85; color: var(--text-secondary);
}
.info-bullets li::before { content: "• "; color: var(--orange); font-weight: 700; }

/* Customer info box */
.cust-box {
  background: var(--card-bg); border: 1.5px solid var(--card-border);
  border-radius: 14px; padding: 16px 18px;
}
.cust-box-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px; text-transform: uppercase;
  color: var(--orange); border-bottom: 1px solid var(--divider);
  padding-bottom: 10px; margin-bottom: 4px;
}
.cust-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--divider);
}
.cust-row:last-child { border-bottom: none; }
.cust-icon {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: #fff1ee;
  display: flex; align-items: center; justify-content: center;
}
.cust-lbl { color: var(--text-muted); font-size: 12px; min-width: 90px; }
.cust-val { font-weight: 700; font-size: 13px; color: var(--text-primary); }
.cust-val.orange { color: var(--orange); }

/* Bullet desc cols dưới ảnh */
.desc-col { font-size: 13px; line-height: 1.75; color: var(--text-secondary); }
.desc-col ul { list-style: none; padding: 0; margin: 0; }
.desc-col ul li::before { content: "• "; color: var(--orange); font-weight: 700; }

/* Footer */
.t-footer {
  background: #fafafa; border-top: 3px solid var(--orange);
  padding: 14px 30px;
  display: flex; align-items: center; justify-content: space-between;
}
.t-disclaimer {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--text-secondary); line-height: 1.6; max-width: 620px;
}
.t-disclaimer-icon {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--orange); color: #fff;
  font-weight: 900; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   TEMPLATE 1 — COMPACT (3 góc)
   Card: 1024px wide × ~1536px tall
   ─────────────────────────────────────────────────────────────
   Header    ~155px
   Info row  ~148px
   t1-angles ~586px  (2 cols cạnh nhau, photos 450px tall)
   t1-bottom ~586px  (góc 3 + customer box)
   Footer    ~  62px
   Total     ~1537px ✓
   ═══════════════════════════════════════════════════════════════ */

.t1-header {
  display: flex; align-items: center; gap: 28px;
  padding: 24px 30px 20px; border-bottom: 3px solid var(--orange);
}
.t1-title h1 {
  font-size: 32px; font-weight: 700; color: var(--navy);
  line-height: 1.18; text-transform: uppercase; margin: 0;
}
.t1-title h1 .hi { color: var(--orange-hi); font-weight: 800; }
.t1-title .sub { font-size: 12px; color: #666; font-style: italic; margin-top: 6px; }

/* 2 angles side by side */
.t1-angles {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  padding: 16px 30px 0;
}
.t1-angle-col { display: flex; flex-direction: column; gap: 12px; }

/* Mini compare: [photo] [arrow] [photo] */
.t1-mini-compare {
  display: grid; grid-template-columns: 1fr 36px 1fr;
  gap: 10px; align-items: center;
}
/*
  Col width = (1024 - 60pad - 20gap) / 2 = 472px
  Photo width = (472 - 36arrow - 20gap) / 2 = 208px
  Height = 450px (aspect ~2.16 — face portrait proportion)
*/
.t1-mini-compare .photo-wrap { height: 450px; }

.t1-mini-desc {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding-bottom: 16px;
}

/* Bottom: góc 3 (55%) + customer box (45%) */
.t1-bottom {
  display: grid; grid-template-columns: 55% 1fr; gap: 20px;
  padding: 0 30px 0; align-items: start;
}
.t1-angle-3 { display: flex; flex-direction: column; gap: 12px; }
.t1-angle-3 .t1-mini-compare .photo-wrap { height: 450px; }
.t1-angle-3 .t1-mini-desc { padding-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════
   TEMPLATE 2 — EXPANDED (2 góc)
   Card: 1024px wide × ~1536px tall
   ─────────────────────────────────────────────────────────────
   Header    ~170px  (logo+title left | customer box right)
   Info row  ~148px
   t2-angles:
     angle block 1: col-headers(44) + gap(12) + photos(440) + gap(12) + desc(72) = 580px
     gap:  20px
     angle block 2: 580px
   = 16pad + 580 + 20 + 580 = 1196px
   Footer    ~  62px
   Total     ~170+148+1196+62 = 1576px → adjust photos to 420px
   ─────────────────────────────────────────────────────────────
   With photos 420px:
   block: 44+12+420+12+72 = 560px
   angles: 16+560+20+560 = 1156px
   Total: 170+148+1156+62 = 1536px ✓
   ═══════════════════════════════════════════════════════════════ */

.t2-header {
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: start;
  padding: 24px 30px 20px; border-bottom: 3px solid var(--orange);
}
.t2-header-left { display: flex; align-items: center; gap: 20px; }
.t2-title h1 {
  font-size: 32px; font-weight: 700; color: var(--navy);
  line-height: 1.18; text-transform: uppercase; margin: 0;
}
.t2-title h1 .hi { color: var(--orange-hi); font-weight: 800; }
.t2-title .sub { font-size: 12px; color: #666; font-style: italic; margin-top: 6px; }
.t2-header .cust-box { min-width: 230px; align-self: center; }

.t2-angles {
  padding: 16px 30px 0;
  display: flex; flex-direction: column; gap: 20px;
}
.t2-angle-block { display: flex; flex-direction: column; gap: 12px; }

/* 2 col-headers side by side (with gap col in middle) */
.t2-col-headers {
  display: grid; grid-template-columns: 1fr 60px 1fr; gap: 12px;
}

/* Full compare: [photo] [>>] [photo] */
.t2-full-compare {
  display: grid; grid-template-columns: 1fr 60px 1fr;
  gap: 12px; align-items: center;
}
/*
  Photo width = (1024 - 60pad - 60arrow - 24gap) / 2 = 440px
  Height = 420px (aspect ~0.955 — portrait face)
*/
.t2-full-compare .photo-wrap { height: 420px; }

.t2-full-desc {
  display: grid; grid-template-columns: 1fr 60px 1fr; gap: 12px;
  padding-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   TEMPLATE 3 — SINGLE VIEW (1 góc)
   Card: 820px wide × ~2000px tall
   ═══════════════════════════════════════════════════════════════ */

.t3-card {
  width: 820px;
  background: #fff;
  font-family: 'Be Vietnam Pro', 'Segoe UI', Montserrat, Arial, sans-serif;
  box-sizing: border-box;
  padding: 28px;
  color: #1A1A1A;
  display: flex; flex-direction: column; gap: 20px;
}

/* Header */
.t3-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 24px;
}
.t3-logo img { height: 100px; display: block; }
.t3-title-block { flex: 1; text-align: right; }
.t3-title {
  font-size: 38px; font-weight: 800; color: #1A2B5E;
  line-height: 1.12; text-transform: uppercase; margin: 0;
}
.t3-hi { color: #F7941D; }
.t3-subtitle { font-size: 13px; color: #666; font-style: italic; margin: 6px 0 0; }
.t3-divider { border: none; border-top: 2px solid #F05A22; margin: 0; }

/* Condition row */
.t3-condition-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.t3-cond-card {
  background: #FFF8F5; border: 1.5px solid #FADDD0;
  border-radius: 14px; padding: 14px 16px;
}
.t3-cond-title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 13px; text-transform: uppercase;
  color: #1A2B5E; margin-bottom: 10px;
}
.t3-cond-icon {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.t3-cond-bullets {
  list-style: none; padding: 0; margin: 0;
  font-size: 13px; line-height: 1.8; color: #444;
}
.t3-cond-bullets li::before { content: "• "; color: #F05A22; font-weight: 700; }

/* Compare images */
.t3-compare {
  display: flex; align-items: stretch; gap: 0; position: relative;
}
.t3-col-before, .t3-col-after {
  flex: 1; display: flex; flex-direction: column;
}
.t3-badge-before {
  background: #1A2B5E; color: #fff;
  font-weight: 700; font-size: 15px; letter-spacing: 1px;
  text-align: center; padding: 9px 0;
  border-radius: 8px 8px 0 0; text-transform: uppercase;
}
.t3-badge-after {
  background: #F05A22; color: #fff;
  font-weight: 700; font-size: 15px; letter-spacing: 1px;
  text-align: center; padding: 9px 0;
  border-radius: 8px 8px 0 0; text-transform: uppercase;
}
.t3-compare .photo-wrap { height: 480px; }
.t3-img-before {
  border: 2.5px solid #1A2B5E; border-top: none;
  border-radius: 0 0 8px 8px !important;
}
.t3-img-after {
  border: 2.5px solid #F05A22; border-top: none;
  border-radius: 0 0 8px 8px !important;
}
.t3-arrow-circle {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: #F05A22; color: #fff;
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  align-self: center; margin: 0 -24px; z-index: 10; position: relative;
  box-shadow: 0 2px 8px rgba(240,90,34,0.4);
}

/* Analysis section */
.t3-analysis-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: #FFF8F5; border: 1px solid #EEEEEE;
  border-radius: 12px; padding: 18px 20px;
}
.t3-analysis-col { display: flex; flex-direction: column; gap: 10px; }
.t3-analysis-hdr {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; text-transform: uppercase; color: #1A2B5E;
}
.t3-analysis-bullets {
  list-style: none; padding: 0; margin: 0;
  font-size: 13px; line-height: 1.8; color: #333;
}
.t3-analysis-bullets li::before { content: "• "; color: #F05A22; font-weight: 700; }

/* Customer info section */
.t3-info-section { display: flex; flex-direction: column; gap: 14px; }
.t3-info-header-pill {
  background: #F05A22; color: #fff;
  font-weight: 700; font-size: 14px; letter-spacing: 0.5px;
  text-align: center; text-transform: uppercase;
  padding: 9px 24px; border-radius: 999px;
}
.t3-info-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid #EEEEEE; border-radius: 10px; overflow: hidden;
}
.t3-info-cell {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #EEEEEE;
  border-right: 1px solid #EEEEEE;
}
.t3-info-cell.no-br { border-right: none; }
.t3-info-cell.no-bb { border-bottom: none; }
.t3-info-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: #FFF1EE; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.t3-info-text { display: flex; flex-direction: column; gap: 2px; }
.t3-info-label { font-size: 12px; color: #F05A22; font-weight: 400; }
.t3-info-value { font-size: 13px; color: #1A1A1A; font-weight: 600; }

/* Footer */
.t3-footer {
  display: flex; align-items: center; justify-content: space-between;
  background: #fafafa; border-top: 3px solid #F05A22;
  padding: 14px 20px; border-radius: 0 0 8px 8px;
}
.t3-disclaimer {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: #444; line-height: 1.6; max-width: 500px;
}
.t3-disclaimer-icon {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: #F05A22; color: #fff;
  font-weight: 900; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.t3-logo-sm img { height: 68px; display: block; }
