/* Single‑post banner redesign (scoped; does not affect the grid) */
#rpd-banner.rpd-container{
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  padding:16px 20px; margin-top:24px;
  background:linear-gradient(135deg,var(--rpd-banner-0, #e11d2e) 0%, var(--rpd-banner-1, #ff2d20) 45%, var(--rpd-banner-2, #c70d2b) 100%);
  border:0; border-radius:12px; color:#fff; text-align:left;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.08), 0 8px 24px var(--rpd-banner-shadow, rgba(226,49,49,.35));
}

/* Label + clock (left side) */
#rpd-banner .rpd-countdown{ margin:0; display:flex; align-items:center; gap:12px; font-weight:700; font-size:16px; }
#rpd-banner .rpd-countdown::before{ content:'\1F4A3'; font-size:20px; }
#rpd-banner .rpd-clock{
  font:800 28px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing:.06em; color:#fff; text-shadow:0 2px 12px rgba(0,0,0,.35);
}

/* Extend button (right side, single only) */
#rpd-banner #rpd-extend{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 20px; min-width:0;
  background:transparent; color:#fff; border:2px solid rgba(255,255,255,.9); border-radius:999px;
  font-weight:800; font-size:16px; cursor:pointer;
  box-shadow:0 1px 0 rgba(255,255,255,.25) inset, 0 2px 10px rgba(0,0,0,.2);
}
#rpd-banner #rpd-extend::before{ content:'+'; margin-right:8px; }
#rpd-banner #rpd-extend:hover{
  background:rgba(255,255,255,.08);
  box-shadow:0 1px 0 rgba(255,255,255,.25) inset, 0 2px 10px rgba(0,0,0,.2);
}
#rpd-banner #rpd-extend:focus-visible{ outline:2px solid #fff; outline-offset:2px; }
#rpd-banner #rpd-extend:disabled{ opacity:.6; }

/* Tweak for small screens */
@media (max-width:640px){
  #rpd-banner .rpd-clock{ font-size:22px; }
  #rpd-banner #rpd-extend{ padding:10px 16px; font-size:15px; }
}

/* Clock icon next to the countdown value (single posts only) */
#rpd-banner .rpd-clock{ display:inline-flex; align-items:center; gap:10px; }
#rpd-banner .rpd-clock::before{
  content:'\1F552'; /* clock face */
  font-size:20px; line-height:1; opacity:.95;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}

/* Center the clock+time while keeping bomb+label left (single posts) */
#rpd-banner .rpd-countdown{ flex:1 1 auto; position:static; }
#rpd-banner .rpd-countdown .rpd-clock{
  position:absolute !important; left:50% !important; transform:translateX(-50%) !important;
  white-space:nowrap; z-index:1;
}

/* Label/Button text overrides visibility */
#rpd-banner .rpd-label--tablet,
#rpd-banner .rpd-label--mobile,
#rpd-banner .rpd-btn-text--tablet,
#rpd-banner .rpd-btn-text--mobile{ display:none; }

/* Tablet swap (≤900px) when override exists */
@media (max-width:900px){
  #rpd-banner[data-has-label-tab="1"] .rpd-label--desktop{ display:none; }
  #rpd-banner[data-has-label-tab="1"] .rpd-label--tablet{ display:inline; }
  #rpd-banner[data-has-btn-tab="1"] .rpd-btn-text--desktop{ display:none; }
  #rpd-banner[data-has-btn-tab="1"] .rpd-btn-text--tablet{ display:inline; }
}

/* Mobile swap (≤768px) when override exists */
@media (max-width:768px){
  #rpd-banner[data-has-label-mob="1"] .rpd-label--desktop,
  #rpd-banner[data-has-label-mob="1"][data-has-label-tab="1"] .rpd-label--tablet{ display:none; }
  #rpd-banner[data-has-label-mob="1"] .rpd-label--mobile{ display:inline; }
  #rpd-banner[data-has-btn-mob="1"] .rpd-btn-text--desktop,
  #rpd-banner[data-has-btn-mob="1"][data-has-btn-tab="1"] .rpd-btn-text--tablet{ display:none; }
  #rpd-banner[data-has-btn-mob="1"] .rpd-btn-text--mobile{ display:inline; }
}

/* Mobile refinements: remove clock icon, tighten type, smaller button */
@media (max-width:768px){
  /* Base downscale for all text */
  #rpd-banner{ font-size:12px; }
  /* Remove the clock icon (single posts only) */
  #rpd-banner .rpd-clock::before{ content:none; }
  /* Tighten timer spacing and reduce size */
  #rpd-banner .rpd-countdown{ font-size:12px; gap:0; }
  #rpd-banner .rpd-countdown::before{ margin-right:0; }
  #rpd-banner .rpd-clock{
    font-size:12px; letter-spacing:-0.06em; gap:0; text-shadow:none;
    position:static !important; transform:none !important; left:auto !important;
    font-variant-numeric:tabular-nums;
  }
  /* Smaller, tighter button */
  #rpd-banner #rpd-extend{ font-size:12px; padding:6px 10px; min-height:30px; line-height:1; }
  /* Tighter container padding */
  #rpd-banner.rpd-container{ padding:8px 10px; }
}

/* Very small phones */
@media (max-width:400px){
  #rpd-banner{ font-size:11px; }
  #rpd-banner .rpd-clock{ font-size:11px; }
  #rpd-banner #rpd-extend{ font-size:11px; padding:6px 8px; min-width:auto; min-height:28px; }
}

/* 1200–901: roomy desktop */
@media (min-width:901px) and (max-width:1200px){
  #rpd-banner.rpd-container{
    display:grid; grid-template-columns:max-content minmax(18ch,1fr) max-content;
    align-items:center; column-gap:clamp(8px,2vw,20px);
    padding:clamp(10px,1.5vw,20px) clamp(12px,2vw,24px);
  }
  #rpd-banner .rpd-countdown{ grid-column:1 / 3; display:grid; grid-template-columns:max-content 1fr; align-items:center; }
  #rpd-banner .rpd-label{ grid-column:1; justify-self:start; }
  #rpd-banner .rpd-clock{
    grid-column:2; position:static!important; left:auto!important; transform:none!important; justify-self:center;
    font-size:clamp(18px,2vw,28px); letter-spacing:clamp(-0.04em,-0.2vw,0);
  }
  #rpd-banner #rpd-extend{ grid-column:3; justify-self:end; align-self:center; white-space:nowrap; font-size:clamp(14px,1vw,16px); padding:clamp(8px,0.9vw,12px) clamp(12px,1.6vw,20px); }
}

/* 900–769: tablet tight area */
@media (min-width:769px) and (max-width:900px){
  #rpd-banner.rpd-container{
    display:grid; grid-template-columns:max-content minmax(16ch,1fr) max-content;
    align-items:center; column-gap:clamp(6px,1.2vw,14px);
    padding:clamp(8px,1.2vw,16px) clamp(10px,1.6vw,20px);
  }
  #rpd-banner .rpd-countdown{ grid-column:1 / 3; display:grid; grid-template-columns:max-content 1fr; align-items:center; }
  #rpd-banner .rpd-label{ grid-column:1; justify-self:start; }
  #rpd-banner .rpd-clock{
    grid-column:2; position:static!important; left:auto!important; transform:none!important; justify-self:center;
    font-size:clamp(16px,1.8vw,22px); letter-spacing:-0.03em;
  }
  #rpd-banner #rpd-extend{ grid-column:3; justify-self:end; align-self:center; white-space:nowrap; font-size:clamp(12px,0.9vw,14px); padding:8px 12px; }
}

/* 768–460: looked too roomy; scale timer up */
@media (min-width:460px) and (max-width:768px){
  #rpd-banner.rpd-container{
    display:grid; grid-template-columns:max-content 1fr max-content;
    align-items:center; column-gap:clamp(6px,1.5vw,12px);
    padding:clamp(8px,2vw,14px) clamp(10px,3vw,18px);
  }
  #rpd-banner .rpd-countdown{ grid-column:1 / 3; display:grid; grid-template-columns:max-content 1fr; align-items:center; }
  #rpd-banner .rpd-label{ grid-column:1; justify-self:start; }
  #rpd-banner .rpd-clock{
    grid-column:2; position:static!important; left:auto!important; transform:none!important; justify-self:center;
    font-size:clamp(14px,5.2vw,20px); letter-spacing:-0.04em;
  }
  #rpd-banner #rpd-extend{ grid-column:3; justify-self:end; align-self:center; white-space:nowrap; font-size:12px; padding:8px 10px; }
}

/* ≤459: stack; full-width button */
@media (max-width:459px){
  /* Keep single-line grid, no stacking */
  #rpd-banner.rpd-container{ display:grid; grid-template-columns:max-content 1fr max-content; align-items:center; gap:8px; padding:10px 12px; }
  #rpd-banner .rpd-clock{ justify-self:center; font-size:clamp(14px,6.5vw,20px); }
  #rpd-banner #rpd-extend{ width:auto; }
}

/* Guard long labels on mid widths */
#rpd-banner .rpd-label{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:min(28ch,35vw); }

/* Prevent button stretching and enforce single-line items */
#rpd-banner #rpd-extend{
  width:max-content !important;
  inline-size:max-content;
  box-sizing:border-box;
  white-space:nowrap;
}

/* Keep bomb + label on one line and move bomb into label */
#rpd-banner .rpd-countdown::before{ content:none !important; }
#rpd-banner .rpd-label,
#rpd-banner .rpd-label--desktop,
#rpd-banner .rpd-label--tablet,
#rpd-banner .rpd-label--mobile{
  display:inline-flex; align-items:center; gap:8px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  max-width:min(28ch,35vw);
}
#rpd-banner .rpd-label::before,
#rpd-banner .rpd-label--tablet::before,
#rpd-banner .rpd-label--mobile::before{
  content:'\1F4A3'; display:inline-block; margin-right:6px; font-size:18px; line-height:1;
}

/* Ensure timer is not absolutely positioned anywhere */
#rpd-banner .rpd-countdown .rpd-clock{ position:static !important; left:auto !important; transform:none !important; }

/* Hide clock during impact animation */
#rpd-banner .rpd-clock.rpd-obscured{ opacity:0; transition:opacity .32s ease; }

/* Start success toast overlay (keeps single line by not affecting layout) */
#rpd-banner .rpd-start-toast{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:16px; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.4);
  pointer-events:none; animation:rpdStartToast .9s ease-out both;
}
@keyframes rpdStartToast{ 0%{opacity:0; transform:translateY(4px) scale(.98);} 12%{opacity:1; transform:translateY(0) scale(1);} 100%{opacity:0; transform:translateY(-4px) scale(1);} }

/* Hide inline content while toast is visible */
#rpd-banner.rpd-toast-mode .rpd-countdown,
#rpd-banner.rpd-toast-mode #rpd-extend{ visibility:hidden; }

/* Ensure only one text variant shows at a time */
#rpd-banner .rpd-label--tablet,
#rpd-banner .rpd-label--mobile,
#rpd-banner .rpd-btn-text--tablet,
#rpd-banner .rpd-btn-text--mobile{ display:none !important; }

/* Tablet (≤900px): swap to tablet text if provided */
@media (max-width:900px){
  #rpd-banner[data-has-label-tab="1"] .rpd-label--desktop{ display:none !important; }
  #rpd-banner[data-has-label-tab="1"] .rpd-label--tablet{ display:inline-flex !important; }

  #rpd-banner[data-has-btn-tab="1"] .rpd-btn-text--desktop{ display:none !important; }
  #rpd-banner[data-has-btn-tab="1"] .rpd-btn-text--tablet{ display:inline !important; }
}

/* Mobile (≤768px): swap to mobile text if provided */
@media (max-width:768px){
  #rpd-banner.rpd-container{ grid-template-columns:max-content minmax(16ch,1fr) max-content !important; }
  #rpd-banner .rpd-clock{ justify-self:center !important; text-align:center; }
  #rpd-banner #rpd-extend{ justify-self:end !important; }
  #rpd-banner .rpd-label{ justify-self:start !important; }

  #rpd-banner[data-has-label-mob="1"] .rpd-label--desktop,
  #rpd-banner[data-has-label-mob="1"][data-has-label-tab="1"] .rpd-label--tablet{ display:none !important; }
  #rpd-banner[data-has-label-mob="1"] .rpd-label--mobile{ display:inline-flex !important; }

  #rpd-banner[data-has-btn-mob="1"] .rpd-btn-text--desktop,
  #rpd-banner[data-has-btn-mob="1"][data-has-btn-tab="1"] .rpd-btn-text--tablet{ display:none !important; }
  #rpd-banner[data-has-btn-mob="1"] .rpd-btn-text--mobile{ display:inline !important; }
}

/* Final layout guard: always one row with centered timer at ALL widths */
#rpd-banner.rpd-container{
  display:grid !important;
  grid-template-columns:max-content 1fr max-content !important;
  align-items:center; column-gap:12px;
}
#rpd-banner .rpd-countdown{
  grid-column:1 / 3 !important;
  display:grid !important; grid-template-columns:max-content 1fr !important;
  align-items:center; margin:0;
}
#rpd-banner .rpd-label,
#rpd-banner .rpd-label--desktop,
#rpd-banner .rpd-label--tablet,
#rpd-banner .rpd-label--mobile{
  grid-column:1 !important; justify-self:start !important;
}
#rpd-banner .rpd-clock{
  grid-column:2 !important; justify-self:center !important; text-align:center; white-space:nowrap;
  transition:opacity .32s ease;
}
#rpd-banner[data-author-view="1"] .rpd-clock{ justify-self:end !important; }
#rpd-banner[data-author-view="1"] .rpd-clock::before{ content:'\1F552'; }
#rpd-banner #rpd-extend{
  grid-column:3 !important; justify-self:end !important; width:max-content !important;
}

/* Start-state CTA (single posts) */
#rpd-banner #rpd-start{
  grid-column:1 / -1; justify-self:center; align-self:center;
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 22px; border:2px solid rgba(255,255,255,.9); border-radius:999px;
  background:transparent; color:#fff; font-weight:800; font-size:16px; line-height:1; white-space:nowrap;
  box-shadow:0 1px 0 rgba(255,255,255,.25) inset, 0 2px 10px rgba(0,0,0,.2);
  transition:background .15s ease, box-shadow .15s ease, transform .05s ease;
}
#rpd-banner #rpd-start:hover{ background:rgba(255,255,255,.08); }
#rpd-banner #rpd-start:focus-visible{ outline:2px solid #fff; outline-offset:2px; }
#rpd-banner #rpd-start.is-pressed{ transform:translateY(1px); }
@media (max-width:768px){
  #rpd-banner #rpd-start{ padding:10px 18px; font-size:15px; }
}

/* Grid sizing bump (small, font-size only) */
.wpgb-block.rpd-banner .rpd-clock{ font-size:13px !important; }
.wpgb-block.rpd-banner .rpd-extend,
.wpgb-block.rpd-banner button.rpd-extend{ font-size:13px !important; }

