/**
 * Feature 062 — "Posljednjih 30 doživotnih licenci po 149 €" campaign chrome (header widget + LTD
 * product page). Values follow the owner-approved HR mockup. Enqueued site-wide only while the quota
 * is live, and always on the LTD product page (inc/ltd-campaign.php). Palette from the shared chrome
 * tokens (body.dpd-chrome) with literal fallbacks, so it ports 1:1 to the SI child theme.
 */

/* ---------- 1. header widget (above #page, normal flow: the sticky header never shifts) ---------- */
.dpd-ltd-bar {
  --ltd-purple: #7C5CFF;
  --ltd-purple-soft: #B4A4FF;

  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 10px 16px;
  background: var(--ink, #16140F);
  color: var(--paper, #FBFAF7);
  box-shadow: inset 0 0 0 1px var(--ltd-purple);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: .03em;
  white-space: nowrap; /* one line */
}

.dpd-ltd-bar__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ltd-purple);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .25);
}

.dpd-ltd-bar__text b { color: #fff; font-weight: 700; }

.dpd-ltd-bar a.dpd-ltd-bar__cta {
  color: var(--ltd-purple-soft);
  font-weight: 700;
  text-decoration: none;
}
.dpd-ltd-bar a.dpd-ltd-bar__cta:hover,
.dpd-ltd-bar a.dpd-ltd-bar__cta:focus-visible { color: #fff; }
.dpd-ltd-bar a.dpd-ltd-bar__cta:focus-visible { outline: 2px solid var(--ltd-purple-soft); outline-offset: 2px; }

/* Phones: same single line, tighter, so the text and the link still fit a 400px screen. */
@media (max-width: 480px) {
  .dpd-ltd-bar { gap: 7px; padding: 10px 12px; font-size: 10px; letter-spacing: 0; }
  .dpd-ltd-bar__dot { width: 7px; height: 7px; box-shadow: 0 0 0 2px rgba(124, 92, 255, .25); }
}
@media (max-width: 360px) {
  .dpd-ltd-bar { font-size: 9px; gap: 6px; }
}

/* ---------- LTD product page price row, per the mockup: struck 199 €, bold 149 €, inline −25% flash ---------- */
/* Scoped by the `dpd-ltd-product` body class, so no other product page changes. */
body.dpd-ltd-product .summary p.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  margin: 0 0 10px;
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 120%;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: var(--ink, #16140F);
  font-variant-numeric: tabular-nums;
}
body.dpd-ltd-product .summary p.price del {
  font-family: "Inter", system-ui, sans-serif;
  font-stretch: 100%;
  font-weight: 500;
  font-size: 18px;
  color: var(--steel, #5A5347);
  opacity: 1;
}
body.dpd-ltd-product .summary p.price ins { text-decoration: none; font-weight: 700; }
/* the theme's detached bubble; the flash below sits inside the price row instead */
body.dpd-ltd-product .summary .sale-item.type-bubble { display: none; }
.dpd-ltd-flash {
  position: relative;
  top: -6px;
  padding: 4px 7px;
  border-radius: 2px;
  background: var(--red, #DC0028);
  color: #fff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-stretch: 100%;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .08em;
}
body.dpd-ltd-product .summary p.price .dpd-ltd-left { flex-basis: 100%; }

/* ---------- 5. under the LTD product price: purple, dot, hidden at 0 ---------- */
.dpd-ltd-left {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  color: #7C5CFF;
  font-variant-numeric: tabular-nums;
}
.dpd-ltd-left b { font-weight: 700; }
.dpd-ltd-left__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7C5CFF;
}

/* ---------- 6. meta line under the add-to-cart ---------- */
.dpd-ltd-meta {
  margin: 16px 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.5;
  color: var(--steel, #5A5347);
}

/* ---------- 7. multi-shop box below the add-to-cart: white, 3px purple left rule, no eyebrow ---------- */
.dpd-ltd-box {
  margin-top: 22px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line, #E1DCD1);
  border-left: 3px solid #7C5CFF;
  border-radius: 3px;
}
.dpd-ltd-box b {
  display: block;
  margin: 0 0 4px;
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 112%;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink, #16140F);
}
.dpd-ltd-box p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft, #3A352D);
}
.dpd-ltd-box a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--red, #DC0028);
  text-decoration: none;
}
.dpd-ltd-box a:hover,
.dpd-ltd-box a:focus-visible { text-decoration: underline; }
