/* Rubix Events – inherits your theme's fonts. Change the colour with [rubix_events accent="#hex"]. */
.rx-events {
	/* Lines and grey text are mixed from the theme's own text colour, so they work on light and dark sites. */
	--rx-accent: currentColor;
	--rx-accent-text: #fff;
	--rx-line: color-mix(in srgb, currentColor 22%, transparent);
	--rx-muted: color-mix(in srgb, currentColor 68%, transparent);
	--rx-radius: 10px;
	margin: 0 0 2em;
}

.rx-events *,
.rx-events *::before,
.rx-events *::after { box-sizing: border-box; }

/* Filters */
.rx-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	margin: 0 0 1.5em;
	padding: 14px 16px;
	border: 1px solid var(--rx-line);
	border-radius: var(--rx-radius);
}
.rx-filter { display: flex; flex-direction: column; gap: 4px; margin: 0; flex: 1 1 200px; max-width: 320px; }
.rx-filter span { font-size: 0.8em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rx-muted); }
.rx-filter select {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	font: inherit;
	border: 1px solid var(--rx-line);
	border-radius: 6px;
	background-color: transparent;
	color: inherit;
}
.rx-filter select option { color: #111; background: #fff; }
.rx-reset {
	min-height: 44px;
	padding: 8px 14px;
	font: inherit;
	font-size: 0.9em;
	background: none;
	border: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* Sections */
.rx-section { margin: 0 0 2em; }
.rx-heading { margin: 0 0 0.6em; font-size: 1.4em; line-height: 1.2; }
.rx-past > summary { cursor: pointer; list-style: none; padding: 12px 0; border-top: 1px solid var(--rx-line); }
.rx-past > summary::-webkit-details-marker { display: none; }
.rx-past > summary::after { content: "+"; float: right; font-weight: 400; }
.rx-past[open] > summary::after { content: "−"; }
.rx-count { font-weight: 400; color: var(--rx-muted); font-size: 0.8em; }
.rx-empty { padding: 1.2em 0; color: var(--rx-muted); margin: 0; }

/* List */
.rx-list { list-style: none; margin: 0; padding: 0; }
.rx-event {
	display: grid;
	grid-template-columns: 72px auto 1fr auto;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 16px 0;
	border-bottom: 1px solid var(--rx-line);
}
.rx-event[hidden] { display: none; }
.rx-event > .rx-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.rx-event:not(:has(.rx-thumb)) { grid-template-columns: 72px 1fr auto; }

.rx-date { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.1; }
.rx-dow, .rx-mon { font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rx-muted); }
.rx-day { font-size: 1.9em; font-weight: 700; }

.rx-info p { margin: 0; }
.rx-show { font-weight: 700; font-size: 1.05em; }
.rx-where { margin-top: 2px; }
.rx-meta { margin-top: 2px; font-size: 0.9em; color: var(--rx-muted); }

.rx-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.rx-button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 22px;
	border-radius: 999px;
	background: var(--rx-accent);
	color: var(--rx-accent-text) !important;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	transition: opacity 0.15s;
}
.rx-button:hover, .rx-button:focus-visible { opacity: 0.85; }
.rx-button:focus-visible { outline: 2px solid var(--rx-accent); outline-offset: 3px; }
.rx-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid currentColor;
	font-size: 0.8em;
	font-weight: 600;
	white-space: nowrap;
}
.rx-badge-hot { background: var(--rx-accent); border-color: var(--rx-accent); color: var(--rx-accent-text); }
.rx-badge-today { background: var(--rx-accent); border-color: var(--rx-accent); color: var(--rx-accent-text); }
.rx-badge-muted { color: var(--rx-muted); }

.rx-status-cancelled .rx-info,
.rx-status-cancelled .rx-date { opacity: 0.55; text-decoration: line-through; }
.rx-past .rx-event { opacity: 0.75; }

/* Phones */
@media (max-width: 600px) {
	.rx-event,
	.rx-event:not(:has(.rx-thumb)) { grid-template-columns: 60px 1fr; gap: 6px 14px; }
	.rx-event > .rx-thumb { display: none; }
	.rx-action { grid-column: 2; justify-content: flex-start; margin-top: 6px; }
	.rx-filter { max-width: none; }
}


/* Logo walls – [rubix_logos] */
.rx-logo-section { margin: 0 0 3.5em; }
.rx-logo-divider { border: 0; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); margin: 0 0 3.5em; }
.rx-logo-title { text-align: center; margin: 0 0 1.4em; }
.rx-logos {
	--rx-logo-h: 64px;
	--rx-logo-cols: 8;
	list-style: none;
	margin: 0 auto;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 40px 28px;
}
.rx-logo {
	margin: 0;
	flex: 0 0 calc((100% - (var(--rx-logo-cols) - 1) * 28px) / var(--rx-logo-cols));
	min-width: 100px;
	height: var(--rx-logo-h);
	display: flex;
	justify-content: center;
	align-items: center;
}
.rx-logo a { display: flex; justify-content: center; align-items: center; height: 100%; text-decoration: none !important; color: inherit; }
/* Every logo fits the same box, so wide and square logos look balanced. */
.rx-logo-img {
	display: block;
	max-height: var(--rx-logo-h);
	max-width: min(100%, calc(var(--rx-logo-h) * 2.6));
	width: auto;
	height: auto;
	object-fit: contain;
	filter: grayscale(1);
	opacity: 0.8;
	transition: filter 0.2s, opacity 0.2s;
}
.rx-logos-colour .rx-logo-img { filter: none; opacity: 1; }
.rx-logo:hover .rx-logo-img { filter: none; opacity: 1; }
.rx-logo-name {
	font-weight: 700;
	font-size: 1.05em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	line-height: 1.2;
	opacity: 0.75;
}
@media (max-width: 600px) {
	.rx-logos { gap: 28px 16px; }
	.rx-logo { flex-basis: calc((100% - 32px) / 3); min-width: 0; }
}
