/* =====================================================================
   INTEL AFRICA — part4.css
   Ads wizard, My Ads, Ad Jobs, Help Centre, support tickets + chat thread.
   Load after part2.css:  'css' => ['part2.css', 'part4.css']
   ===================================================================== */

/* ---------- wizard ---------- */
.wiz { padding-top: 10px; }
.wiz-head { margin: 8px 0 18px; }
.wiz-head h1 { font-size: 20px; font-weight: 800; letter-spacing: -.025em; }
.wiz-head p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.wiz-foot { position: sticky; bottom: calc(92px + env(safe-area-inset-bottom)); margin-top: 22px; padding-top: 10px;
  background: linear-gradient(180deg, transparent, var(--bg) 30%); }
.wiz-step { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* step 1 — logo tiles, no labels */
.plat-grid { display: grid; grid-template-columns: repeat(auto-fill, 72px); justify-content: space-between; gap: 16px 12px; }
.plat-opt { position: relative; display: block; width: 72px; height: 72px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.plat-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.plat-opt .tile { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .2s var(--ease), transform .15s var(--ease); }
.plat-opt .tile img { width: 44px; height: 44px; object-fit: contain; }
.plat-opt .tick { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); color: #fff; border: 2px solid var(--bg); opacity: 0; transform: scale(.5); transition: opacity .15s, transform .2s var(--ease-pop); }
.plat-opt input:checked ~ .tile { border: 2px solid var(--brand); box-shadow: var(--ring); }
.plat-opt input:checked ~ .tick { opacity: 1; transform: none; }
.plat-opt input:focus-visible ~ .tile { outline: 2px solid var(--brand); outline-offset: 2px; }
.plat-opt:active .tile { transform: scale(.96); }
[data-theme="dark"] .plat-opt .tile { background: #fff; }

/* step 2 — engagement pills */
.eng-list { display: grid; gap: 12px; }
.eng-opt { position: relative; display: block; cursor: pointer; }
.eng-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.eng-pill { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 18px 10px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .2s, background-color .2s; }
.eng-ico { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--grad-soft); color: var(--link); }
.eng-name { flex: 1; font-weight: 800; font-size: 15px; }
.eng-check { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; color: transparent; transition: background-color .15s, border-color .15s, color .15s; }
.eng-price { display: block; margin: 6px 0 0 24px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.eng-price strong { color: var(--text); }
.eng-opt input:checked ~ .eng-pill { border: 2px solid var(--brand); background: var(--grad-soft); padding: 9px 17px 9px 9px; }
.eng-opt input:checked ~ .eng-pill .eng-ico { background: var(--grad); color: #fff; }
.eng-opt input:checked ~ .eng-pill .eng-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.eng-opt input:focus-visible ~ .eng-pill { outline: 2px solid var(--brand); outline-offset: 2px; }

/* step 3 — stepper + cost */
.stepper { display: grid; grid-template-columns: 56px 1fr 56px; gap: 10px; align-items: center; }
.stepper .btn { height: 56px; padding: 0; border-radius: 16px; }
.stepper .input { height: 56px; text-align: center; font-family: var(--font-num); font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.qty-range { width: 100%; margin: 16px 0 4px; accent-color: var(--brand); }
.qty-limits { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); font-weight: 700; }
.cost { margin-top: 18px; padding: 16px; }
.cost-line { font-size: 14px; color: var(--muted); }
.cost-line strong { color: var(--text); font-size: 22px; letter-spacing: -.02em; }
.cost-rows { margin-top: 12px; display: grid; gap: 8px; font-size: 13px; }
.cost-rows div { display: flex; justify-content: space-between; gap: 10px; }
.cost-rows span { color: var(--muted); }
.cost-warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--warning-bg); color: var(--warning); font-size: 12.5px; font-weight: 700; }
.cost-warn a { color: inherit; text-decoration: underline; }

/* step 4 — link */
.link-input { height: 44px; font-size: 14px; }
.link-state { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.link-state.ok { color: var(--success); }
.link-state.warn { color: var(--warning); align-items: flex-start; }
.link-state.bad { color: var(--danger); }

/* step 5 — details */
.counter { font-size: 11.5px; color: var(--faint); font-weight: 700; text-align: right; margin-top: 4px; }
.thumb { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.thumb span { flex: 1; font-size: 12.5px; color: var(--muted); }

/* step 6 — review */
.review-card { padding: 18px; }
.review-plat { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.review-plat .tile { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--border); background: #fff; }
.review-plat .tile img { width: 34px; height: 34px; }
.review-list { margin: 0; padding: 0; }
.review-list div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.review-list dt { color: var(--muted); }
.review-list dd { margin: 0; font-weight: 700; text-align: right; word-break: break-all; }
.review-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; }
.review-total span { color: var(--muted); font-weight: 700; }
.review-total strong { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.review-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }

/* ---------- My Ads ---------- */
.camp-list { display: grid; gap: 12px; }
.camp-card { display: block; width: 100%; padding: 14px; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.camp-top { display: flex; align-items: center; gap: 12px; }
.camp-logo { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--border); background: #fff; }
.camp-logo img { width: 32px; height: 32px; object-fit: contain; }
.camp-main { flex: 1; min-width: 0; }
.camp-title { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camp-sub { font-size: 12px; color: var(--muted); }
.camp-progress { margin: 14px 0 6px; }
.camp-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.camp-meta strong { color: var(--text); }
.camp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.camp-stats div { font-size: 11px; color: var(--muted); font-weight: 600; }
.camp-stats strong { display: block; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.sheet-list { display: grid; gap: 10px; margin-top: 16px; }
.sheet-list form { margin: 0; }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.sub-thumb { width: 44px; height: 44px; flex: none; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

/* ---------- Ad Jobs ---------- */
.job-logo { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 14px; border: 1px solid var(--border); background: #fff; }
.job-logo img { width: 44px; height: 44px; object-fit: contain; }
.earn-pill { flex: none; align-self: center; }
.job-steps { margin: 14px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.job-steps strong { color: var(--text); }

/* ---------- Help Centre ---------- */
.help-page { padding-bottom: 60px; }
.help-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; padding: 14px 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.help-main { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.help-hero { margin: 18px 0 16px; text-align: center; }
.help-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.help-hero p { margin-top: 6px; color: var(--muted); }
.help-search { position: relative; margin-bottom: 14px; }
.help-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.help-search .input { height: 50px; padding-left: 42px; border-radius: var(--r-pill); font-size: 15px; box-shadow: var(--shadow); }
.cat-pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.cat-pills::-webkit-scrollbar { display: none; }
.cat-pill { flex: none; height: 34px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 700; }
.cat-pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.faq-list { display: grid; gap: 10px; }
.faq { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); transition: border-color .2s; }
.faq[open] { border-color: var(--brand); }
.faq summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; list-style: none; cursor: pointer; font-weight: 800; font-size: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { margin-left: auto; color: var(--faint); transition: transform .25s var(--ease); }
.faq[open] summary .icon { transform: rotate(90deg); color: var(--link); }
.faq-a { padding: 0 16px 14px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.faq[open] .faq-a { animation: faq-down .28s var(--ease); }
@keyframes faq-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq-a p + p { margin-top: 8px; }
.helpful { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12px; font-weight: 700; color: var(--faint); }
.helpful button { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; }
.helpful button[aria-pressed="true"] { border-color: var(--brand); color: var(--link); background: var(--grad-soft); }
.help-cta { margin-top: 22px; text-align: center; padding: 22px 16px; }

/* ---------- Support tickets ---------- */
.ticket { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); color: var(--text); }
.ticket:first-child { border-top: 0; }
.ticket-main { flex: 1; min-width: 0; }
.ticket-subject { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-meta { font-size: 12px; color: var(--muted); }
.tx-pick { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 11px; margin-top: 8px; }
.tx-pick label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--border); font-size: 12.5px; cursor: pointer; }
.tx-pick label:first-child { border-top: 0; }
.tx-pick input { accent-color: var(--brand); }
.tx-pick .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-pick .a { font-weight: 800; font-variant-numeric: tabular-nums; }
.tx-card { padding: 4px 14px; margin-bottom: 12px; }
.tx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.thread { display: flex; flex-direction: column; gap: 12px; padding: 6px 0 16px; }
.bubble { max-width: 84%; align-self: flex-start; }
.bubble-body { padding: 11px 14px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); color: var(--text); font-size: 13.5px; line-height: 1.55; word-wrap: break-word; }
.bubble-meta { margin: 4px 6px 0; font-size: 11px; color: var(--faint); font-weight: 600; }
.bubble.mine { align-self: flex-end; }
.bubble.mine .bubble-body { background: var(--brand); color: #fff; border-radius: 18px 18px 6px 18px; }
.bubble.mine .bubble-meta { text-align: right; }
.bubble.internal .bubble-body { background: var(--warning-bg); color: var(--text); border: 1px dashed color-mix(in srgb, var(--warning) 50%, transparent); }
.note-tag { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 4px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--warning); }
.att-img img { max-width: 220px; max-height: 220px; margin-top: 6px; border-radius: 12px; border: 1px solid var(--border); }
.att-doc { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 700; color: var(--text); }
.reply-box { position: sticky; bottom: calc(88px + env(safe-area-inset-bottom)); padding: 10px; }
.reply-box textarea.input { min-height: 72px; }
.reply-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.reply-row .att-btn { position: relative; overflow: hidden; }
.reply-row .att-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.reply-row .file-name { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 6px 0 12px; }
.thread-head h1 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
@media (min-width: 1024px) { .reply-box { bottom: 16px; } .wiz-foot { bottom: 0; } }

/* segmented tabs as links (Ad Jobs, admin) */
.seg .seg-tab { position: relative; z-index: 1; display: grid; place-items: center; height: 34px; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: color .2s; }
.seg .seg-tab[aria-selected="true"] { color: var(--text); }

/* Dashboard → Ads entry points */
.ads-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ads-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.ads-tile:hover { border-color: var(--brand); transform: translateY(-1px); }
.ads-tile > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ads-tile strong { font-size: 14px; }
.ads-tile small { font-size: 12px; color: var(--muted); }
.ads-tile .ci-chev { color: var(--faint); flex: none; }
@media (max-width: 420px) { .ads-strip { grid-template-columns: 1fr; } }
