/* Generated by build.mjs from the hinduismtoday.com site project — edit the sources there, not this file. */
/* =================================================================
   HT Site Banner — shared by the live site (SiteBanner.astro) and the
   wp-admin live preview (ht-banner.php). Edit HERE, then run
   `node scripts/sync-banner-plugin.mjs` to copy it into the plugin.
   The site's own vocabulary: a faint magazine painting at both edges,
   Source Serif display, Inter UI, sky buttons, the diya, and a slim
   progress bar drawn as a dawn, with a rising sun at today's total.
   A slim band: label + heading on one line, progress on one line.
   Container queries, so the admin can preview the phone layout.
================================================================== */
.ht-banner-slot { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.2,.8,.2,1); }
.ht-banner-slot.is-open { grid-template-rows: 1fr; }
.ht-banner-slot.no-anim { transition: none; }
.ht-banner-slot > .ht-banner { min-height: 0; overflow: hidden; }
.ht-banner-slot[hidden] { display: none; }

.ht-banner {
  container-type: inline-size;
  position: relative; isolation: isolate;
  color: var(--hb-fg);
  background: linear-gradient(105deg, var(--hb-bg) 0%, var(--hb-bg2) 100%);
  font-family: 'Inter Variable', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* the magazine painting, faintly, at BOTH edges; the middle stays clean */
.ht-banner::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--art, none); background-size: cover; background-position: center 30%;
  opacity: var(--hb-art, .09); filter: sepia(.4);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 24%, transparent 68%, #000 100%);
          mask-image: linear-gradient(90deg, #000 0%, transparent 24%, transparent 68%, #000 100%);
}
/* a gild thread along the bottom edge */
.ht-banner::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--hb-fill) 20%, var(--hb-fill) 80%, transparent);
  opacity: .45;
}

.ht-banner__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 8px 52px 9px 20px;
  display: grid; align-items: center; column-gap: 22px; row-gap: 4px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "lamp text actions" "lamp progress progress";
}
.ht-banner__inner.no-progress { grid-template-areas: "lamp text actions"; }
.ht-banner__lamp { grid-area: lamp; align-self: center; width: 32px; display: flex; justify-content: center; }
.ht-banner__lamp .diya { --d: .64; }
.ht-banner__text { grid-area: text; min-width: 0; }
.ht-banner__progress { grid-area: progress; min-width: 0; }
.ht-banner__actions { grid-area: actions; display: flex; gap: 8px; align-items: center; }

/* label and heading on one line */
.ht-banner__title { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; }
.ht-banner__eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--hb-eyebrow); white-space: nowrap;
}
.ht-banner__heading {
  font-family: 'Source Serif 4 Variable', 'Source Serif 4', Georgia, serif;
  font-size: 19px; line-height: 1.25; font-weight: 600; letter-spacing: -.005em;
  color: var(--hb-heading, var(--hb-fg));
}
.ht-banner__msg { margin: 1px 0 0; font-size: 13.5px; line-height: 1.4; opacity: .86; }
.ht-banner__msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* progress on one line: $raised caption [bar] 62% 312 gifts · 23 days left */
.ht-banner__progress { display: flex; align-items: center; gap: 14px; }
.ht-banner__figures { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; flex: none; }
.ht-banner__raised {
  font-family: 'Source Serif 4 Variable', 'Source Serif 4', Georgia, serif;
  font-size: 19px; font-weight: 650; line-height: 1; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums;
}
.ht-banner__caption { font-size: 12.5px; opacity: .8; }
.ht-banner__pct { flex: none; font-size: 12.5px; font-weight: 700; color: var(--hb-pct, var(--hb-fill)); font-variant-numeric: tabular-nums; }
.ht-banner__meta { flex: none; font-size: 12px; opacity: .75; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* the bar is a dawn: the fill runs from night-indigo through rose to
   saffron, and today's total is a rising sun with slowly turning rays */
.ht-banner__bar {
  position: relative; flex: 1 1 auto; min-width: 120px; height: 8px; border-radius: 99px;
  background: var(--hb-track, rgba(0,0,0,.14));
  box-shadow: inset 0 1px 1.5px rgba(0,0,0,.14);
}
.ht-banner__fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, #1f2c5c 0%, #5b3a7a 30%, #b8517a 58%, #ef8a3a 82%, #ffc24a 100%);
  transition: width 1.6s cubic-bezier(.22,.8,.24,1) .3s;
}
.ht-banner__bar.no-anim .ht-banner__fill { transition: none; }
.ht-banner__sun {
  position: absolute; right: -9px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: radial-gradient(circle, #fffbe6 0 28%, #ffd35c 58%, #f6a531 100%);
  box-shadow: 0 0 12px 4px rgba(255, 190, 80, .65);
}
.ht-banner__sun::before { /* the rays */
  content: ''; position: absolute; inset: -9px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 170, 60, .85) 0 7deg, transparent 7deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 46%, #000 48%, #000 70%, transparent 74%);
          mask: radial-gradient(circle, transparent 46%, #000 48%, #000 70%, transparent 74%);
  animation: ht-rays 24s linear infinite;
}
@keyframes ht-rays { to { transform: rotate(360deg); } }

/* buttons */
.ht-banner__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 16px; border-radius: 6px;
  background: var(--hb-btn); color: var(--hb-btn-fg);
  font-size: 14.5px; font-weight: 600; line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background .2s, transform .2s;
}
.ht-banner__btn:hover { background: var(--hb-btn-hover); color: var(--hb-btn-fg); transform: translateY(-1px); }
.ht-banner__icon { font-size: 15px; line-height: 1; }
.ht-banner__btn--ghost {
  background: transparent; color: var(--hb-fg); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hb-fg) 40%, transparent);
}
.ht-banner__btn--ghost:hover { background: color-mix(in srgb, var(--hb-fg) 10%, transparent); color: var(--hb-fg); }
.ht-banner__btn:focus-visible, .ht-banner__close:focus-visible, .ht-banner__msg a:focus-visible { outline: 2px solid var(--hb-fill); outline-offset: 3px; }

.ht-banner__close {
  position: absolute; top: 8px; right: 10px;
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .6; cursor: pointer;
  transition: opacity .2s, background .2s;
}
.ht-banner__close:hover { opacity: 1; background: color-mix(in srgb, var(--hb-fg) 12%, transparent); }
.ht-banner__close svg { width: 14px; height: 14px; }

/* tablet */
@container (max-width: 820px) {
  .ht-banner__lamp { align-self: start; padding-top: 4px; }
  .ht-banner__caption { display: none; }
  .ht-banner__msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
/* phone: stacked and compact, full-width buttons */
@container (max-width: 600px) {
  .ht-banner__inner, .ht-banner__inner.no-progress {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "text" "progress" "actions";
    padding: 10px 42px 12px 16px; row-gap: 9px;
  }
  .ht-banner__lamp { display: none; }
  .ht-banner::before { opacity: calc(var(--hb-art, .09) * .6); }
  .ht-banner__heading { font-size: 17px; }
  .ht-banner__msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* with a progress row, the phone banner leads with the numbers */
  .ht-banner__inner:not(.no-progress) .ht-banner__msg { display: none; }
  .ht-banner__progress { flex-wrap: wrap; row-gap: 5px; }
  .ht-banner__caption { display: inline; }
  .ht-banner__bar { order: 3; flex-basis: 100%; margin: 7px 9px 6px 0; }
  .ht-banner__meta { order: 4; }
  .ht-banner__pct { margin-left: auto; }
  .ht-banner__actions .ht-banner__btn { flex: 1 1 0; padding: 9px 12px; }
  .ht-banner__close { top: 6px; right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .ht-banner-slot, .ht-banner__btn, .ht-banner__fill { transition: none; }
  .ht-banner__sun::before { animation: none; }
}

/* ---- the diya (site/src/components/Diya.astro) ---- */
.diya {
  position: relative; display: inline-block;
  width: calc(34px * var(--d, 1)); height: calc(40px * var(--d, 1));
  vertical-align: middle;
}
.diya-bowl {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: calc(34px * var(--d)); height: calc(13px * var(--d));
  background: linear-gradient(180deg, #b65c32, #8a4123 70%, #6f3319);
  border-radius: 14% 14% 50% 50% / 30% 30% 100% 100%;
}
.diya-bowl::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 32%;
  background: linear-gradient(180deg, #e0b25e, #c9a44c);
  border-radius: 999px;
}
.diya-wick {
  position: absolute; left: 50%; bottom: calc(11px * var(--d)); transform: translateX(-50%);
  width: calc(2px * var(--d)); height: calc(4px * var(--d));
  background: #4a2c14; border-radius: 2px;
}
.diya-flame {
  position: absolute; left: 50%; bottom: calc(13px * var(--d));
  width: calc(9px * var(--d)); height: calc(17px * var(--d));
  transform-origin: 50% 100%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 78%, #fff7d6 0%, #ffd873 34%, #f59e2d 62%, rgba(214, 106, 28, .85) 82%, transparent 100%);
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  filter: blur(.2px);
  animation:
    diya-flicker 340ms ease-in-out infinite alternate,
    diya-sway 2.9s ease-in-out infinite;
}
.diya-flame::before {
  content: ''; position: absolute; inset: 42% 30% 8% 30%;
  background: radial-gradient(circle at 50% 80%, #fff 0%, #ffe9a8 55%, transparent 100%);
  border-radius: inherit;
}
.diya-glow {
  position: absolute; left: 50%; bottom: calc(2px * var(--d)); transform: translate(-50%, 0);
  width: calc(58px * var(--d)); height: calc(58px * var(--d));
  background: radial-gradient(circle, rgba(255, 190, 92, .45) 0%, rgba(255, 170, 60, .16) 45%, transparent 70%);
  border-radius: 50%;
  animation: diya-glow 2.9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes diya-flicker {
  0%   { transform: translateX(-50%) scale(1, 1); }
  28%  { transform: translateX(-52%) scale(.96, 1.05) skewX(-2deg); }
  55%  { transform: translateX(-49%) scale(1.03, .95) skewX(1.5deg); }
  100% { transform: translateX(-50%) scale(.98, 1.08); }
}
@keyframes diya-sway {
  0%, 100% { rotate: 0deg; }
  30% { rotate: -2.4deg; }
  65% { rotate: 2deg; }
}
@keyframes diya-glow {
  0%, 100% { opacity: .85; scale: 1; }
  50% { opacity: 1; scale: 1.12; }
}
@media (prefers-reduced-motion: reduce) {
  .diya-flame, .diya-glow { animation: none; }
}

/* ---------------------------------------------------------------------
   WordPress themes style plain links, buttons and paragraphs everywhere.
   These rules keep a theme's a:visited colours, button backgrounds,
   underlines, uppercase buttons and big line-heights out of the banner.
--------------------------------------------------------------------- */
.ht-banner-slot .ht-banner {
  margin: 0; font-size: 14px; line-height: 1.4; text-align: left;
  letter-spacing: normal; text-transform: none; word-spacing: normal;
}
.ht-banner-slot .ht-banner *, .ht-banner-slot .ht-banner *::before, .ht-banner-slot .ht-banner *::after { box-sizing: border-box; }
.ht-banner-slot .ht-banner p.ht-banner__msg { margin: 1px 0 0; padding: 0; font-size: 13.5px; line-height: 1.4; }
.ht-banner-slot .ht-banner .ht-banner__heading { margin: 0; text-transform: none; }

.ht-banner-slot .ht-banner a.ht-banner__btn,
.ht-banner-slot .ht-banner a.ht-banner__btn:visited,
.ht-banner-slot .ht-banner a.ht-banner__btn:hover,
.ht-banner-slot .ht-banner a.ht-banner__btn:focus,
.ht-banner-slot .ht-banner a.ht-banner__btn:active {
  color: var(--hb-btn-fg); text-decoration: none; text-transform: none; letter-spacing: normal;
  border: 0; box-shadow: none; text-shadow: none; outline-offset: 3px;
}
.ht-banner-slot .ht-banner a.ht-banner__btn:hover { background: var(--hb-btn-hover); }
.ht-banner-slot .ht-banner a.ht-banner__btn--ghost,
.ht-banner-slot .ht-banner a.ht-banner__btn--ghost:visited,
.ht-banner-slot .ht-banner a.ht-banner__btn--ghost:focus,
.ht-banner-slot .ht-banner a.ht-banner__btn--ghost:active {
  background: transparent; color: var(--hb-fg);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hb-fg) 40%, transparent);
}
.ht-banner-slot .ht-banner a.ht-banner__btn--ghost:hover {
  background: color-mix(in srgb, var(--hb-fg) 10%, transparent); color: var(--hb-fg);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hb-fg) 40%, transparent);
}
.ht-banner-slot .ht-banner .ht-banner__msg a,
.ht-banner-slot .ht-banner .ht-banner__msg a:visited,
.ht-banner-slot .ht-banner .ht-banner__msg a:hover { color: inherit; text-decoration: underline; }

.ht-banner-slot .ht-banner button.ht-banner__close,
.ht-banner-slot .ht-banner button.ht-banner__close:focus,
.ht-banner-slot .ht-banner button.ht-banner__close:active {
  width: 30px; height: 30px; min-width: 0; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; box-shadow: none; text-shadow: none;
  color: var(--hb-fg); line-height: 1; font-size: 0; text-transform: none; cursor: pointer;
}
.ht-banner-slot .ht-banner button.ht-banner__close:hover { background: color-mix(in srgb, var(--hb-fg) 12%, transparent); color: var(--hb-fg); }
.ht-banner-slot .ht-banner .ht-banner__close svg { display: block; width: 14px; height: 14px; }
.ht-banner-slot .ht-banner svg { max-width: none; }
