/* Sale flags (apps/subscriptions/sale_flags.py): public bar, dashboard pill,
   page-title ribbon. Loaded by home/home-tmp.html and admin/parts/top-part.html.
   Themes are solid colors on purpose (the theme layer strips gradient-only
   backgrounds). RTL-safe: logical properties only; the arrow flips. */

.mk-flag--red    { --fl-bg: #dc2626; --fl-fg: #fff;    --fl-tag-bg: #fff;    --fl-tag-fg: #dc2626; }
.mk-flag--dark   { --fl-bg: #0b0b12; --fl-fg: #fff;    --fl-tag-bg: #facc15; --fl-tag-fg: #111; }
.mk-flag--accent { --fl-bg: var(--mk-accent-solid, #4746B4); --fl-fg: #fff; --fl-tag-bg: #fff; --fl-tag-fg: var(--mk-accent-solid, #4746B4); }
.mk-flag--gold   { --fl-bg: #f59e0b; --fl-fg: #1f1300; --fl-tag-bg: #1f1300; --fl-tag-fg: #fde68a; }
.mk-flag--green  { --fl-bg: #047857; --fl-fg: #fff;    --fl-tag-bg: #fff;    --fl-tag-fg: #047857; }

.mk-flag__ico { flex: none; display: inline-grid; place-items: center; }
.mk-flag__svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mk-flag__tag { flex: none; font-weight: 800; font-size: 12px; line-height: 1; padding: 4px 8px; border-radius: 999px;
                background: var(--fl-tag-bg); color: var(--fl-tag-fg); font-variant-numeric: tabular-nums; }
.mk-flag__head { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-flag__ends { flex: none; opacity: .85; white-space: nowrap; }
.mk-flag__arrow { display: inline-block; }
[dir="rtl"] .mk-flag__arrow { transform: scaleX(-1); }

/* Public site bar. The site header (.mh) is fixed at the top: the bar is fixed
   above it, the header moves down by the bar height, and .mk-flag-bar-space
   keeps that height in the page flow. Removing the bar (dismiss) undoes all three. */
.mk-flag-bar-space { --mk-flag-h: 42px; height: var(--mk-flag-h); }
.mk-flag-bar-space .mk-flag-bar { position: fixed; top: 0; inset-inline: 0; z-index: 70; height: var(--mk-flag-h); }
/* site_v2.css pins the header with `body.ms-site #navbar.mh { inset:0 0 auto 0 !important; top:0 !important }` — match its specificity. */
body.ms-site:has(.mk-flag-bar-space) #navbar.mh, body.ms-site:has(.mk-flag-bar-space) #navbar.mh.glass-effect,
body:has(.mk-flag-bar-space) .mh { inset: 42px 0 auto 0 !important; top: 42px !important; }
.mk-flag-bar { position: relative; z-index: 60; background: var(--fl-bg); color: var(--fl-fg); font-size: 13.5px; }
.mk-flag-bar__in { max-width: 1200px; margin: 0 auto; height: 100%; min-height: 42px; padding: 0 48px; overflow: hidden; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 10px; }
.mk-flag-bar .mk-flag__head { font-weight: 700; }
.mk-flag-bar .mk-flag__cta { flex: none; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.mk-flag-bar .mk-flag__cta:hover { color: inherit; opacity: .9; }
.mk-flag-bar__x { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px;
                  border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: .8; }
.mk-flag-bar__x:hover { opacity: 1; background: rgba(255,255,255,.14); }
@media (max-width: 767.98px) {
  .mk-flag-bar__in { justify-content: flex-start; padding-inline: 12px 44px; font-size: 12.5px; gap: 8px; }
  .mk-flag-bar .mk-flag__ends, .mk-flag-bar .mk-flag__ico { display: none; }
}

/* Dashboard header pill */
.mk-flag-pill { align-items: center; gap: 8px; height: 36px; max-width: 360px; padding-inline: 8px 12px; border-radius: 999px;
                background: var(--fl-bg); color: var(--fl-fg); text-decoration: none; font-size: 13px; font-weight: 600;
                transition: filter .15s, transform .15s; }
.mk-flag-pill:hover { color: var(--fl-fg); filter: brightness(1.08); transform: translateY(-1px); }

