/* 
  ReleasingWhen styles.
  - Accent-insensitive search handled in PHP (remove_accents + strtolower).
  - Custom dark mode: toggle in UI + CSS vars + media + .dark / .wp-dark-mode support.
    You can now disable the WP Dark Mode plugin; calendar stays beautiful.
  - Visuals: flip cards with neon glow, responsive grid, polished filters.

  See DARK-MODE-CHANGES.md for implementation details and site-wide behavior.
*/
:root{
  --rw-g1:#0A95AA;
  --rw-g2:#089A53;
  --rw-g3:#73B645;
  --rw-g4:#089A53;
  --rw-g5:#0A95AA;
  --rw-g6:#11DFFE;

  --rw-type-games:#089A53;
  --rw-type-games-text:#fff;

  --rw-type-comics:#d1a000;
  --rw-type-comics-text:#111;

  --rw-type-addons:#1d6fd6;
  --rw-type-addons-text:#fff;

  --rw-type-events:#c43b3b;
  --rw-type-events-text:#fff;

  /* Semantic tokens — lite (white page) by default; dark mode overrides below */
  --rw-card-front-bg: #f7f7f7;
  --rw-card-back-bg: #f1f1f1;
  --rw-text-primary: #111;
  --rw-text-muted: rgba(0,0,0,0.65);
  --rw-text-secondary: #444;
  --rw-border: #ddd;
  --rw-input-border: #ccc;
  --rw-input-bg: #fff;
  --rw-filter-btn-border: #ccc;
  --rw-panel-bg: #fff;
  --rw-panel-border: #e5e5e5;
  --rw-overlay-gradient: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,0) 80%);

  /* Hover tokens (teal-tinted instead of plain gray for nicer accent) */
  --rw-hover-bg: rgba(10,149,170,0.12);
  --rw-hover-border: #0A95AA;
  --rw-container-bg: transparent;
}

/* Dark mode support: media query + common WP/theme dark classes.
   This lets you remove WP Dark Mode plugin. The calendar adapts or stays
   nicely dark-styled independent of site theme. */
@media (prefers-color-scheme: dark) {
  .rw-releases-shell {
    /* Defaults already lean dark; tokens above keep cards dark */
  }
}

.dark .rw-releases-shell,
body.dark .rw-releases-shell,
html.dark .rw-releases-shell,
.wp-dark-mode-active .rw-releases-shell,
body.wp-dark-mode .rw-releases-shell,
body.dark-mode .rw-releases-shell {
  /* Force our dark tokens when ancestor signals dark (no plugin needed) */
  --rw-card-front-bg: #111;
  --rw-card-back-bg: #0d0d0d;
  --rw-text-primary: #fff;
  --rw-text-muted: rgba(255,255,255,0.7);
}

/* Force-dark class from our custom toggle (lets you control without WP Dark Mode plugin) */
.rw-releases-shell.rw-force-dark {
  --rw-card-front-bg: #111;
  --rw-card-back-bg: #0d0d0d;
  --rw-text-primary: #fff;
  --rw-text-muted: rgba(255,255,255,0.7);
  --rw-text-secondary: #cfd6e6;
  --rw-border: #bbb;
  --rw-input-border: #555;
  --rw-input-bg: #1f2228;
  --rw-filter-btn-border: #444;
  --rw-panel-bg: #232429;
  --rw-panel-border: rgba(255,255,255,.14);
  --rw-overlay-gradient: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,0) 100%);

  /* Carry over blueish glow from light mode, white text */
  --rw-hover-bg: rgba(10,149,170,0.18);
  --rw-hover-border: #0A95AA;
  --rw-container-bg: #232429;

  /* Base dark background for the entire calendar component.
     Combined with the rules below, this makes the whole section (heading + controls + results)
     use a consistent dark background instead of only specific panels. */
  background: #232429;
}

/* === SITE-WIDE DARK MODE (when toggle is active) ===
   This makes the body background, logo/header area, and page headings dark too.
   Uses body.rw-dark-mode class set by the JS toggle. */
body.rw-dark-mode {
  background-color: #232429 !important;
  color: #fff;
}

/* Logo / header area */
body.rw-dark-mode header,
body.rw-dark-mode .elementor-location-header,
body.rw-dark-mode .site-header,
body.rw-dark-mode .logo,
body.rw-dark-mode .elementor-widget-theme-site-logo,
body.rw-dark-mode .elementor-widget-image {
  background-color: #1f2228 !important;
  color: #fff !important;
}

body.rw-dark-mode h1,
body.rw-dark-mode .elementor-heading-title,
body.rw-dark-mode [class*="release-calendar"],
body.rw-dark-mode .elementor-widget-heading .elementor-heading-title {
  color: #fff !important;
}

/* Optional: darken the red top menu bar */
body.rw-dark-mode .elementor-element[class*="red"],
body.rw-dark-mode nav,
body.rw-dark-mode .menu {
}

/* Make filter/search controls have visible dark treatment even on light site pages (exclude active so selected keep their distinct color) */
.rw-releases-shell.rw-force-dark .rw-filter-btn:not(.active),
.rw-releases-shell.rw-force-dark .rw-week-tab:not(.active),
.rw-releases-shell.rw-force-dark .rw-recent-toggle {
  background: rgba(255,255,255,0.06);
}

/* Broad dark background for the entire calendar section in dark mode.
   Covers the month heading + all main control and results areas for a uniform dark look. */
.rw-releases-shell.rw-force-dark .rw-month-heading,
.rw-releases-shell.rw-force-dark .rw-search-wrap,
.rw-releases-shell.rw-force-dark .rw-filters,
.rw-releases-shell.rw-force-dark .rw-recently-added-wrap,
.rw-releases-shell.rw-force-dark .rw-results-area,
.rw-releases-shell.rw-force-dark .rw-week-tabs,
.rw-releases-shell.rw-force-dark .rw-week-panel,
.rw-releases-shell.rw-force-dark .rw-past-weeks {
  background: var(--rw-container-bg);
}

/* Subtle rounding only on the main content blocks (not the heading) */
.rw-releases-shell.rw-force-dark .rw-search-wrap,
.rw-releases-shell.rw-force-dark .rw-filters,
.rw-releases-shell.rw-force-dark .rw-recently-added-wrap,
.rw-releases-shell.rw-force-dark .rw-results-area {
  border-radius: 8px;
}

/* Force light cards explicitly via our toggle (works regardless of system prefers-color-scheme) */
.rw-releases-shell.rw-force-light {
  --rw-card-front-bg: #f7f7f7;
  --rw-card-back-bg: #f1f1f1;
  --rw-text-primary: #111;
  --rw-text-muted: rgba(0,0,0,0.65);
  --rw-text-secondary: #444;
  --rw-border: #ddd;
  --rw-input-border: #ccc;
  --rw-input-bg: #fff;
  --rw-filter-btn-border: #ccc;
  --rw-panel-bg: #fff;
  --rw-panel-border: #e5e5e5;
  --rw-overlay-gradient: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,0) 80%);

  /* Teal accent hover (blueish glow user likes) + white page */
  --rw-hover-bg: rgba(10,149,170,0.1);
  --rw-hover-border: #0A95AA;
  --rw-container-bg: transparent;
}

/* Whole background for the plugin controls area in light mode (transparent = page white, no box).
   Broadened for parity with dark mode. */
.rw-releases-shell.rw-force-light .rw-month-heading,
.rw-releases-shell.rw-force-light .rw-search-wrap,
.rw-releases-shell.rw-force-light .rw-filters,
.rw-releases-shell.rw-force-light .rw-recently-added-wrap,
.rw-releases-shell.rw-force-light .rw-results-area,
.rw-releases-shell.rw-force-light .rw-week-tabs,
.rw-releases-shell.rw-force-light .rw-week-panel,
.rw-releases-shell.rw-force-light .rw-past-weeks {
  background: var(--rw-container-bg);
  /* no radius when transparent to avoid any boxed look */
}

/* Light mode adjustments for hovers/focus if needed beyond the token-driven base hover */
.rw-releases-shell.rw-force-light .rw-search-input:focus {
  background: #f0f0f0;
}

/* Card front: art well + text strip (contain — no zoom/crop) */
.rw-releases-shell.rw-force-light .rw-card-front,
.rw-releases-shell.rw-force-dark .rw-card-front{
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  min-height:0;
  align-content:stretch;
}

.rw-releases-shell.rw-force-light .rw-card-front{
  background:#000;
}

.rw-releases-shell.rw-force-dark .rw-card-front{
  background:#111;
}

.rw-releases-shell.rw-force-light .rw-card-img,
.rw-releases-shell.rw-force-dark .rw-card-img{
  position:relative;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  min-height:0;
  object-fit:contain;
  object-position:center center;
  align-self:center;
  justify-self:center;
}

.rw-releases-shell.rw-force-light .rw-card-no-img,
.rw-releases-shell.rw-force-dark .rw-card-no-img{
  position:relative;
  width:100%;
  min-height:0;
  height:auto;
}

.rw-releases-shell.rw-force-light .rw-card-overlay,
.rw-releases-shell.rw-force-dark .rw-card-overlay{
  position:relative;
  top:auto;
  bottom:auto;
  left:auto;
  right:auto;
  flex:0 0 auto;
  width:100%;
  z-index:2;
  padding:1rem;
  margin-top:0;
  box-sizing:border-box;
}

.rw-releases-shell.rw-force-light .rw-card-overlay{
  background:#fff;
}

.rw-releases-shell.rw-force-dark .rw-card-overlay{
  background:var(--rw-card-front-bg);
}

.rw-releases-shell.rw-force-light .rw-card-overlay .rw-type-badge,
.rw-releases-shell.rw-force-light .rw-card-overlay .rw-early-access-badge{
  color:#fff;
}

.rw-releases-shell.rw-force-light .rw-card-overlay .rw-card-title{
  color:#111;
  font-weight:700;
  font-size:1rem;
  margin:0 0 .25rem;
}

.rw-releases-shell.rw-force-light .rw-card-overlay .rw-card-date{
  color:var(--rw-g3);
  font-size:.8rem;
  margin:0;
}

/* Lite mode: card back accent colors */
.rw-releases-shell.rw-force-light .rw-card-back-title{
  color:var(--rw-g6);
}
.rw-releases-shell.rw-force-light .rw-card-back-date{
  color:var(--rw-g1);
}
.rw-releases-shell.rw-force-light .rw-card-back-section-label{
  color:var(--rw-g3);
}
.rw-releases-shell.rw-force-light .rw-trailer-btn{
  color:#fff;
}
.rw-releases-shell.rw-force-light .rw-card-back-link{
  color:var(--rw-g1);
  border-color:var(--rw-g1);
}
.rw-releases-shell.rw-force-light .rw-card-back-link:hover{
  background:var(--rw-g1);
  color:#fff;
}

/* Optional automatic light theme support (fallback when no explicit force from toggle) */
@media (prefers-color-scheme: light) {
  .rw-releases-shell:not(.rw-force-dark):not(.rw-force-light) {
    --rw-card-front-bg: #f7f7f7;
    --rw-card-back-bg: #f1f1f1;
    --rw-text-primary: #111;
    --rw-text-muted: rgba(0,0,0,0.65);
    --rw-text-secondary: #444;
    --rw-border: #ddd;
    --rw-input-border: #ccc;
    --rw-input-bg: #fff;
    --rw-filter-btn-border: #ccc;
    --rw-panel-bg: #fff;
    --rw-panel-border: #e5e5e5;
    --rw-overlay-gradient: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,0) 80%);
  }
}

/* Calendar section layout */
.rw-releases-wrap{
  width:100%;
  max-width:1200px;
  margin-left:auto;
  margin-right:auto;
  padding:1.5rem 24px 0;
  box-sizing:border-box;
}

/* Heading */
.rw-month-heading{
  position:relative;
  margin-bottom:1.5rem;
  min-height:80px;
  overflow:visible;
  color: var(--rw-text-primary);
}
.rw-month-title,
.rw-month-watermark{
  font-family:'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight:900;
}
.rw-month-title{
  position:relative;
  z-index:2;
  font-size:2rem;
  margin:0;
}
.rw-month-watermark{
  position:absolute;
  top:-15px;
  left:120px;
  font-size:7rem;
  opacity:.12;
  color:currentColor;
  line-height:1;
  pointer-events:none;
  z-index:1;
  white-space:nowrap;
}

/* Search */
.rw-search-wrap{
  margin-bottom:1.25rem;
  display:flex;
  align-items:center;
  gap:.5rem;
}
.rw-search-input{
  flex:1;
  min-width:0;
  padding:.6rem 1rem;
  font-size:1rem;
  border:1px solid var(--rw-input-border);
  border-radius:6px;
  background:var(--rw-input-bg);
  color:var(--rw-text-primary);
  box-sizing:border-box;
  transition:border-color .2s ease, background .2s ease;
}
.rw-dark-toggle{
  flex-shrink:0;
  width:38px;
  height:38px;
  border:1px solid var(--rw-input-border);
  border-radius:6px;
  background:transparent;
  color:var(--rw-text-primary);
  font-size:1.1rem;
  line-height:1;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.rw-dark-toggle:hover{
  border-color:var(--rw-g1);
  background:rgba(255,255,255,.06);
}
.rw-releases-shell.rw-force-light .rw-dark-toggle:hover {
  background: rgba(0,0,0,0.08);
}
.rw-releases-shell.rw-force-dark .rw-dark-toggle:hover {
  background: rgba(255,255,255,0.1);
}
.rw-dark-toggle:active{ transform:scale(0.96); }
.rw-search-input:focus{
  outline:none;
  border-color:var(--rw-g1);
  background: var(--rw-input-bg); /* will be tinted by mode via tokens */
}
.rw-releases-shell.rw-force-dark .rw-search-input:focus {
  background: #333;
}
.rw-releases-shell.rw-force-light .rw-search-input:focus {
  background: #f0f0f0;
}
.rw-search-input::placeholder {
  color: var(--rw-text-muted);
  opacity: .75;
}
.rw-releases-shell.rw-force-light .rw-search-input::placeholder {
  color: rgba(0,0,0,0.5);
}
.rw-releases-shell.rw-force-dark .rw-search-input::placeholder {
  color: rgba(255,255,255,0.6);
}

/* Filters (desktop buttons + mobile selects) */
.rw-filters{
  margin-bottom:1.5rem;
}

/* Button groups (desktop) */
.rw-filter-group,
.rw-week-tabs{
  margin-bottom:.75rem;
  display:flex;
  flex-wrap:nowrap;
  gap:.5rem;
  align-items:center;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:.25rem;
  scrollbar-width:none;
}
.rw-filter-group::-webkit-scrollbar,
.rw-week-tabs::-webkit-scrollbar{
  display:none;
}
.rw-filter-label{
  font-weight:bold;
  margin-right:.5rem;
  min-width:70px;
  white-space:nowrap;
  flex-shrink:0;
  color:var(--rw-text-secondary);
}
.rw-filter-btn,
.rw-week-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0.35rem 0.9rem;
  min-height:36px;
  border:1px solid var(--rw-filter-btn-border);
  border-radius:999px;
  background:transparent;
  color:var(--rw-text-primary);
  font-size:0.9rem;
  font-weight:600;
  white-space:nowrap;
  flex-shrink:0;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease,
    color 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.rw-filter-btn:hover,
.rw-week-tab:hover{
  background: var(--rw-hover-bg);
  border-color: var(--rw-hover-border);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  /* removed translateY to prevent top border/line from appearing thinner or removed on hover */
}

/* In light mode, ensure hover text stays black (as requested) */
.rw-releases-shell.rw-force-light .rw-filter-btn:hover,
.rw-releases-shell.rw-force-light .rw-week-tab:hover,
.rw-releases-shell.rw-force-light .rw-recent-toggle:hover {
  color: #111;
}

/* Carry over blueish glow to dark mode hover */
.rw-releases-shell.rw-force-dark .rw-filter-btn:hover,
.rw-releases-shell.rw-force-dark .rw-week-tab:hover,
.rw-releases-shell.rw-force-dark .rw-recent-toggle:hover {
  background: var(--rw-hover-bg);
  border-color: var(--rw-hover-border);
  box-shadow: 0 0 8px rgba(10,149,170,0.4), 0 3px 6px rgba(0,0,0,0.2);
}

/* Hover now driven by --rw-hover-* tokens in base rule for consistency across modes */
.rw-filter-btn:focus-visible,
.rw-week-tab:focus-visible{
  outline: 2px solid var(--rw-g1);
  outline-offset: 2px;
}
.rw-filter-btn.active,
.rw-week-tab.active{
  background:var(--rw-g1);
  color:#fff;
  border-color:var(--rw-g1);
  box-shadow:0 0 0 1px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.15);
  transform:translateY(0);
}

.rw-releases-shell.rw-force-light .rw-week-tab:not(.active):not(:hover){
  color:#5e5e5e;
}

/* Selected now keep their distinct colors (teal or type-specific) because base bg rule excludes .active */

/* Mobile selects (HCG-style) */
.rw-mobile-filters{
  display:none;
}
.rw-mobile-select{
  width:100%;
  min-height:42px;
  border-radius:8px;
  border:1px solid var(--rw-panel-border);
  background:rgba(255,255,255,0.06);
  color:inherit;
  padding:0 14px;
  font-size:0.95rem;
  font-weight:500;
  outline:none;
  box-shadow:0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  appearance:auto;
  -webkit-appearance:menulist;
}
.rw-mobile-select:focus,
.rw-mobile-select:hover{
  border-color:var(--rw-g1);
  background:rgba(255,255,255,0.1);
  box-shadow:0 0 0 3px rgba(10,149,170,0.15);
}

@media (max-width:600px){
  .rw-filter-label{
    min-width:58px;
    font-size:.9rem;
  }
  .rw-filter-btn,
  .rw-week-tab{
    font-size:.9rem;
    padding:.28rem .7rem;
  }
}

@media (max-width:767px){
  .rw-mobile-filters{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-bottom:12px;
  }
  /* hide desktop pill rows on mobile */
  .rw-filters > .rw-filter-group{
    display:none;
  }
  #rw-subplatform-group{
    display:none !important;
  }
}


/* Recently Added */
.rw-recently-added-wrap { margin: 0 0 1.25rem; }
.rw-recent-toggle {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .3rem .8rem;
  min-height: 34px;
  border: 1px solid var(--rw-input-border);
  border-radius: 4px;
  background: transparent;
  color: var(--rw-text-primary);
  font-size: .95rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    color .18s ease;
}
.rw-recently-added-wrap {
  margin: 0 0 1.25rem;
  text-align: right;
}

.rw-recent-toggle {
  display: inline-flex;
}
.rw-recent-toggle:hover,
.rw-recent-toggle:focus-visible {
  background: var(--rw-hover-bg);
  border-color: var(--rw-hover-border);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  /* no translateY to avoid visual issues */
}
.rw-recent-toggle.is-open {
  background: var(--rw-g1);
  border-color: var(--rw-g1);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.2);
}
.rw-recent-toggle-date {
  font-size: .82rem;
  line-height: 1;
  opacity: .8;
}
.rw-recent-panel {
  margin-top: .85rem;
  padding: 1rem;
  border: 1px solid var(--rw-panel-border);
  border-radius: 12px;
  background: var(--rw-panel-bg);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Ensure Recently Added panel and text are dark with white text in dark mode */
.rw-releases-shell.rw-force-dark .rw-recent-panel {
  color: var(--rw-text-primary);
  background: var(--rw-panel-bg);
}
.rw-recent-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.rw-recent-panel-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--rw-g1);
}
.rw-recent-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rw-panel-border);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.rw-recent-close:hover,
.rw-recent-close:focus-visible {
  border-color: var(--rw-g1);
  color: var(--rw-g1);
  background: var(--rw-hover-bg);
}
.rw-recent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .rw-recent-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .rw-recent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .rw-recent-grid { grid-template-columns: 1fr; } }

/* Results area */
.rw-results-area{
  position:relative;
  min-height:140px;
}
.rw-results-area.is-loading{
  opacity:.6;
  pointer-events:none;
  transition:opacity .2s ease;
  position:relative;
}
.rw-results-area.is-loading::after{
  content:'';
  position:absolute;
  top:1rem;
  left:50%;
  transform:translateX(-50%);
  width:24px;
  height:24px;
  border:2px solid var(--rw-g1);
  border-top-color:transparent;
  border-radius:50%;
  animation: rwSpin 0.8s linear infinite;
}
@keyframes rwSpin{
  to{ transform:translateX(-50%) rotate(360deg); }
}

/* Week panels */
.rw-week-panel{display:none;}
.rw-week-panel.active{display:block;}
.rw-date-label{font-size:1rem;margin:0 0 .75rem;color:var(--rw-g1);}
.rw-date-group{margin:0 0 1.25rem;}
.rw-releases-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1rem;
}
@media(max-width:900px){
  .rw-releases-grid{grid-template-columns:repeat(3,1fr);}
}
@media(max-width:600px){
  .rw-releases-grid{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:400px){
  .rw-releases-grid{grid-template-columns:1fr;}
}
.rw-week-tabs {
  padding-left: calc(70px + .5rem);
}
@media (max-width: 767px) {
  .rw-week-tabs {
    padding-left: 0;
  }

  .rw-recently-added-wrap {
    justify-content: flex-start;
  }
}

/* Card */
.rw-card-wrap{
  position:relative;
  perspective:1200px;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition: transform .15s ease;
}
.rw-card-wrap:hover:not(:has(.rw-card.is-flipped)) {
  transform: translateY(-3px);
}
.rw-card-wrap:has(.rw-card.is-flipped) {
  transform: none;
}
.rw-card-wrap:hover .rw-card::before {
  filter: brightness(1.1);
}

/* In light mode the neon glow can be a bit much; tone it slightly */
.rw-releases-shell.rw-force-light .rw-card::before {
  opacity: 0.85;
}
.rw-card{
  position:relative;
  width:100%;
  padding-top:110%;
  transform-style:preserve-3d;
  transform-origin:center center;
  transition:transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  z-index:1;
}
.rw-card::before{
  content:'';
  position:absolute;
  inset:-3px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--rw-g1),var(--rw-g2),var(--rw-g3),var(--rw-g4),var(--rw-g5));
  z-index:0;
  box-shadow:
    0 0 12px var(--rw-g1),
    0 0 24px var(--rw-g2),
    0 0 4px var(--rw-g3);
  transition:box-shadow .25s ease, filter .25s ease;
}
@keyframes rwCardGlowPulse{
  0%{
    box-shadow:
      0 0 12px var(--rw-g1),
      0 0 24px var(--rw-g2),
      0 0 4px var(--rw-g3);
    filter:brightness(1);
  }
  50%{
    box-shadow:
      0 0 18px var(--rw-g1),
      0 0 34px var(--rw-g2),
      0 0 12px var(--rw-g3);
    filter:brightness(1.18);
  }
  100%{
    box-shadow:
      0 0 12px var(--rw-g1),
      0 0 24px var(--rw-g2),
      0 0 4px var(--rw-g3);
    filter:brightness(1);
  }
}
.rw-card-wrap:hover .rw-card::before,
.rw-card-wrap:focus-within .rw-card::before{
  animation:rwCardGlowPulse 1.2s ease-in-out infinite;
}
.rw-card-face{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border-radius:14px;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  overflow:hidden;
  z-index:1;
  box-sizing:border-box;
  box-shadow:0 2px 8px rgba(0,0,0,0.2);
  transform-style:preserve-3d;
}
.rw-card.is-flipped{transform:rotateY(180deg);}
.rw-card-front{
  background:var(--rw-card-front-bg);
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  min-height:0;
  transform:rotateY(0deg) translateZ(1px);
}
.rw-card-back{
  background:var(--rw-card-back-bg);
  transform:rotateY(180deg) translateZ(1px);
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:flex-start;
  padding:0.9rem;
  gap:0.4rem;
  overflow-x:hidden;
  overflow-y:auto;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
}
.rw-card-img{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  min-height:0;
  object-fit:contain;
  object-position:center center;
  display:block;
  align-self:center;
  justify-self:center;
}
.rw-card-no-img{
  width:100%;
  height:100%;
  min-height:0;
  background:linear-gradient(135deg,var(--rw-g1),var(--rw-g3));
}
.rw-card-overlay{
  position:relative;
  width:100%;
  padding:1rem;
  background:var(--rw-overlay-gradient);
  z-index:2;
  box-sizing:border-box;
}
.rw-card-title{
  margin:0 0 .25rem;
  font-size:1rem;
  font-weight:700;
  color:var(--rw-text-primary);
}
.rw-card-date{
  font-size:.8rem;
  color:var(--rw-g3);
}
.rw-type-badge{
  display:inline-block;
  font-size:.65rem;
  padding:.1rem .4rem;
  border-radius:3px;
  background:var(--rw-g2);
  color:#fff;
  margin-bottom:.3rem;
  text-transform:uppercase;
  letter-spacing:.05em;
}
/* Type badge colors */
.rw-card-wrap[data-type="Games"] .rw-type-badge {
	background: var(--rw-type-games);
	color: var(--rw-type-games-text);
}

.rw-card-wrap[data-type="Comics"] .rw-type-badge {
	background: var(--rw-type-comics);
	color: var(--rw-type-comics-text);
}

.rw-card-wrap[data-type="Add-ons"] .rw-type-badge {
	background: var(--rw-type-addons);
	color: var(--rw-type-addons-text);
}

.rw-card-wrap[data-type="Events"] .rw-type-badge {
	background: var(--rw-type-events);
	color: var(--rw-type-events-text);
}
.rw-early-access-badge{
  display:inline-block;
  font-size:.65rem;
  padding:.1rem .4rem;
  border-radius:3px;
  background:#8b5cf6;
  color:#fff;
  margin-bottom:.3rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-left:.35rem;
}

/* Active Type filter colors */
.rw-filter-btn[data-filter="type"][data-value="Games"].active {
	background: var(--rw-type-games);
	color: var(--rw-type-games-text);
	border-color: var(--rw-type-games);
	box-shadow: 0 0 0 1px rgba(0,0,0,.18);
}

.rw-filter-btn[data-filter="type"][data-value="Comics"].active {
	background: var(--rw-type-comics);
	color: var(--rw-type-comics-text);
	border-color: var(--rw-type-comics);
	box-shadow: 0 0 0 1px rgba(0,0,0,.18);
}

.rw-filter-btn[data-filter="type"][data-value="Add-ons"].active {
	background: var(--rw-type-addons);
	color: var(--rw-type-addons-text);
	border-color: var(--rw-type-addons);
	box-shadow: 0 0 0 1px rgba(0,0,0,.18);
}

.rw-filter-btn[data-filter="type"][data-value="Events"].active {
	background: var(--rw-type-events);
	color: var(--rw-type-events-text);
	border-color: var(--rw-type-events);
	box-shadow: 0 0 0 1px rgba(0,0,0,.18);
}

/* Back details */
.rw-card-back-title{
  margin:.5rem 0 .25rem;
  font-size:.95rem;
  font-weight:700;
  text-align:center;
  width:100%;
  color:var(--rw-g6);
}
.rw-card-back-title a{
  color:var(--rw-text-primary);
  text-decoration:none;
}
.rw-card-back-title a:hover{
  color:var(--rw-g3);
}
.rw-card-back-row{
  display:flex;
  justify-content:flex-start;
  align-items:flex-start;
  gap:1.5rem;
  width:100%;
}
.rw-card-back-date{
  font-size:.85rem;
  color:var(--rw-g1);
}
.rw-card-back-link{
  font-size:.8rem;
  color:var(--rw-g1);
  text-decoration:none;
  border:1px solid var(--rw-g1);
  padding:.2rem .6rem;
  border-radius:4px;
  margin-left:auto;
}
.rw-card-back-link:hover{
  background:var(--rw-g1);
  color:#fff;
}
.rw-card-back-systems{
  display:flex;
  flex-direction:column;
  gap:.2rem;
}
.rw-card-back-section-label{
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--rw-g3);
}
.rw-card-back-platforms{
  display:flex;
  flex-wrap:wrap;
  gap:.3rem;
}
.rw-platform-tag{
  font-size:.7rem;
  padding:.15rem .5rem;
  background:transparent;
  color:var(--rw-text-primary);
  border-radius:3px;
  padding-left:0;
}
.rw-platform-link{
  text-decoration:none;
  color:var(--rw-text-primary);
}
.rw-platform-link:hover{
  color:var(--rw-g2);
}
.rw-card-back-rating{
  display:flex;
  flex-direction:column;
  gap:.2rem;
  text-align:left;
  color:var(--rw-text-primary);
  font-size:.85rem;
}
.rw-card-back-rating::before{
  content:'Rating';
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--rw-g3);
  text-align:left;
}
.rw-trailer-btn{
  padding:.4rem 1rem;
  background:linear-gradient(90deg,var(--rw-g1),var(--rw-g2));
  color:#fff;
  border:none;
  border-radius:4px;
  cursor:pointer;
  font-size:.9rem;
  font-weight:600;
  align-self:center;
}
.rw-card-back-hint{
  font-size:.85rem;
  opacity:.58;
  margin-top:.25rem;
}

/* Past weeks */
.rw-past-weeks{
  margin:1rem 0 1.5rem;
}
.rw-past-weeks summary{
  cursor:pointer;
  font-weight:700;
  color:var(--rw-text-secondary);
  margin-bottom:.75rem;
}

/* Make "Earlier This Month" summary white in dark mode */
.rw-releases-shell.rw-force-dark .rw-past-weeks summary {
  color: var(--rw-text-primary);
}
.rw-past-weeks[open] summary{
  margin-bottom:1rem;
}
.rw-past-weeks-inner{
  display:flex;
  flex-direction:column;
  gap:1rem;
}

/* Empty / errors */
.rw-no-results{
  margin:1rem 0 0;
  padding:1rem 1.25rem;
  background:var(--rw-panel-bg);
  border:1px dashed var(--rw-border);
  border-radius:8px;
  color:var(--rw-text-muted);
  font-style:italic;
}

/* Trailer lightbox */
.rw-lightbox{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.85);
  z-index:99999;
  align-items:center;
  justify-content:center;
}
.rw-lightbox.is-open{
  display:flex;
}
.rw-lightbox-inner{
  position:relative;
  width:90%;
  max-width:860px;
}
.rw-lightbox-close{
  position:absolute;
  top:-2rem;
  right:0;
  background:none;
  border:none;
  color:#fff;
  font-size:1.5rem;
  cursor:pointer;
  line-height:1;
}
.rw-lightbox-video{
  position:relative;
  padding-top:56.25%;
}
.rw-lightbox-video iframe{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  border-radius:8px;
}
/* === Dark-mode calendar contrast (scoped; do not override lite mode) === */
.rw-releases-shell.rw-force-dark .rw-filter-label{
  color:var(--rw-text-secondary);
}
.rw-releases-shell.rw-force-dark .rw-week-tab:not(.active):not(:hover){
  color:#d0d0d0;
  border-color:#444;
}
.rw-releases-shell.rw-force-dark .rw-week-tab.active,
.rw-releases-shell.rw-force-dark .rw-week-tab:hover{
  color:#fff;
}
