/* Rushd theme: the gold masterclass countdown above the site header (rushd-site's Live countdown
   banner block), as website/site-header.html draws it.

   The rules are website/css/rushd-header.css's bar (.rl-bar to the end), each scoped to
   .rushd-live-banner so the /live/ page's own .rl-bar styles cannot reach it. Change the two
   together. The nav's gold "Live masterclass" pill (.rushd-nav-live) is not part of the bar.
   Loaded on every page with the block (functions.php), and in the editor. */

.rushd-live-banner .rl-bar{
  position:relative;
  z-index:6;
  min-height:48px;
  box-sizing:border-box;
  display:none;
  align-items:center;
  background:linear-gradient(90deg,#c99a3f,#f3d88e 50%,#c99a3f);
  color:#0e2138;
  overflow-x:clip;
}
.rushd-live-banner .rl-bar.rl-barOn{display:flex}
.rushd-live-banner .rl-barLive{background:#c2362f}
.rushd-live-banner .rl-barInner{
  width:100%;
  max-width:1280px;
  margin:0 auto;
  padding:9px clamp(12px,4vw,48px);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(10px,3vw,26px);
  flex-wrap:wrap;
  text-align:center;
  box-sizing:border-box;
}
.rushd-live-banner .rl-barCount,
.rushd-live-banner .rl-unitsRow{
  display:flex;
  align-items:center;
  gap:clamp(8px,2vw,14px);
  flex-wrap:wrap;
  justify-content:center;
}
.rushd-live-banner .rl-barLabel{
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:clamp(12px,3.2vw,14px);
  font-weight:800;
  letter-spacing:.14em;
  white-space:nowrap;
}
.rushd-live-banner .rl-barLiveWord{color:#d7262d;font-weight:900}
.rushd-live-banner .rl-units{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;justify-content:center}
.rushd-live-banner .rl-unit{
  display:inline-flex;
  align-items:baseline;
  gap:4px;
  padding:3px 10px;
  border-radius:8px;
  background:#0e2138;
  color:#f3d88e;
}
.rushd-live-banner .rl-unitValue{
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:clamp(16px,4.2vw,20px);
  font-weight:800;
  font-variant-numeric:tabular-nums;
  line-height:1.2;
}
.rushd-live-banner .rl-unitLabel{
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.08em;
  color:#c9d1de;
}
.rushd-live-banner .rl-barNow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:clamp(13px,3.4vw,15px);
  font-weight:800;
  letter-spacing:.14em;
  color:#ffffff;
}
.rushd-live-banner .rl-barNowDot{width:10px;height:10px;border-radius:50%;background:#ffffff}
.rushd-live-banner .rl-seeMore{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  height:30px;
  padding:0 12px;
  border-radius:8px;
  background:#0e2138;
  color:#f3d88e;
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:13px;
  font-weight:800;
  line-height:1.2;
  letter-spacing:.01em;
  text-decoration:none;
  white-space:nowrap;
}
.rushd-live-banner .rl-seeMore:hover{background:#16304e;color:#fcfaf4}
.rushd-live-banner .rl-seeMore:focus-visible{outline:2px solid #0e2138;outline-offset:2px}
.rushd-live-banner .rl-seeMoreIcon{display:none}
@media (max-width:639px){
  .rushd-live-banner .rl-barCount{width:100%}
  .rushd-live-banner .rl-seeMore{flex:0 0 auto;width:auto;margin-inline:auto}
  /* "See more" does not fit beside the units here and would wrap onto a line of its own, so
     the countdown's link is a round arrow. It is red like LIVE, with a ring that pulses and an
     arrow that nudges forward, so it reads as the thing to tap next to the navy units. Its
     words stay for screen readers. The arrow is the SVG, not the → glyph: Plus Jakarta Sans
     has no →, so each phone drew it in its own fallback font, low in the circle on Android.
     The red "WEBINAR IS LIVE" bar has room, so Watch Now! keeps its words.
     The row does not wrap, so the arrow never drops onto a line of its own. The two blocks
     below make the units fit beside it on narrower phones. */
  .rushd-live-banner .rl-unitsRow{column-gap:6px;flex-wrap:nowrap}
  .rushd-live-banner .rl-unitsRow .rl-seeMore{
    width:30px;
    padding:0;
    border-radius:50%;
    background:#d7262d;
    color:#ffffff;
    box-shadow:0 4px 10px -3px rgba(14,33,56,.55);
    animation:rl-more-pulse 1.6s ease-out infinite;
  }
  .rushd-live-banner .rl-unitsRow .rl-seeMore:hover{background:#b81f25;color:#ffffff}
  .rushd-live-banner .rl-unitsRow .rl-seeMoreGlyph{display:none}
  .rushd-live-banner .rl-unitsRow .rl-seeMoreIcon{display:block;animation:rl-more-nudge 1.6s ease-in-out infinite}
  .rushd-live-banner .rl-unitsRow .rl-seeMoreText{
    position:absolute;
    width:1px;
    height:1px;
    margin:-1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    clip-path:inset(50%);
    white-space:nowrap;
  }
}
/* Below 360px the units and the arrow at that spacing are wider than the bar (328px against
   294px at 320px), so the units sit closer together: 6px inside each and 4px between. That
   fits one line down to 320px, with 6px to spare. */
@media (max-width:359px){
  .rushd-live-banner .rl-units,
  .rushd-live-banner .rl-unitsRow{column-gap:4px}
  .rushd-live-banner .rl-unit{padding-inline:6px}
}
/* Below 320px even that is too wide, so the units are two rows of two, each centred in its
   column, with the arrow beside them. The label keeps a line of its own above them, as on
   every other phone. */
@media (max-width:319px){
  .rushd-live-banner .rl-barCount{flex-direction:column}
  .rushd-live-banner .rl-units{display:grid;grid-template-columns:repeat(2,auto);gap:4px}
  .rushd-live-banner .rl-unit{justify-content:center}
}
/* The shadow is repeated in each frame: an animated box-shadow replaces the static one. */
@keyframes rl-more-pulse{
  0%{box-shadow:0 4px 10px -3px rgba(14,33,56,.55),0 0 0 0 rgba(215,38,45,.6)}
  70%{box-shadow:0 4px 10px -3px rgba(14,33,56,.55),0 0 0 8px rgba(215,38,45,0)}
  100%{box-shadow:0 4px 10px -3px rgba(14,33,56,.55),0 0 0 0 rgba(215,38,45,0)}
}
/* One short nudge per pulse, then the arrow rests in the centre. */
@keyframes rl-more-nudge{
  0%,40%,100%{transform:none}
  20%{transform:translateX(3px)}
}
@media (prefers-reduced-motion:reduce){
  .rushd-live-banner .rl-unitsRow .rl-seeMore,
  .rushd-live-banner .rl-unitsRow .rl-seeMoreIcon{animation:none}
}

/* ---- WordPress only ---- */

/* The website's bar inherits the browser's text size and line height; the theme's body text is
   15px at 1.6, which made the bar taller. */
.rushd-live-banner{font-size:16px;line-height:normal}
/* See more and Watch Now! are left out on the page they link to, with the hidden attribute. */
.rushd-live-banner [hidden]{display:none !important}
/* Both states are rendered, and <html data-live-phase> picks one: "countdown" before the start,
   "live" until the end, none from then on. The block's inline script sets it before the page
   draws, from the visitor's clock, and live-banner.js keeps it current. So the bar and its words
   are right from the first frame, from the page cache too, before the script adds rl-barOn and
   rl-barLive, and after the webinar the bar never shows, not even for a frame. The editor has no
   phase: it shows the countdown, to be edited. */
html[data-live-phase] .rushd-live-banner .rl-bar,
.editor-styles-wrapper .rushd-live-banner .rl-bar{display:flex}
html[data-live-phase="live"] .rushd-live-banner .rl-bar{background:#c2362f}
html:not([data-live-phase="countdown"]) body:not(.editor-styles-wrapper) .rushd-live-banner [data-when="countdown"],
html:not([data-live-phase="live"]) .rushd-live-banner [data-when="live"]{display:none !important}
/* The editor only (render.php): what the site shows instead, once there is no bar. */
.rushd-live-banner__note{margin:0;padding:8px 16px;background:#fff4e5;border-top:1px solid #e7c063;color:#0e2138;font-size:13px;line-height:1.45;text-align:center}
/* The site editor spaces top-level blocks apart; the nav sits flush under the bar, as on the site. */
.wp-block-rushd-live-banner + .rushd-site-header{margin-block-start:0}
