/* EGL Schedule — public calendar week strip (egl-events-band) */

:root {
	--egl-cal-fg: #e8f4ff;
	--egl-cal-fg-muted: #b8d4e8;
	--egl-cal-heading: #f2fbff;
	--egl-cal-accent: #7ef0ff;
	--egl-cal-panel: #0a1628;
	--egl-cal-panel-elevated: rgba(0, 20, 40, 0.72);
	--egl-cal-border: rgba(0, 255, 255, 0.22);
	--egl-cal-ok: #8fdcb8;
}

/* Override theme stub sizing so the live week can use vertical room for labels. */
aside.egl-events-band.egl-events-band--live {
	position: relative;
	z-index: 5;
	isolation: isolate;
	/* Theme stub used a tall decorative strip; keep a modest band, not a hero gap. */
	min-height: 0;
	align-items: stretch;
	justify-content: flex-start;
	margin-top: 0;
	padding-top: 0.55rem;
	padding-bottom: 0.85rem;
}

.egl-events-band--live.egl-events-band--sheet-open {
	/* Elevate the band while the day sheet is open (homepage stacking). */
	z-index: 2147483000;
}

.egl-events-band--live .egl-events-band__inner.egl-cal {
	position: relative;
	z-index: 1;
	max-width: none;
	width: 100%;
	text-align: left;
}

.egl-cal {
	color: var(--egl-cal-fg);
	font-size: 0.875rem;
	line-height: 1.35;
}

.egl-cal__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	margin-bottom: 0.65rem;
}

.egl-cal__nav {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.egl-cal__range {
	min-width: 8rem;
	text-align: center;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.egl-cal__btn {
	appearance: none;
	border: 1px solid rgba(0, 255, 255, 0.35);
	background: rgba(0, 20, 40, 0.65);
	color: #bff;
	border-radius: 6px;
	padding: 0.25rem 0.55rem;
	cursor: pointer;
	font: inherit;
	line-height: 1.2;
}

.egl-cal__btn:hover,
.egl-cal__btn:focus-visible {
	border-color: #0ff;
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.25);
}

.egl-cal__balance {
	font-size: 0.8rem;
	opacity: 0.9;
}

.egl-cal__week {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.4rem;
}

.egl-cal__day {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	gap: 0.12rem;
	min-height: 7.25rem;
	padding: 0.45rem 0.35rem 0.4rem;
	border: 1px solid rgba(0, 255, 255, 0.18);
	border-radius: 8px;
	background: rgba(0, 10, 24, 0.55);
	color: inherit;
	cursor: pointer;
	font: inherit;
	transition: border-color 0.15s, background 0.15s;
	text-align: center;
}

.egl-cal__day:hover,
.egl-cal__day:focus-visible {
	border-color: rgba(0, 255, 255, 0.55);
	background: rgba(0, 30, 60, 0.75);
	outline: none;
}

.egl-cal__day--today {
	border-color: #0ff;
	box-shadow: inset 0 0 0 1px rgba(0, 255, 255, 0.35);
}

.egl-cal__day--build {
	border-color: rgba(100, 220, 180, 0.35);
	box-shadow: inset 0 0 0 1px rgba(100, 220, 180, 0.12);
}

.egl-cal__day--build .egl-cal__num::after {
	content: '+';
	display: block;
	font-size: 0.55rem;
	line-height: 1;
	opacity: 0.75;
	color: var(--egl-cal-ok);
}

.egl-cal__day--boost .egl-cal__chip--ops {
	border-color: rgba(255, 179, 71, 0.45);
}

.egl-cal__dow {
	font-size: 0.68rem;
	text-transform: uppercase;
	opacity: 0.75;
	letter-spacing: 0.06em;
}

.egl-cal__num {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.1;
}

.egl-cal__chips {
	display: flex;
	flex-direction: column;
	gap: 0.18rem;
	width: 100%;
	margin-top: 0.2rem;
	flex: 1;
	min-height: 2.6rem;
}

.egl-cal__chip {
	display: block;
	width: 100%;
	padding: 0.12rem 0.25rem;
	border-radius: 4px;
	border: 1px solid rgba(0, 255, 255, 0.22);
	background: rgba(0, 40, 70, 0.55);
	font-size: 0.58rem;
	line-height: 1.2;
	letter-spacing: 0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #d7f7ff;
}

.egl-cal__chip--ops {
	border-color: rgba(120, 170, 255, 0.4);
	background: rgba(40, 70, 120, 0.45);
	color: #cfe0ff;
}

.egl-cal__chip--more {
	border-style: dashed;
	opacity: 0.85;
	text-align: center;
}

.egl-cal__dots {
	display: none;
}

.egl-cal__dot {
	display: none;
}

/* Day detail sheet — portaled to body; stay above theme sections */
.egl-cal-sheet[hidden] {
	display: none !important;
}

.egl-cal-sheet,
body > .egl-cal-sheet {
	position: fixed;
	inset: 0;
	z-index: 2147483646;
	--egl-cal-fg: #e8f4ff;
	--egl-cal-fg-muted: #b8d4e8;
	--egl-cal-heading: #f2fbff;
	color: var(--egl-cal-fg);
}

.egl-cal-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.egl-cal-sheet__panel {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: min(100%, 24rem);
	background: var(--egl-cal-panel);
	border-left: 1px solid rgba(0, 255, 255, 0.25);
	box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
	display: flex;
	flex-direction: column;
	color: var(--egl-cal-fg);
}

.egl-cal-sheet__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1rem 0.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Explicit heading colors — theme h3/h4 often force dark grey onto the dark sheet. */
body > .egl-cal-sheet .egl-cal-sheet__title,
.egl-cal-sheet .egl-cal-sheet__title,
body > .egl-cal-sheet h3,
body > .egl-cal-sheet h4,
.egl-cal-sheet h3,
.egl-cal-sheet h4,
.egl-cal-sheet .egl-cal-event__title,
.egl-cal-sheet .egl-cal-section__title,
.egl-cal-sheet .egl-cal-accordion__label,
.egl-cal-sheet summary {
	color: var(--egl-cal-heading) !important;
}

.egl-cal-sheet__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.egl-cal-sheet__close {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--egl-cal-accent);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
}

.egl-cal-sheet__body {
	padding: 1rem;
	overflow: auto;
	flex: 1;
	color: var(--egl-cal-fg);
}

.egl-cal-sheet__body p,
.egl-cal-sheet__body .egl-cal-event__meta,
.egl-cal-sheet__body .egl-cal-event__lead,
.egl-cal-sheet__body .egl-cal-empty {
	color: var(--egl-cal-fg-muted);
}

.egl-cal-day__timing-hint {
	margin: 0 0 1rem;
	font-size: 0.78rem;
	line-height: 1.4;
	color: var(--egl-cal-fg-muted);
	border-left: 2px solid rgba(0, 255, 255, 0.35);
	padding-left: 0.65rem;
}

.egl-cal-section {
	margin-bottom: 1rem;
}

.egl-cal-section__title {
	margin: 0 0 0.5rem;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--egl-cal-heading);
}

.egl-cal-empty {
	margin: 0;
	font-size: 0.82rem;
	opacity: 0.9;
	padding: 0.55rem 0.65rem;
	border: 1px dashed rgba(0, 255, 255, 0.2);
	border-radius: 8px;
	background: rgba(0, 12, 28, 0.35);
}

.egl-cal-accordion {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.egl-cal-accordion__item {
	border: 1px solid var(--egl-cal-border);
	border-radius: 8px;
	background: var(--egl-cal-panel-elevated);
	overflow: hidden;
}

.egl-cal-accordion__item > summary {
	list-style: none;
	cursor: pointer;
	padding: 0.65rem 0.75rem;
	font-weight: 600;
	font-size: 0.88rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	color: var(--egl-cal-heading);
	user-select: none;
}

.egl-cal-accordion__item > summary::-webkit-details-marker {
	display: none;
}

.egl-cal-accordion__item > summary::after {
	content: '▾';
	color: var(--egl-cal-accent);
	font-size: 0.75rem;
	opacity: 0.85;
	transition: transform 0.15s ease;
}

.egl-cal-accordion__item[open] > summary::after {
	transform: rotate(-180deg);
}

.egl-cal-accordion__count {
	font-size: 0.72rem;
	font-weight: 500;
	color: var(--egl-cal-fg-muted);
	margin-left: auto;
	margin-right: 0.35rem;
}

.egl-cal-accordion__body {
	padding: 0 0.75rem 0.75rem;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.egl-cal-sheet__footer {
	margin-top: 1.15rem;
	padding-top: 0.85rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	display: grid;
	gap: 0.45rem;
}

.egl-cal-cta {
	appearance: none;
	width: 100%;
	font: inherit;
	font-weight: 700;
	border-radius: 8px;
	padding: 0.65rem 0.85rem;
	cursor: pointer;
	border: 1px solid rgba(100, 220, 180, 0.45);
	background: linear-gradient(180deg, rgba(40, 160, 130, 0.45), rgba(10, 70, 60, 0.7));
	color: #eafff6;
}

.egl-cal-cta:hover,
.egl-cal-cta:focus-visible {
	border-color: var(--egl-cal-ok);
	outline: none;
	box-shadow: 0 0 0 2px rgba(100, 220, 180, 0.25);
}

.egl-cal-back {
	appearance: none;
	font: inherit;
	font-size: 0.82rem;
	border: 0;
	background: transparent;
	color: var(--egl-cal-accent);
	cursor: pointer;
	padding: 0.25rem 0;
	text-align: left;
	width: fit-content;
}

.egl-cal-back:hover,
.egl-cal-back:focus-visible {
	text-decoration: underline;
	outline: none;
}

.egl-cal-game-list {
	display: grid;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.egl-cal-game-card {
	appearance: none;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
	width: 100%;
	text-align: left;
	font: inherit;
	padding: 0.75rem 0.85rem;
	border-radius: 8px;
	border: 1px solid var(--egl-cal-border);
	background: var(--egl-cal-panel-elevated);
	color: var(--egl-cal-fg);
	cursor: pointer;
}

.egl-cal-game-card:hover,
.egl-cal-game-card:focus-visible {
	border-color: rgba(0, 255, 255, 0.55);
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.18);
}

.egl-cal-game-card:disabled,
.egl-cal-game-card--soon {
	opacity: 0.55;
	cursor: not-allowed;
}

.egl-cal-game-card__name {
	font-weight: 700;
	color: var(--egl-cal-heading);
}

.egl-cal-game-card__meta {
	font-size: 0.75rem;
	color: var(--egl-cal-fg-muted);
}

.egl-cal-event {
	border: 1px solid rgba(0, 255, 255, 0.15);
	border-radius: 8px;
	padding: 0.75rem;
	margin-bottom: 0.75rem;
	background: rgba(0, 20, 40, 0.5);
}

.egl-cal-event:last-child {
	margin-bottom: 0;
}

.egl-cal-event__title {
	font-weight: 600;
	margin: 0 0 0.35rem;
	color: var(--egl-cal-heading);
	font-size: 0.95rem;
}

.egl-cal-event--standalone {
	border-color: rgba(100, 220, 180, 0.35);
	background: rgba(0, 40, 32, 0.45);
}

.egl-cal-event__lead {
	margin: 0 0 0.75rem;
	font-size: 0.82rem;
	color: var(--egl-cal-fg-muted);
}

.egl-cal-event__meta {
	font-size: 0.78rem;
	color: var(--egl-cal-fg-muted);
	margin-bottom: 0.5rem;
}

.egl-cal-event__badge {
	display: inline-block;
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
	margin-right: 0.35rem;
}

.egl-cal-event__badge--ops {
	background: rgba(100, 149, 237, 0.25);
	color: #9cf;
}

.egl-cal-event__badge--buy {
	background: rgba(255, 179, 71, 0.2);
	color: #ffb347;
}

.egl-cal-buy {
	margin-top: 0.5rem;
	display: grid;
	gap: 0.45rem;
}

.egl-cal-buy select,
.egl-cal-buy button {
	font: inherit;
	border-radius: 6px;
	padding: 0.35rem 0.5rem;
	border: 1px solid rgba(0, 255, 255, 0.25);
	background: rgba(0, 10, 24, 0.8);
	color: var(--egl-cal-fg);
}

.egl-cal-buy button {
	background: linear-gradient(180deg, rgba(0, 180, 200, 0.35), rgba(0, 80, 120, 0.55));
	cursor: pointer;
	font-weight: 600;
	color: var(--egl-cal-heading);
}

.egl-cal-buy button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.egl-cal-buy__price {
	font-size: 0.85rem;
	color: var(--egl-cal-fg);
}

.egl-cal-buy__stack {
	font-size: 0.75rem;
	color: var(--egl-cal-fg-muted);
	font-style: italic;
}

.egl-cal-buy__anon {
	display: block;
	margin: 0.45rem 0 0.65rem;
	font-size: 0.78rem;
	color: var(--egl-cal-fg-muted);
	cursor: pointer;
}

.egl-cal-event__credit {
	font-size: 0.8rem;
	color: var(--egl-cal-fg-muted);
	margin-top: 0.2rem;
}

.egl-cal-msg {
	padding: 0.5rem 0.65rem;
	border-radius: 6px;
	margin-bottom: 0.75rem;
	font-size: 0.85rem;
	color: var(--egl-cal-fg);
}

.egl-cal-msg--error {
	background: rgba(180, 40, 40, 0.25);
	border: 1px solid rgba(255, 100, 100, 0.35);
}

.egl-cal-msg--ok {
	background: rgba(40, 140, 80, 0.25);
	border: 1px solid rgba(100, 255, 150, 0.35);
}

@media (max-width: 640px) {
	aside.egl-events-band.egl-events-band--live {
		min-height: 0;
		padding-top: 0.4rem;
		padding-bottom: 0.65rem;
	}

	.egl-cal__week {
		grid-template-columns: repeat(7, minmax(0, 1fr));
		gap: 0.2rem;
	}

	.egl-cal__day {
		min-height: 5.75rem;
		padding: 0.3rem 0.15rem;
	}

	.egl-cal__num {
		font-size: 0.95rem;
	}

	.egl-cal__chip {
		font-size: 0.5rem;
		padding: 0.08rem 0.15rem;
	}

	.egl-cal-sheet__panel {
		width: 100%;
	}
}
