/* 80% centered content */
.rsg-container { max-width: 80%; margin: 0 auto; padding: 24px 16px; box-sizing: border-box; }

/* Typography/layout niceties */
.rsg-title { margin: 0 0 12px; }
.rsg-sub { color: #475569; }
.rsg-back { display: inline-block; margin-bottom: 12px; }

/* Cards/boxes (matches your style lightly) */
.rsg-card { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; background: #fff; }
.rsg-list { list-style: none; margin: 0; padding: 0; }
.rsg-list li { padding: 6px 0; }
.rsg-session-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rsg-session-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; background: #fff; }

/* Make embeds scale */
.rsg-content img,
.rsg-content video,
.rsg-content iframe,
.rsg-content .wp-video,
.rsg-content .wp-video-shortcode { max-width: 100%; height: auto; display: block; }

/* Video aesthetics */
.rsg-content video, .rsg-content iframe { border-radius: 12px; }

/* Responsive */
@media (max-width: 900px) { .rsg-container { max-width: 94%; } }

/* ================================
   RSG Countdown (compact + stable)
   ================================ */

/* Vars + base layout */
.rsg-event .rsg-countdown,
.rsg-countdown {
  --rsg-gap: 10px;                 /* space between tiles */
  --rsg-radius: 12px;              /* tile corner */
  --rsg-soft: 10px;                /* shadow softness */
  --rsg-tile: #111827;             /* bg */
  --rsg-tile-alt: #0b1220;         /* gradient alt */
  --rsg-border: rgba(255,255,255,0.08);
  --rsg-text: #e5e7eb;             /* main text */
  --rsg-accent: #60a5fa;           /* separators */
  --rsg-muted: #9ca3af;            /* labels */

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;  /* keep each tile tight */
  gap: var(--rsg-gap);
  align-items: center;
  justify-content: start;
  white-space: nowrap;             /* prevent wrapping to a new line */
}

/* Hide helper line unless you explicitly want it */
.rsg-event .rsg-countdown-text,
.rsg-countdown-text {
  display: none !important;        /* stops the “flash” beside seconds */
}

/* Tile */
.rsg-event .rsg-countdown-tile,
.rsg-countdown-tile {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;

  width: 56px;                     /* fixed width = consistent sizing */
  min-width: 56px;
  padding: 7px 8px;
  background: linear-gradient(180deg, var(--rsg-tile), var(--rsg-tile-alt));
  color: var(--rsg-text);
  border: 1px solid var(--rsg-border);
  border-radius: var(--rsg-radius);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 var(--rsg-soft) var(--rsg-soft) rgba(0,0,0,0.25);
  text-align: center;
}

/* Value */
.rsg-event .rsg-countdown-value,
.rsg-countdown-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 1.25rem;              /* steady size (no clamp jitter) */
  font-weight: 700;
  line-height: 1.1;
}

/* Label */
.rsg-event .rsg-countdown-label,
.rsg-countdown-label {
  margin-top: 0.25rem;
  font-size: 0.50rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rsg-muted);
}

/* Separator ":" */
.rsg-event .rsg-countdown-sep,
.rsg-countdown-sep {
  font-size: 1.1rem;
  color: var(--rsg-accent);
  padding: 0 0px;
  user-select: none;
  transform: translateY(-1px);     /* optically center with numbers */
}

/* Extra-compact on small screens */
@media (max-width: 480px) {
  .rsg-event .rsg-countdown,
  .rsg-countdown { gap: 8px; }

  .rsg-event .rsg-countdown-tile,
  .rsg-countdown-tile { width: 50px; min-width: 50px; padding: 5px 6px; }

  .rsg-event .rsg-countdown-value,
  .rsg-countdown-value { font-size: 1.1rem; }

  .rsg-event .rsg-countdown-label,
  .rsg-countdown-label { font-size: 0.6rem; }

  .rsg-event .rsg-countdown-sep,
  .rsg-countdown-sep { font-size: 1rem; }
}

/* Live badge (unchanged) */
.rsg-event .rsg-live-badge,
.rsg-live-badge {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.15);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.rsg-event .rsg-live-dot,
.rsg-live-dot {
  width: 8px; height: 8px; border-radius: 999px; background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8);
  animation: rsg-pulse 1.5s infinite;
}
@keyframes rsg-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Breathing room under the countdown */
.rsg-event .rsg-countdown,
.rsg-countdown {
  margin-bottom: 16px; /* tweak to taste: 12–16px works well */
}

/* Optionally a touch more on larger screens */
@media (min-width: 768px) {
  .rsg-event .rsg-countdown,
  .rsg-countdown { margin-bottom: 20px; }
}

.rsg-session-card.is-locked .rsg-thumb img { filter: grayscale(1) opacity(.7); }
.rsg-button-upgrade { background: #7c3aed; }

/* ================================
   My Events Gallery (Stacked Layout)
   ================================ */
.rsg-my-events { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); 
  gap: 28px; 
}

.rsg-event-card { 
  background: #FFFFFF !important; 
  border: 1px solid #EBEBEB !important; 
  border-radius: 16px !important; 
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(34, 34, 34, 0.08);
}

.rsg-thumb-wrapper { 
  position: relative; 
  height: 200px; /* Consistent height for images */
  background: #EBEBEB; 
  overflow: hidden;
}

.rsg-thumb-wrapper img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

/* Badges */
.rsg-badge { 
  position: absolute; 
  top: 12px; 
  right: 12px; 
  padding: 6px 14px; 
  border-radius: 20px; 
  font-size: 10px; 
  font-weight: 800; 
  text-transform: uppercase; 
  color: #FFFFFF;
  z-index: 5;
}
.rsg-badge-live { background: #F06A3F; display: flex; align-items: center; gap: 6px; }
.rsg-badge-upcoming { background: #709460; }

.rsg-dot { width: 6px; height: 6px; background: #FFFFFF; border-radius: 50%; animation: rsg-blink 1s infinite; }
@keyframes rsg-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Content Area Fixes */
.rsg-card-content { 
  padding: 24px; 
  flex-grow: 1; 
  display: flex; 
  flex-direction: column; 
  background: #FFFFFF;
}

/* Force title to sit below image, never overlapping */
.rsg-card-title-fixed { 
  position: static !important; /* Breaks the "band" overlap */
  display: block !important;
  margin: 0 0 12px 0 !important; 
  padding: 0 !important;
  font-size: 1.35rem !important; 
  font-weight: 700 !important; 
  line-height: 1.3 !important;
  color: #222222 !important; /* Executive Charcoal */
}

.rsg-card-title-fixed a { 
  text-decoration: none !important; 
  color: inherit !important; 
}

.rsg-card-title-fixed a:hover { color: #F06A3F !important; }

.rsg-excerpt { 
  color: #475569; 
  font-size: 0.95rem; 
  line-height: 1.6; 
  margin-bottom: 24px; 
  flex-grow: 1; /* Pushes button to bottom */
}

/* Branded Button */
.rsg-button-view { 
  text-align: center; 
  padding: 14px; 
  background: #FFFFFF; 
  border: 2px solid #F06A3F; 
  border-radius: 10px; 
  color: #F06A3F; 
  font-weight: 700; 
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.rsg-button-view:hover { 
  background: #F06A3F; 
  color: #FFFFFF; 
}

/* Pagination Styling */
.rsg-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.rsg-pagination .page-numbers {
  display: inline-block;
  padding: 10px 16px;
  background: #EBEBEB; /* Community Gray */
  color: #222222;      /* Executive Charcoal */
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.rsg-pagination .page-numbers.current {
  background: #709460; /* Resilient Green */
  color: #FFFFFF;
}

.rsg-pagination .page-numbers:hover:not(.current) {
  background: #222222;
  color: #FFFFFF;
}

.rsg-pagination .next, 
.rsg-pagination .prev {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Sidebar specific countdown adjustments */
.rsg-side .rsg-countdown {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
}

.rsg-side .rsg-countdown-tile {
    width: 45px; /* Smaller for sidebar */
    min-width: 45px;
    padding: 5px;
}

.rsg-side .rsg-countdown-value {
    font-size: 1rem;
}

.rsg-side .rsg-countdown-text {
    width: 100%;
    text-align: center;
    order: -1; /* Puts "Starts in" above the boxes */
    margin-bottom: 8px;
    font-weight: bold;
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.rsg-countdown {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}