/* ════════════════════════════════════════════════════════════════════
   A7 Wallpapers — public page styles (scoped to .a7wp)
   Theme-aware via DaisyUI vars on a7.ae (light/dark follow the site).
   14px radius, font: inherit (site font_ar/font_en). RTL.
   ════════════════════════════════════════════════════════════════════ */

.a7wp-main {
  min-height: 100svh;
  width: 100%;
  display: flex;
  justify-content: center;   /* center the content column on desktop */
}

.a7wp {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px 0;
  direction: rtl;
  font-family: inherit;
  color: hsl(var(--base-content));
  box-sizing: border-box;
}
.a7wp *, .a7wp *::before, .a7wp *::after { box-sizing: border-box; }

/* ── Showcase: auto-scroll marquee strip ─────────────────────────── */
.a7wp-showcase {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.a7wp-showcase__track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: a7wp-marquee 60s linear infinite;
}
/* Pause/resume is JS-controlled (pause on interaction, auto-resume after 4s).
   The .is-paused class is toggled by the injector. */
.a7wp-showcase__track.is-paused { animation-play-state: paused; }
@keyframes a7wp-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); } /* list is duplicated → seamless loop */
}
.a7wp-show {
  flex: 0 0 auto;
  width: 122px;
  height: 217px;            /* 9:16 */
  border: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 24px -16px rgba(0,0,0,.5);
  /* Shimmer while the image loads (cleared on load). */
  background: linear-gradient(90deg,
    hsl(var(--base-200)) 25%, hsl(var(--base-300)) 50%, hsl(var(--base-200)) 75%);
  background-size: 200% 100%;
  animation: a7wp-skel 1.3s ease-in-out infinite;
}
.a7wp-show.is-loaded { animation: none; background: hsl(var(--base-200)); }
@media (prefers-reduced-motion: reduce) { .a7wp-show { animation: none; } }
.a7wp-show img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .35s ease;
}
.a7wp-show img.is-on { opacity: 1; }

/* ── Spinners (page loader + modal image loader) ─────────────────── */
@keyframes a7wp-spin { to { transform: rotate(360deg); } }
.a7wp-spin {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid color-mix(in oklch, hsl(var(--base-content)) 16%, transparent);
  border-top-color: hsl(var(--primary));
  animation: a7wp-spin .8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .a7wp-spin { animation: none; } }

/* ── Skeleton loaders (content-shaped placeholders + shine, like
   Instagram/YouTube) shown while real content loads. ──────────────── */
/* Clearly-visible sweeping shimmer (same technique as the cards section). */
.a7wp-sk {
  background: linear-gradient(90deg,
    hsl(var(--base-200)) 25%, hsl(var(--base-300)) 50%, hsl(var(--base-200)) 75%);
  background-size: 200% 100%;
  animation: a7wp-skel 1.3s ease-in-out infinite;
  border-radius: 14px; overflow: hidden;
}
@keyframes a7wp-skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .a7wp-sk { animation: none; } }
.a7wp-sk--card { aspect-ratio: 9 / 16; }                 /* grid + showcase cards */
.a7wp-sk--show { flex: 0 0 auto; width: 122px; height: 217px; }
/* Lightbox skeleton — layout-only override. The base .a7wp-sk class already
   has the shimmer gradient + animation that the grid cards use, so we
   simply position this variant to fill the lightbox box. Inheriting the
   exact same look means visual consistency with the grid for free. */
.a7wp-sk--lb {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: inherit; z-index: 1;
}
@media (prefers-reduced-motion: reduce) { .a7wp-sk::after { animation: none; } }

/* ── breadcrumb (always first) ──────────────────────────────────── */
.a7wp-bc { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; padding: 0 16px; margin: 2px 0 10px; color: hsl(var(--base-content)); }
/* Breadcrumb links are functional navigation — keep them above the AA floor. */
.a7wp-bc__a { color: hsl(var(--base-content)); opacity: .78; text-decoration: none; transition: opacity .15s; }
.a7wp-bc__a:hover { opacity: 1; }
.a7wp-bc__sep { opacity: .55; }
.a7wp-bc__cur { font-weight: 700; opacity: .9; }

/* ── «الخلفيات» section-name title row with fading hairlines (matches cards) ── */
.a7wp-titlerow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  margin: 2px 0 12px;
}
/* Hairline solid AT the title, fading to transparent toward the OUTER edge (LTR + RTL). */
.a7wp-fadeline {
  flex: 1;
  height: 1px;
}
.a7wp-fadeline:first-child { background: linear-gradient(to left,  color-mix(in oklch, hsl(var(--base-content)) 22%, transparent), transparent); }
.a7wp-fadeline:last-child  { background: linear-gradient(to right, color-mix(in oklch, hsl(var(--base-content)) 22%, transparent), transparent); }
[dir="rtl"] .a7wp-fadeline:first-child { background: linear-gradient(to right, color-mix(in oklch, hsl(var(--base-content)) 22%, transparent), transparent); }
[dir="rtl"] .a7wp-fadeline:last-child  { background: linear-gradient(to left,  color-mix(in oklch, hsl(var(--base-content)) 22%, transparent), transparent); }
/* ── Reorderable fade divider between the options row and the content ── */
.a7wp-divider { height: 1px; border: 0; width: 100%; max-width: 440px; margin: 22px auto; background: linear-gradient(90deg, transparent, color-mix(in oklch, hsl(var(--base-content)) 22%, transparent) 50%, transparent); }
.a7wp-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .4px;   /* LTR only — reset for RTL below (gaps break Arabic joining) */
  color: hsl(var(--base-content));
  white-space: nowrap;
}
/* Positive letter-spacing inserts gaps between joined Arabic letterforms —
   an Arabic-typography anti-pattern. Reset to normal for RTL. */
[dir="rtl"] .a7wp-title { letter-spacing: normal; }

/* ── Grid: 3 columns ─────────────────────────────────────────────── */
.a7wp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* mobile: 2 columns */
  gap: 12px;
}
@media (min-width: 520px)  { .a7wp-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px)  { .a7wp-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .a7wp-grid { grid-template-columns: repeat(5, 1fr); } }

.a7wp-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  box-shadow: 0 8px 20px -16px rgba(0,0,0,.55);
  /* Shimmer while the wallpaper image loads (cleared on load). */
  background: linear-gradient(90deg,
    hsl(var(--base-200)) 25%, hsl(var(--base-300)) 50%, hsl(var(--base-200)) 75%);
  background-size: 200% 100%;
  animation: a7wp-skel 1.3s ease-in-out infinite;
}
.a7wp-card.is-loaded { animation: none; background: hsl(var(--base-200)); }
@media (prefers-reduced-motion: reduce) { .a7wp-card { animation: none; } }
.a7wp-card__img {
  position: absolute; inset: 0;
  border: 0; padding: 0; margin: 0;
  width: 100%; height: 100%;
  cursor: pointer; background: transparent;
}
.a7wp-card__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .35s ease;       /* fade in once loaded */
}
.a7wp-card__img img.is-on { opacity: 1; }
.a7wp-card__bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px;
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
  opacity: 0;
  transition: opacity .18s;
}
.a7wp-card:hover .a7wp-card__bar,
.a7wp-card:focus-within .a7wp-card__bar { opacity: 1; }
@media (hover: none) { .a7wp-card__bar { opacity: 1; } } /* touch: always show */

.a7wp-ibtn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  /* Frosted glass that follows the site theme (light/dark) — less
     transparent (more solid) so the icons read clearly over any image. */
  background: color-mix(in oklch, hsl(var(--base-100)) 80%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.5);
          backdrop-filter: blur(10px) saturate(1.5);
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 16%, transparent);
  color: hsl(var(--base-content));
  box-shadow: 0 4px 14px -5px rgba(0,0,0,.4);
  transition: transform .12s, background .16s;
}
.a7wp-ibtn:hover { background: color-mix(in oklch, hsl(var(--base-100)) 92%, transparent); }
.a7wp-ibtn:active { transform: scale(.9); }
.a7wp-ibtn svg { width: 17px; height: 17px; }

/* ── Pager (numbered mode) ───────────────────────────────────────── */
.a7wp-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  /* Balanced spacing: equal gap above (from the grid) and below (to the
     footer) — the footer adds the matching 44px on its side. */
  margin: 44px 0 0;
}
.a7wp-pager__btn {
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 16%, transparent);
  background: transparent;
  color: hsl(var(--base-content));
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 20px; border-radius: 14px; cursor: pointer;
}
.a7wp-pager__btn:disabled { opacity: .4; cursor: default; }
.a7wp-pager__info { font-size: 13px; font-weight: 700; opacity: .7; }

/* Empty / no-results — themed glyph + heading + muted sub (+ Clear-filters when
   a query/category is active), mirroring the .a7cs- closure vocabulary at a
   smaller scale (same family as .a7wp-error). */
.a7wp-empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 10px; padding: 48px 16px;
}
.a7wp-empty__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  color: hsl(var(--primary));
  background: color-mix(in oklch, hsl(var(--primary)) 12%, transparent);
}
.a7wp-empty__icon svg { width: 26px; height: 26px; }
.a7wp-empty__title { font-weight: 800; font-size: 16px; color: hsl(var(--base-content)); }
.a7wp-empty__sub {
  font-size: 13px; font-weight: 600; max-width: 320px;
  color: color-mix(in oklch, hsl(var(--base-content)) 72%, hsl(var(--base-100)));
}
.a7wp-empty__clear {
  margin-top: 4px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 14px;
  font: inherit; font-weight: 700; cursor: pointer;
  background: hsl(var(--primary)); color: hsl(var(--primary-content, var(--base-100)));
}
.a7wp-empty__clear:hover { filter: brightness(1.05); }

/* Grid load-failure state — themed icon + heading + subtext + Retry, mirroring
   the .a7cs- closure vocabulary at a smaller scale. Distinct from .a7wp-empty
   so a transient outage never reads as an empty section. */
.a7wp-error {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 10px; padding: 48px 16px;
}
.a7wp-error__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  color: hsl(var(--primary));
  background: color-mix(in oklch, hsl(var(--primary)) 12%, transparent);
}
.a7wp-error__icon svg { width: 26px; height: 26px; }
.a7wp-error__title { font-weight: 800; font-size: 16px; color: hsl(var(--base-content)); }
.a7wp-error__sub {
  font-size: 13px; font-weight: 600;
  color: color-mix(in oklch, hsl(var(--base-content)) 72%, hsl(var(--base-100)));
}
.a7wp-error__retry {
  margin-top: 4px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 14px;
  font: inherit; font-weight: 700; cursor: pointer;
  background: hsl(var(--primary)); color: hsl(var(--primary-content, var(--base-100)));
}
.a7wp-error__retry:hover { filter: brightness(1.05); }

/* Shared focus ring — keyboard users get a visible, theme-tinted outline on
   every interactive control (SHARED DESIGN SPEC). */
.a7wp :focus-visible,
.a7wp-error__retry:focus-visible,
/* lightbox controls are appended to <body> (outside .a7wp) → need their own selectors */
.a7wp-lclose:focus-visible, .a7wp-lbnav:focus-visible, .a7wp-tbtn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }

/* Toolbar host — the filter/sort/search cluster is rendered + styled by the
   shared A7Toolbar module (.a7ut*, /static/apps/a7-toolbar.js). min-height
   reserves the control row so the layout never jumps while the async module
   loads (A7Boot standard: twin pills fill it from the first paint). */
.a7wp-toolbar { margin: 0 0 14px; min-height: 44px; }

/* ── Ads woven into the grid AS CARDS (same 9:16 size as a wallpaper,
   so the ad blends in like content — matches the old section: the ad
   fills the card via absolute inset-0). ───────────────────────────── */
.a7wp-ad {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 9 / 16;             /* identical to .a7wp-card */
  background: color-mix(in oklch, hsl(var(--base-content)) 5%, transparent);   /* old: bg-base-content/5 */
}
/* Loading shine behind the ad — EXACT match to the old section's
   `bg-gradient-to-r from-transparent via-base-content/20 to-transparent
   animate-shine` (shine 2s linear infinite, skewX(-15deg)). */
.a7wp-ad__sk {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(to right, transparent,
    color-mix(in oklch, hsl(var(--base-content)) 20%, transparent), transparent);
  transform: translateX(-100%) skewX(-15deg);
  animation: a7wp-shine 2s linear infinite;
}
@keyframes a7wp-shine {
  0%   { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(200%)  skewX(-15deg); }
}
@media (prefers-reduced-motion: reduce) { .a7wp-ad__sk { animation: none; } }
.a7wp-ad .adsbygoogle {
  position: absolute; inset: 0; z-index: 1;
  display: block; width: 100%; height: 100%;
}
/* Always-visible "Ad / إعلان" disclosure so sponsored cards are honestly
   distinguished from editorial wallpapers (trust + legal disclosure). Frosted
   like the CTA pill, pinned to the top reading-start corner, above the image. */
.a7wp-ad__ad {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .2px;
  color: #fff; background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(6px) saturate(1.4); backdrop-filter: blur(6px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.28);
  pointer-events: none;
}
.a7wp-ad__native { position: absolute; inset: 0; display: block; text-decoration: none; }
.a7wp-ad__native img { width: 100%; height: 100%; display: block; object-fit: cover; }
.a7wp-ad__cap {
  position: absolute; inset-inline: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
  color: #fff; font-family: inherit;
}
/* Banner name — centered glassy pill (A7 standard). */
.a7wp-ad__t {
  font-weight: 700; font-size: 13px; color: #fff;
  padding: 5px 16px; border-radius: 999px;
  background: rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(6px) saturate(1.4);
          backdrop-filter: blur(6px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: transform .15s ease, background .15s, border-color .15s;
}
.a7wp-ad__native:hover .a7wp-ad__t {
  transform: scale(1.07);
  background: rgba(0,0,0,.62);
  border-color: rgba(255,255,255,.55);
}
/* CTA line icon inside the pill — same icon theme as the dashboard.
   display:inline-block overrides the site's global svg{display:block}
   (Tailwind preflight) which pushed the icon onto its own line. */
.a7wp-ad__ti {
  display: inline-block;
  width: 15px; height: 15px;
  vertical-align: -3px;
  margin-inline-end: 6px;
}
.a7wp-ad__b {
  background: hsl(var(--primary)); color: hsl(var(--primary-content));
  padding: 6px 14px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.a7wp-sentinel { height: 1px; width: 100%; }

/* ── Preview: FLIP lightbox + frosted share sheet + toasts ────── */
.a7wp-ov { position: fixed; inset: 0; z-index: 9000; background: rgba(8,8,11,.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .3s cubic-bezier(.32,.72,0,1); }
.a7wp-ov.show { opacity: 1; pointer-events: auto; }
.a7wp-lb { position: fixed; z-index: 9001; display: none; overflow: hidden;
  box-shadow: 0 30px 80px -22px rgba(0,0,0,.7); will-change: transform; }
.a7wp-lb__img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; user-select: none; }
.a7wp-lb__img { transition: opacity .2s ease; }
.a7wp-lbspin { position: absolute; inset: 0; z-index: 2; display: none; align-items: center; justify-content: center; pointer-events: none; }
.a7wp-lbspin.show { display: flex; }
.a7wp-lbspin::before { content: ''; position: absolute; width: 58px; height: 58px; border-radius: 50%; background: rgba(0,0,0,.4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.a7wp-lbspin .a7wp-bspin { position: relative; width: 30px; height: 30px; border-width: 3px; }
.a7wp-lclose { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 16%, transparent);
  background: color-mix(in oklch, hsl(var(--base-100)) 80%, transparent); color: hsl(var(--base-content));
  -webkit-backdrop-filter: blur(10px) saturate(1.5); backdrop-filter: blur(10px) saturate(1.5);
  box-shadow: 0 4px 14px -5px rgba(0,0,0,.45); transition: transform .12s, background .16s; }
.a7wp-lclose:hover { background: color-mix(in oklch, hsl(var(--base-100)) 92%, transparent); }
.a7wp-lclose:active { transform: scale(.92); }
.a7wp-lclose svg { width: 18px; height: 18px; }
.a7wp-lbx { position: fixed; inset: 0; z-index: 9003; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.a7wp-lbx.show { opacity: 1; }
.a7wp-lbnav { position: fixed; pointer-events: auto; width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 16%, transparent);
  background: color-mix(in oklch, hsl(var(--base-100)) 80%, transparent); color: hsl(var(--base-content));
  -webkit-backdrop-filter: blur(10px) saturate(1.5); backdrop-filter: blur(10px) saturate(1.5);
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); transition: transform .12s, background .16s; }
.a7wp-lbnav:hover { background: color-mix(in oklch, hsl(var(--base-100)) 92%, transparent); }
.a7wp-lbnav:active { transform: scale(.9); }
.a7wp-lbnav svg { width: 22px; height: 22px; }
.a7wp-lbbar { position: fixed; z-index: 9002; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; pointer-events: none; text-align: center; transition: opacity .2s ease; }
.a7wp-lbbar.show { opacity: 1; pointer-events: auto; }
.a7wp-lbbar__t { color: #fff; font-weight: 800; font-size: 16px; }
.a7wp-lbbar__m { color: #fff; opacity: .7; font-weight: 600; font-size: 13px; margin-top: -4px; }
.a7wp-lbbar__row { display: flex; flex-wrap: nowrap; justify-content: center; gap: 10px; margin-top: 4px; }
.a7wp-tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.14); color: #fff; font: inherit; font-weight: 700; font-size: 14px;
  white-space: nowrap; flex-shrink: 0; min-width: 132px; padding: 12px 18px; border-radius: 14px; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .12s, background .16s, opacity .16s; }
.a7wp-tbtn:active { transform: scale(.96); }
.a7wp-tbtn svg { width: 18px; height: 18px; }
.a7wp-tbtn--primary { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-content)); }
.a7wp-tbtn.is-busy { opacity: .9; }
.a7wp-tbtn.is-busy svg, .a7wp-tbtn.is-done svg { display: none; }
.a7wp-bspin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: a7wp-bspin .7s linear infinite; }
@keyframes a7wp-bspin { to { transform: rotate(360deg); } }
@media (max-width: 400px) {
  .a7wp-tbtn { min-width: 0; flex: 1 1 0; padding: 12px 10px; font-size: 13.5px; }
  .a7wp-lbbar__row { width: min(92vw, 360px); }
}
html.a7wp-noscroll { overflow: hidden !important; }

/* Share is delegated entirely to the shared A7Share module (openShareSheet →
   window.A7Share.open); the old local frosted-sheet CSS was dead and hardcoded
   rgba white + a .dark selector the DaisyUI site never sets — removed. */

/* toasts (stack, bottom-center) */
.a7wp-toaster { position: fixed; z-index: 9200; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.a7wp-toast { background: rgba(20,20,24,.92); color: #fff; font-weight: 700; font-size: 13.5px;
  padding: 11px 20px; border-radius: 999px; box-shadow: 0 12px 30px -8px rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(120%); transition: opacity .35s, transform .35s cubic-bezier(.32,.72,0,1); }
@media (prefers-reduced-motion: reduce) { .a7wp-ov, .a7wp-toast, .a7wp-lbbar { transition: none; } }

/* ── Site footer (matches cards / host footer) ───────────────────── */
.a7-site-footer {
  width: 100%;
  margin: 44px auto 0;
  padding: 36px 16px calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
  border-top: 1px solid color-mix(in oklch, hsl(var(--base-content)) 9%, transparent);
  font-family: inherit;
  color: hsl(var(--base-content));
}
.a7-site-footer__logo { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
[dir="rtl"] .a7-site-footer__logo { letter-spacing: normal; }   /* keep Arabic letters joined */
.a7-site-footer__copy { font-size: 13.5px; font-weight: 600; opacity: .72; }
.a7-site-footer__social { display: flex; align-items: center; gap: 22px; margin-top: 4px; }
.a7-site-footer__ico {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; width: 40px; height: 40px; border-radius: 50%;
  color: hsl(var(--base-content)); opacity: .75; text-decoration: none;
  transition: opacity .18s, transform .12s, background .18s;
}
.a7-site-footer__ico:hover {
  opacity: 1; transform: translateY(-2px);
  background: color-mix(in oklch, hsl(var(--base-content)) 8%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  /* Freeze the marquee AND give it a real horizontal-scroll fallback so every
     featured tile past the first viewport stays reachable (was overflow:hidden
     → permanently unreachable when the animation is off). */
  .a7wp-showcase { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .a7wp-showcase__track { animation: none; }
}


/* ════════════════════════════════════════════════════════════════════
   "Section closed / coming soon" screen — rendered by renderMaintenance()
   when maintenance_mode is on. Theme-aware: colors come from the host
   DaisyUI vars (--base-content / --base-100/200 / --primary), so it
   follows the site's light/dark automatically. All classes are a7cs-*.
   ════════════════════════════════════════════════════════════════════ */
.a7cs-wrap {
  /* map the site theme → local tokens (one place to retune) */
  --cs-accent:        hsl(var(--primary));
  --cs-accent-press:  color-mix(in oklch, hsl(var(--primary)) 82%, #000);
  --cs-accent-soft:   color-mix(in oklch, hsl(var(--primary)) 12%, transparent);
  --cs-text:          hsl(var(--base-content));
  --cs-muted:         color-mix(in oklch, hsl(var(--base-content)) 72%, hsl(var(--base-100)));
  /* Never dim TEXT with `transparent` (unpredictable over tinted surfaces) and
     never below AA — mix toward the surface and keep >=70%. */
  --cs-faint:         color-mix(in oklch, hsl(var(--base-content)) 70%, hsl(var(--base-100)));
  --cs-surface-2:     hsl(var(--base-200));
  --cs-border:        color-mix(in oklch, hsl(var(--base-content)) 12%, transparent);
  --cs-border-strong: color-mix(in oklch, hsl(var(--base-content)) 18%, transparent);

  min-height: 74vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 22px;
  font-family: inherit;          /* use the site's font */
  color: var(--cs-text);
  background: radial-gradient(120% 80% at 50% -10%,
    color-mix(in oklch, hsl(var(--base-content)) 5%, transparent), transparent 60%);
}
.a7cs-card { width: 100%; max-width: 560px; text-align: center; display: flex; flex-direction: column; align-items: center; }

.a7cs-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: var(--cs-accent-soft); color: var(--cs-accent); font-size: 13px; font-weight: 700;
  margin-bottom: 30px; border: 1px solid color-mix(in oklch, hsl(var(--primary)) 22%, transparent);
}
.a7cs-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cs-accent); position: relative; }
.a7cs-pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--cs-accent);
  animation: a7cs-pulse 1.8s cubic-bezier(.22,.61,.36,1) infinite;
}
@keyframes a7cs-pulse { 0% { transform: scale(1); opacity: .6 } 70% { transform: scale(3); opacity: 0 } 100% { opacity: 0 } }

.a7cs-iconwrap { position: relative; width: 128px; height: 128px; margin-bottom: 34px; display: flex; align-items: center; justify-content: center; }
.a7cs-ring { position: absolute; inset: 0; border-radius: 34px; border: 1.5px solid var(--cs-border-strong); animation: a7cs-floaty 5s ease-in-out infinite; }
.a7cs-ring--b { inset: -14px; border-radius: 42px; opacity: .5; animation-delay: .4s; }
.a7cs-iconbox {
  width: 96px; height: 96px; border-radius: 28px;
  background: linear-gradient(155deg, hsl(var(--primary)), var(--cs-accent-press));
  display: flex; align-items: center; justify-content: center; color: hsl(var(--primary-content));
  box-shadow: 0 14px 34px -10px color-mix(in oklch, hsl(var(--primary)) 45%, transparent);
  animation: a7cs-floaty 5s ease-in-out infinite;
}
.a7cs-iconbox svg { width: 48px; height: 48px; }
@keyframes a7cs-floaty { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }

.a7cs-title {
  font-family: inherit; font-weight: 800; font-size: clamp(22px, 3.8vw, 28px);
  line-height: 1.3; margin: 0 0 14px; letter-spacing: -.3px; color: var(--cs-text); text-wrap: balance;
}
/* Tightening letter-spacing collapses joined Arabic glyphs — reset for RTL. */
.a7cs-wrap[dir="rtl"] .a7cs-title { letter-spacing: normal; }
.a7cs-sub { font-size: clamp(15px, 2.4vw, 18px); color: var(--cs-muted); line-height: 1.7; margin: 0 0 34px; max-width: 430px; }

.a7cs-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.a7cs-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 50px; padding: 0 24px; border-radius: 14px;
  font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; border: none; font-family: inherit;
  transition: transform .08s, background .14s;
}
.a7cs-btn svg { width: 18px; height: 18px; }
/* Back-arrow points toward "home" per reading direction (flips in RTL). */
.a7cs-wrap[dir="rtl"] .a7cs-btn svg { transform: scaleX(-1); }
.a7cs-btn:active { transform: scale(.97); }
.a7cs-btn--primary {
  background: hsl(var(--primary)); color: hsl(var(--primary-content));
  box-shadow: 0 6px 18px -4px color-mix(in oklch, hsl(var(--primary)) 55%, transparent);
}
.a7cs-btn--primary:hover { background: var(--cs-accent-press); }

.a7cs-progress { margin-top: 40px; width: 100%; max-width: 300px; }
.a7cs-bar { height: 6px; border-radius: 999px; background: var(--cs-surface-2); overflow: hidden; border: 1px solid var(--cs-border); }
.a7cs-fill { height: 100%; width: var(--cs-progress, 68%); border-radius: 999px; background: linear-gradient(90deg, hsl(var(--primary)), var(--cs-accent-press)); animation: a7cs-grow 2.4s cubic-bezier(.22,.61,.36,1) both; }
@keyframes a7cs-grow { from { width: 0 } to { width: var(--cs-progress, 68%) } }
.a7cs-lbl { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--cs-faint); }

@media (prefers-reduced-motion: reduce) {
  .a7cs-ring, .a7cs-iconbox, .a7cs-pulse::after, .a7cs-fill { animation: none !important; }
}

/* ============ A7 Featured — Gold Frame (generic, shared a7- classes) ============
   The frame is drawn OUTSIDE the card via ::before/::after so it bleeds into the
   grid gap (14px) — the featured card keeps the EXACT size + position of its
   siblings. --a7-radius = the section's visible-card radius; --a7-page-bg defaults
   to the live theme bg so the 4px gap auto-matches light/dark. */
/* ONE prominence signal: a STATIC gold hairline frame + a single small crown.
   No perpetual motion (the old scale-bob sub-pixel-blurred the art and nudged
   neighbours); the shine is a one-shot on load, not an infinite loop. */
.a7-featured{ position: relative; border-radius: var(--a7-radius); }
.a7-featured::before{                 /* static gold ring (3px), bleeds 7px out */
  content:""; position:absolute; inset:-7px; z-index:0; pointer-events:none;
  border-radius: calc(var(--a7-radius) + 7px);
  background: linear-gradient(135deg,#ffe9a8,#f6b321,#d4881a,#ffe9a8);
  box-shadow: 0 16px 38px -14px rgba(214,150,20,.7);
}
.a7-featured::after{                  /* page-bg gap (4px) between ring and card */
  content:""; position:absolute; inset:-4px; z-index:1; pointer-events:none;
  border-radius: calc(var(--a7-radius) + 4px);
  background: var(--a7-page-bg, hsl(var(--base-100)));
}
.a7-featured__card{ position:relative; z-index:2; }
/* Small crown sits INSIDE the top edge (top:8px) so it can never overlap the
   toolbar / row above or nudge adjacent grid cells. */
.a7-featured__crown{
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  z-index: 8; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg,#ffe08a,#f6b321); color: #5a3c05;
  box-shadow: 0 4px 12px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.7);
  border: 2px solid rgba(255,255,255,.6);
}
.a7-featured__crown svg{ width: 22px; height: 22px; }
.a7-shine{ position: relative; overflow: hidden; }
.a7-shine::after{                     /* one-shot sheen on first paint only */
  content: ""; position: absolute; top: -20%; left: -60%;
  width: 42%; height: 150%; z-index: 4; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg); animation: a7-shimmer 1.15s ease-out .15s 1 both;
}
@keyframes a7-shimmer{ 0%{left:-60%} 100%{left:135%} }
@media (prefers-reduced-motion: reduce){
  .a7-shine::after{ animation: none; }
}
