/* MyRCM – box nadcházejícího závodu. Písmo se dědí ze šablony; vlastní pozadí a barva textu,
   aby byl box čitelný i na tmavé sekci nebo přes obrázek. */
.myrcm-box {
	background: #fff;
	color: #222;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	padding: 16px 20px;
	margin: 0 0 1em;
}

.myrcm-box .myrcm-box__name,
.myrcm-box .myrcm-box__table th,
.myrcm-box .myrcm-box__table td {
	color: inherit;
}

.myrcm-box__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px 24px;
	margin-bottom: 14px;
}

.myrcm-box__name {
	margin: 0 0 4px;
}

.myrcm-box__date {
	opacity: 0.8;
}

.myrcm-box__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.myrcm-box a.myrcm-box__button {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 4px;
	background: var(--e-global-color-accent, #0969da);
	color: #fff;
	font-weight: 600;
	text-decoration: none !important; /* OceanWP podtrhává odkazy v obsahu stránek mimo Elementor */
	white-space: nowrap;
}

.myrcm-box a.myrcm-box__button:hover,
.myrcm-box a.myrcm-box__button:focus {
	color: #fff;
	filter: brightness(0.9);
}

.myrcm-box a.myrcm-box__button--secondary,
.myrcm-box a.myrcm-box__button--secondary:hover,
.myrcm-box a.myrcm-box__button--secondary:focus {
	background: transparent;
	color: var(--e-global-color-accent, #0969da);
	box-shadow: inset 0 0 0 2px currentColor;
}

.myrcm-box button.myrcm-box__count {
	all: unset;
	cursor: pointer;
	color: var(--e-global-color-accent, #0969da);
	text-decoration: underline dotted;
	text-underline-offset: 3px;
}

.myrcm-box button.myrcm-box__count:hover,
.myrcm-box button.myrcm-box__count:focus-visible {
	text-decoration-style: solid;
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Okno se seznamem jezdců. */
.myrcm-box__dialog {
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: #fff;
	color: #222;
	width: min(480px, calc(100vw - 32px));
	max-height: calc(100vh - 64px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.myrcm-box__dialog::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.myrcm-box__dialog-body {
	padding: 16px 20px 20px;
}

.myrcm-box__dialog-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
}

.myrcm-box .myrcm-box__dialog-title {
	margin: 0;
	color: inherit;
}

.myrcm-box__dialog-title span {
	font-weight: 400;
	opacity: 0.7;
}

.myrcm-box__dialog form {
	margin: 0;
}

.myrcm-box button.myrcm-box__close {
	all: unset;
	cursor: pointer;
	font-size: 1.6em;
	line-height: 1;
	padding: 0 4px;
	color: inherit;
}

.myrcm-box__note {
	margin: 0 0 10px;
	font-size: 0.9em;
	opacity: 0.8;
}

.myrcm-box__riders {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.myrcm-box .myrcm-box__riders th,
.myrcm-box .myrcm-box__riders td {
	padding: 6px 8px;
	text-align: left;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	color: inherit;
	background: none;
}

.myrcm-box__riders th {
	font-size: 0.8em;
	font-weight: 600;
}

.myrcm-box__riders td:first-child,
.myrcm-box__riders th:first-child {
	width: 2.5em;
	opacity: 0.7;
}

.myrcm-box__riders td:last-child,
.myrcm-box__riders th:last-child {
	width: 3.5em;
}

.myrcm-box__table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	margin: 0;
}

.myrcm-box__table th,
.myrcm-box__table td {
	padding: 6px 4px;
	text-align: center;
	border: 1px solid rgba(0, 0, 0, 0.1);
	word-wrap: break-word;
}

.myrcm-box__table th {
	font-size: 0.8em;
	font-weight: 600;
}

.myrcm-box__table td {
	font-size: 1.25em;
	font-weight: 600;
}

.myrcm-box .myrcm-box__table .myrcm-box__total {
	background: #222;
	color: #fff;
	font-weight: 700;
}

/* Úzký kontejner: seznam „kategorie – počet“ pod sebou, Celkem poslední. */
@media (max-width: 640px) {
	.myrcm-box__table thead {
		display: none;
	}

	.myrcm-box__table,
	.myrcm-box__table tbody,
	.myrcm-box__table tr {
		display: block;
		width: 100%;
	}

	.myrcm-box__table td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		text-align: right;
		font-size: 1em;
		border-width: 0 0 1px;
	}

	.myrcm-box__table td::before {
		content: attr(data-label);
		text-align: left;
		font-weight: 400;
	}
}
