/* Campaign announcements (assets/js/promo.js): top bar, popup, side card. */
/* The bar's place is held from the first paint (html.pr-wait, set by a one-line script in <head> unless the visitor closed it
   this session) and promo.js swaps it for the real bar of the same height, so nothing below jumps (CLS, audit 2026-11-13). */
:root { --pr-bar-h: 45px; }
@media (max-width: 640px) { :root { --pr-bar-h: 57px; } }
html.pr-wait body::before { content: ""; display: block; height: var(--pr-bar-h); background: var(--mcc-teal-900); border-bottom: 1px solid rgba(201, 162, 39, .35); box-sizing: border-box; }
.pr-bar {
  position: relative; z-index: 101; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding-block: 6px; padding-inline: max(48px, env(safe-area-inset-left, 0px)) max(48px, env(safe-area-inset-right, 0px));
  background: var(--mcc-teal-900); color: #e9f2f1; font-size: 14px; text-align: center; border-bottom: 1px solid rgba(201, 162, 39, .35);
  box-sizing: border-box; min-height: var(--pr-bar-h);
}
.pr-bar__msg b { color: var(--mcc-gold-300); }
@media (max-width: 640px) {
  .pr-bar { font-size: 13px; gap: 10px; padding-inline: 14px 44px; justify-content: space-between; height: var(--pr-bar-h); }
  .pr-bar__msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; }
}
.pr-bar__msg { margin: 0; min-width: 0; transition: opacity .3s, transform .3s; }
.pr-bar__msg.is-out { opacity: 0; transform: translateY(-6px); }
.pr-bar__msg b { font-weight: 700; }
.pr-pct { white-space: nowrap; color: var(--mcc-gold-300); }
.pr-bar__cta.btn { background: transparent; color: var(--mcc-gold-300); border: 1px solid rgba(241, 212, 145, .55); flex: none; min-height: 32px; }
.pr-bar__cta.btn:hover { background: rgba(241, 212, 145, .12); }
.pr-x {
  border: 0; background: rgba(0, 0, 0, .18); color: #fff; width: 30px; height: 30px; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; flex: none;
}
.pr-bar .pr-x { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); }
.pr-x:focus-visible, .pr-pop__later:focus-visible { outline: 3px solid #f4c46b; outline-offset: 2px; }

/* Popup (native <dialog>: focus stays inside, Escape closes) */
.pr-pop {
  border: 0; padding: 30px 26px 22px; width: min(440px, calc(100vw - 32px)); border-radius: 26px; text-align: center;
  background: #fff; color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 40, 40, .45); overflow: visible;
}
.pr-pop::backdrop { background: rgba(0, 30, 30, .55); backdrop-filter: blur(3px); }
.pr-pop[open] { animation: prPop .45s cubic-bezier(.2, .9, .3, 1.2); }
.pr-pop[open]::backdrop { animation: prFade .35s ease; }
@keyframes prPop { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes prFade { from { opacity: 0; } to { opacity: 1; } }
.pr-pop__x { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--tint); color: var(--ink); }
.pr-pop__badge {
  width: 118px; height: 118px; margin: -78px auto 14px; border-radius: 50%; display: grid; place-content: center; gap: 0;
  background: conic-gradient(from 210deg, var(--mcc-gold-500), #f4c46b, var(--mcc-gold-500), var(--mcc-gold-700), var(--mcc-gold-500)); color: #fff;
  box-shadow: 0 16px 36px -10px rgba(138, 90, 18, .6), inset 0 0 0 6px rgba(255, 255, 255, .25);
}
.pr-pop__badge b { font-size: 38px; line-height: 1.05; font-weight: 800; }
.pr-pop__badge span { font-size: 14px; font-weight: 600; }
.pr-pop h2 { margin: 0 0 6px; font-size: 26px; color: var(--mcc-primary); text-wrap: balance; }
.pr-pop p { margin: 0 0 10px; color: var(--muted); }
.pr-pop__ends { color: var(--mcc-gold-700) !important; font-weight: 600; }
.pr-pop__acts { display: grid; gap: 10px; margin: 16px 0 8px; }
.pr-pop__acts .btn { width: 100%; justify-content: center; }
.pr-terms { font-size: 12.5px; margin: 6px 0 0 !important; }
.pr-pop__later { margin-top: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* Side card: slides in from the side and back out by itself */
.pr-slide {
  position: fixed; z-index: 95; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); inset-inline-start: max(24px, env(safe-area-inset-left, 0px));
  width: 340px; max-width: calc(100vw - 32px); display: flex; gap: 14px; align-items: center; padding: 16px 18px; padding-inline-end: 44px;
  background: #fff; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 22px 50px -16px rgba(0, 40, 40, .4);
  transform: translateX(calc(100% + 40px)); opacity: 0; visibility: hidden;
  transition: transform .55s cubic-bezier(.2, .9, .3, 1), opacity .4s, visibility 0s .55s;
}
[dir="ltr"] .pr-slide { transform: translateX(calc(-100% - 40px)); }
.pr-slide.is-in { transform: none; opacity: 1; visibility: visible; transition: transform .55s cubic-bezier(.2, .9, .3, 1), opacity .4s; }
.pr-slide .pr-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 26px; height: 26px; font-size: 17px; background: var(--tint); color: var(--ink); }
.pr-slide__pct {
  flex: none; width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; font-size: 25px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--mcc-gold-500), var(--mcc-gold-700));
}
.pr-slide__body { display: grid; gap: 4px; min-width: 0; }
.pr-slide__body b { color: var(--mcc-primary); font-size: 16px; }
.pr-slide__body span { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.pr-slide__body .btn { justify-self: start; margin-top: 4px; }

@media (max-width: 640px) {
  .pr-bar { font-size: 13px; gap: 8px; padding-block: 8px; padding-inline: 12px 44px; flex-wrap: wrap; }
  .pr-bar__cta.btn { padding: 5px 12px; font-size: 13px; }
  .pr-slide { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); inset-inline: 12px; width: auto; max-width: none; }
  .pr-pop { padding: 26px 20px 18px; }
  .pr-pop__badge { width: 100px; height: 100px; margin-top: -66px; }
  .pr-pop__badge b { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .pr-slide, .pr-slide.is-in { transition: opacity .2s, visibility 0s; transform: none; }
  .pr-pop[open], .pr-pop[open]::backdrop { animation: none; }
  .pr-bar__msg { transition: none; }
}

@media (max-width: 760px) { .pr-x { width: 40px; height: 40px; } .pr-bar__cta.btn { min-height: 40px; } }

/* «from 99 SAR» campaigns (year-end offers, 2026-11-27) */
.pr-pop__badge small { font-size: 12.5px; font-weight: 600; line-height: 1; }
.pr-slide__pct--from { place-items: center; align-content: center; gap: 0; line-height: 1.05; font-size: 24px; }
.pr-slide__pct--from small { font-size: 11px; font-weight: 600; }
