/* ============================================================
   RELEASE CALENDAR — rules only /releases uses
   ============================================================
   Loaded after gaming-theme.css, and before the first paint only on
   that page (Helpers/PageStyles.cs). A rule belongs here while every
   class it needs is used by this page alone; once another page uses
   one, the rule moves to gaming-theme.css (PageStylesTests).
   ============================================================ */

/* Release calendar: month navigation and platform chips in the hero. */
/* Hero controls, all centred under the title: month pair (equal widths, arrows
   at the outer edges), platform chips, and the Highlights / Every release switch. */
.rl-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; max-width: 26rem; margin: 0 auto 0.9rem; }
.rl-nav-btn { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.55rem 0.9rem; border: 1px solid var(--border-bright); border-radius: 8px; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-nav-btn:hover { color: var(--text-primary); background: var(--bg-elevated); }
.rl-nav-btn span { font-size: 1.2rem; line-height: 1; }
.rl-platforms { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.rl-platforms .dl-chip { text-decoration: none; }
/* Highlights / Every release switch: two links, the active one filled. */
.rl-view { display: inline-flex; margin-top: 0.9rem; border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.rl-view-opt { padding: 0.35rem 0.9rem; border-radius: 999px; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; }
.rl-view-opt.active { background: var(--accent); color: #fff; }
.rl-view-opt:not(.active):hover { color: var(--text-primary); }
/* Subscribe to the calendar feed: one quiet line of links under the switch. */
.rl-subscribe { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1rem; margin: 0.9rem auto 0; max-width: 46rem; font-size: 0.85rem; color: var(--text-muted); }
.rl-subscribe span { flex-basis: 100%; }
.rl-subscribe a { color: var(--text-secondary); text-decoration: underline; text-decoration-color: var(--border-bright); text-underline-offset: 3px; padding: 0.35rem 0; }
.rl-subscribe a:hover, .rl-subscribe a:focus-visible { color: var(--text-primary); text-decoration-color: currentColor; }
.rl-date.is-past { opacity: 0.55; }
.rl-date.is-past .rl-date-wd { color: var(--text-muted); }

.rl-day { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); column-gap: 1.25rem; margin-top: 2rem; }
.rl-rail { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.rl-rail-line { flex: 1; width: 2px; border-radius: 1px; background: linear-gradient(var(--border-bright), transparent); min-height: 1.5rem; }
.rl-day:last-of-type .rl-rail-line { display: none; }
.rl-day-quiet .rl-date { background: transparent; }
/* A period without a day ("Dec / no day", "Q4 / 2026", "2026 / no date"): the tile is
   dashed where a day's is solid, and its heading is shown, since no date says it. */
.rl-date.rl-date-open { border-style: dashed; background: transparent; }
.rl-date.rl-date-open .rl-date-num { font-size: 1.3rem; letter-spacing: 0; }
.rl-date.rl-date-open .rl-date-wd { color: var(--text-muted); }
.rl-day-open .rl-day-title { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-family: 'Rajdhani', sans-serif; font-size: 1.35rem; font-weight: 700; line-height: 1.2; margin: 0.9rem 0 0.15rem; color: var(--text-primary); }
.rl-day-sub { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 0.9rem; }

/* Most anticipated: five compact cards, cover left, calendar leaf + title right. */
.rl-top { margin-top: 1.5rem; padding: 1.25rem 1.25rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), transparent 70%), var(--bg-surface); }
.rl-top-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rl-top-title { font-family: 'Rajdhani', sans-serif; font-size: 1.4rem; font-weight: 700; margin: 0; color: var(--text-primary); }
.rl-top-sub { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.rl-day-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rl-day-body { min-width: 0; }
.rl-day-body .gn-grid + .rl-ledger { margin-top: 1rem; }

/* The ledger: the day's other releases as one line each, no covers. */
.rl-ledger > summary { cursor: pointer; list-style: none; color: var(--text-secondary); font-size: 0.9rem; padding: 0.4rem 0; display: inline-flex; align-items: center; gap: 0.45rem; }
.rl-ledger > summary::-webkit-details-marker { display: none; }
.rl-ledger > summary::before { content: ""; width: 0.45rem; height: 0.45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; }
.rl-ledger[open] > summary::before { transform: rotate(45deg); }
.rl-ledger > summary:hover { color: var(--text-primary); }
.rl-ledger > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.rl-day-quiet .rl-ledger > summary { padding-top: 0.55rem; }
.rl-ledger-list { list-style: none; margin: 0.25rem 0 0; padding: 0; border-top: 1px solid var(--border); }
.rl-ledger-list li { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; align-items: baseline; }
.rl-ledger-list a { color: var(--text-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-ledger-list a:hover { color: var(--accent-cyan); }
.rl-ledger-platforms, .rl-ledger-dev { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A day with one to three highlights: cards on the left, the day's other releases
   beside them (ReleasesPage.razor). The list shows eight rows (three on a phone); the
   hidden checkbox before it, driven by the label under it, shows the rest. */
.rl-split { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 2rem; align-items: start; }
.rl-also { min-width: 0; }
.rl-also-title { margin: 0 0 0.35rem; font-size: 0.8rem; color: var(--text-muted); }
.rl-also-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rl-also-list { margin-top: 0; }
.rl-also-list li:nth-child(n+9) { display: none; }
.rl-also-toggle:checked ~ .rl-also-list li { display: grid; }
.rl-also-more { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.5rem; padding: 0.3rem 0; font-size: 0.9rem; color: var(--text-secondary); cursor: pointer; }
.rl-also-more::before { content: ""; width: 0.45rem; height: 0.45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s; }
.rl-also-more:hover { color: var(--text-primary); }
.rl-also-toggle:focus-visible ~ .rl-also-more { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.rl-also-hide { display: none; }
.rl-also-toggle:checked ~ .rl-also-more .rl-also-show { display: none; }
.rl-also-toggle:checked ~ .rl-also-more .rl-also-hide { display: inline; }
.rl-also-toggle:checked ~ .rl-also-more::before { transform: rotate(-135deg) translate(-2px, -2px); }
.rl-also-fits .rl-also-more { display: none; }       /* nothing is hidden: no toggle */
/* Three cards and a list need room; under it the list goes below the cards. */
@media (min-width: 640.02px) and (max-width: 1100px) { .rl-split[style*="--rl-cards:3"] { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; }
}
@media (min-width: 640.02px) and (max-width: 900px)  { .rl-split[style*="--rl-cards:2"] { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .rl-ledger > summary::before, .rl-also-more::before { transition: none; }
}
@media (max-width: 640px) {
    .rl-day { grid-template-columns: 1fr; row-gap: 0.6rem; margin-top: 1.5rem; }
    .rl-rail { flex-direction: row; align-items: center; gap: 0.75rem; position: sticky; top: 0; background: var(--bg-base); padding: 0.35rem 0; z-index: 1; }
    .rl-rail .rl-date { width: 3.5rem; height: 3.5rem; }
    .rl-rail .rl-date-num { font-size: 1.6rem; }
    .rl-rail-line { flex: 1; width: auto; height: 2px; min-height: 0; background: linear-gradient(90deg, var(--border-bright), transparent); }
    .rl-top { padding: 1rem; }
    .rl-ledger-list li { grid-template-columns: minmax(0, 1fr) auto; }
    .rl-ledger-dev { display: none; }
    /* The split day is one column: the cards two abreast as everywhere, then three rows of the list. */
    .rl-split { grid-template-columns: minmax(0, 1fr); row-gap: 0.9rem; }
    .rl-also-list li:nth-child(n+4) { display: none; }
    .rl-also-fits .rl-also-more { display: inline-flex; }
    .rl-also-fits-phone .rl-also-more { display: none; }
    /* One card would leave half the screen empty beside it: the list goes there, titles only, six rows. */
    .rl-split[style*="--rl-cards:1"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 0.75rem; }
    .rl-split[style*="--rl-cards:1"] .rl-also-list li { grid-template-columns: minmax(0, 1fr); display: block; }
    .rl-split[style*="--rl-cards:1"] .rl-also-list a { display: block; }
    .rl-split[style*="--rl-cards:1"] .rl-ledger-platforms { display: none; }
    .rl-split[style*="--rl-cards:1"] .rl-also-list li:nth-child(n+4) { display: block; }
    .rl-split[style*="--rl-cards:1"] .rl-also-list li:nth-child(n+7) { display: none; }
    .rl-split[style*="--rl-cards:1"] .rl-also-toggle:checked ~ .rl-also-list li { display: block; }
}
