/* Dockside Extras. Leans on the Dockside theme's colour and type tokens. */

.dx-next,
.dx-fame__card,
.dx-rank,
.dx-fame-empty {
	border: 1px solid var(--wp--preset--color--line, #22324a);
	border-radius: var(--dockside-radius, 8px);
	background: var(--dockside-sunk, #0b121c);
}

.dx-next__eyebrow,
.dx-fame__date,
.dx-log__kind,
.dx-log__when,
.dx-next__count-label,
.dx-rank__label,
.dx-next__cal {
	font-family: var(--dockside-mono, ui-monospace, monospace);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted, #8a97a8);
}

[class^="dx-"],
[class*=" dx-"] {
	box-sizing: border-box;
}

/* Next event ------------------------------------------------------------ */

.dx-next {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 2.5rem;
	padding: 1.5rem 1.75rem;
}

.dx-next__main {
	flex: 1 1 18rem;
	min-width: 0;
}

.dx-next__eyebrow {
	margin: 0 0 0.35rem;
	color: var(--wp--preset--color--accent, #e0a83f);
}

.dx-next__title {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	line-height: 1.1;
}

.dx-next__title a {
	color: inherit;
	text-decoration: none;
}

.dx-next__title a:hover,
.dx-next__title a:focus-visible {
	text-decoration: underline;
}

.dx-next__meta {
	margin: 0.6rem 0 0;
	color: var(--wp--preset--color--muted, #8a97a8);
}

.dx-next__side {
	flex: 0 1 auto;
	text-align: right;
}

.dx-next__count {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	margin: 0;
}

.dx-next__count-value {
	font-family: var(--dockside-mono, ui-monospace, monospace);
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--accent, #e0a83f);
	white-space: nowrap;
}

.dx-next__count.is-live .dx-next__count-value {
	color: var(--wp--preset--color--signal, #5fd0b5);
}

.dx-next__cal {
	margin: 0.75rem 0 0;
	text-transform: none;
	letter-spacing: 0.02em;
}

@media (max-width: 40rem) {
	.dx-next__side {
		text-align: left;
	}
}

/* Hall of Fame ---------------------------------------------------------- */

.dx-fame {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
	gap: 1.5rem;
}

.dx-fame__card {
	padding: 1.5rem;
}

.dx-fame__date {
	margin: 0 0 0.4rem;
	color: var(--wp--preset--color--accent, #e0a83f);
}

.dx-fame__title {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	line-height: 1.2;
}

.dx-fame__title a {
	color: inherit;
	text-decoration: none;
}

.dx-fame__title a:hover,
.dx-fame__title a:focus-visible {
	text-decoration: underline;
}

.dx-fame__podium {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dx-fame__place {
	display: grid;
	grid-template-columns: 1.75rem 1fr auto;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.55rem 0;
	border-top: 1px solid var(--wp--preset--color--line, #22324a);
}

.dx-fame__pos,
.dx-fame__gain {
	font-family: var(--dockside-mono, ui-monospace, monospace);
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--muted, #8a97a8);
}

.dx-fame__name {
	overflow-wrap: anywhere;
}

.dx-fame__place--1 .dx-fame__name {
	font-weight: 700;
}

.dx-fame__place--1 .dx-fame__pos,
.dx-fame__place--1 .dx-fame__gain {
	color: var(--wp--preset--color--accent, #e0a83f);
}

.dx-fame__empty,
.dx-fame-empty p {
	margin: 0;
	color: var(--wp--preset--color--muted, #8a97a8);
}

.dx-fame-empty {
	padding: 1.5rem 1.75rem;
}

/* Clan log -------------------------------------------------------------- */

.dx-log__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dx-log__item {
	display: grid;
	grid-template-columns: 4.5rem 1fr auto;
	align-items: baseline;
	gap: 0.25rem 1rem;
	padding: 0.7rem 1.25rem;
	border-bottom: 1px solid var(--wp--preset--color--line, #22324a);
}

.dx-log__item:last-child {
	border-bottom: 0;
}

.dx-log__text {
	min-width: 0;
	overflow-wrap: anywhere;
}

.dx-log__item--feat .dx-log__kind {
	color: var(--wp--preset--color--accent, #e0a83f);
}

.dx-log__item--join .dx-log__kind {
	color: var(--wp--preset--color--signal, #5fd0b5);
}

.dx-log__when {
	text-transform: none;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.dx-log__empty {
	margin: 0;
	padding: 1rem 1.25rem;
	color: var(--wp--preset--color--muted, #8a97a8);
}

@media (max-width: 34rem) {
	.dx-log__item {
		grid-template-columns: 4.5rem 1fr;
	}

	.dx-log__when {
		grid-column: 2;
	}
}

/* Rank check ------------------------------------------------------------ */

.dx-rank {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
	gap: 1.5rem 2.5rem;
	align-items: center;
	padding: 1.5rem 1.75rem;
}

.dx-rank__label {
	display: block;
	margin-bottom: 0.6rem;
	color: var(--wp--preset--color--accent, #e0a83f);
}

.dx-rank__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.dx-rank__input {
	flex: 1 1 11rem;
	min-width: 0;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--wp--preset--color--line, #22324a);
	border-radius: var(--dockside-radius, 8px);
	background: transparent;
	color: inherit;
	font: inherit;
}

.dx-rank__input:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent, #e0a83f);
	outline-offset: 2px;
}

.dx-rank__button {
	cursor: pointer;
}

.dx-rank__button[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.dx-rank__hint {
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted, #8a97a8);
}

.dx-rank__result p {
	margin: 0;
}

.dx-rank__who,
.dx-rank__wait {
	color: var(--wp--preset--color--muted, #8a97a8);
}

.dx-rank__rank {
	font-family: var(--dockside-display, inherit);
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 1.05;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent, #e0a83f);
}

.dx-rank__bar {
	height: 0.4rem;
	margin: 0.75rem 0 0.6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--line, #22324a);
	overflow: hidden;
}

.dx-rank__bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--wp--preset--color--accent, #e0a83f);
}

.dx-rank__error {
	color: var(--wp--preset--color--signal, #5fd0b5);
}

/* Metric icons ----------------------------------------------------------- */

.dx-icon {
	display: inline-block;
	width: auto;
	height: 1.25em;
	margin-right: 0.45em;
	vertical-align: -0.25em;
	image-rendering: pixelated;
}

.dx-next__title .dx-icon {
	height: 1em;
	vertical-align: -0.12em;
}

.dx-fame__date .dx-icon {
	height: 1.5em;
	vertical-align: -0.4em;
}

/* Own events board -------------------------------------------------------- */

.dx-schedule {
	margin-top: 1.5rem;
}

.dx-schedule .dockside-comps__item.is-live .dockside-comps__status {
	color: var(--wp--preset--color--signal, #5fd0b5);
}

.dx-schedule span.dockside-comps__title {
	display: block;
}
