/* Fruin Tournaments — public styles.
   Inherits the theme's typography; uses variables with safe fallbacks. */
.frt-tournament,
.frt-team-profile {
	--frt-line: rgba(128, 128, 128, 0.28);
	--frt-soft: rgba(128, 128, 128, 0.08);
	--frt-accent: #1d6f5c;
	--frt-gold: #b98a1e;
	margin-top: 1.5em;
}

/* Notices */
.frt-notice {
	padding: 0.75em 1em;
	border-left: 4px solid var(--frt-accent);
	background: var(--frt-soft);
	margin: 0 0 1.25em;
	border-radius: 0 4px 4px 0;
}
.frt-notice--error { border-left-color: #b3312f; }

/* Header */
.frt-header {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 1em 0 1.25em;
	border-bottom: 1px solid var(--frt-line);
	margin-bottom: 1.5em;
}
.frt-header__icon { flex: 0 0 auto; line-height: 0; color: var(--frt-accent); }
.frt-header__icon img,
.frt-team-photo {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 50%;
	display: inline-block;
}
.frt-team-photo--placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--frt-soft);
	color: inherit;
	opacity: 0.6;
}
.frt-facts {
	list-style: none;
	margin: 0.4em 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em 1.25em;
	font-size: 0.95em;
	opacity: 0.9;
}
.frt-facts li { margin: 0; }

/* Badges & tags */
.frt-badge {
	display: inline-block;
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.25em 0.7em;
	border-radius: 999px;
	background: var(--frt-soft);
}
.frt-badge--registration { color: var(--frt-accent); box-shadow: inset 0 0 0 1px var(--frt-accent); }
.frt-badge--in_progress { color: #9a5b00; box-shadow: inset 0 0 0 1px #9a5b00; }
.frt-badge--complete { color: inherit; box-shadow: inset 0 0 0 1px var(--frt-line); }
.frt-tag {
	display: inline-block;
	font-size: 0.72em;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	background: var(--frt-soft);
}
.frt-tag--youth { box-shadow: inset 0 0 0 1px var(--frt-accent); color: var(--frt-accent); }
.frt-tag--champion { background: var(--frt-gold); color: #fff; }

/* Champion hero */
.frt-champion {
	text-align: center;
	padding: 2em 1em;
	margin: 0 0 1.75em;
	border: 1px solid var(--frt-gold);
	border-radius: 10px;
	background:
		radial-gradient(circle at 50% 0%, rgba(185, 138, 30, 0.14), transparent 65%);
}
.frt-champion__trophy { color: var(--frt-gold); }
.frt-champion__label {
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--frt-gold);
	margin: 0.25em 0 0.5em;
}
.frt-champion__team {
	font-size: 1.5em;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
}
.frt-champion__team .frt-team-photo { width: 48px; height: 48px; }

/* Teams grid */
.frt-teams__grid {
	list-style: none;
	margin: 0.75em 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.75em;
}
.frt-teams__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5em;
	text-align: center;
	padding: 1em 0.75em;
	border: 1px solid var(--frt-line);
	border-radius: 8px;
}
.frt-teams__card--pending { opacity: 0.6; }
.frt-teams__card .frt-team-photo { width: 56px; height: 56px; }

/* Bracket */
.frt-bracket-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.frt-bracket { margin-bottom: 1.5em; }
.frt-bracket__title { margin: 1em 0 0.5em; }
.frt-rounds {
	display: flex;
	align-items: stretch;
	gap: 2em;
	min-width: min-content;
	padding: 0.5em 0.25em 1em;
}
.frt-round { min-width: 190px; display: flex; flex-direction: column; }
.frt-round__name {
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
	margin-bottom: 0.75em;
}
.frt-round__matches {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	gap: 1em;
	flex: 1;
}
.frt-match {
	border: 1px solid var(--frt-line);
	border-radius: 8px;
	overflow: hidden;
	font-size: 0.95em;
	background: var(--frt-soft);
	position: relative;
}
.frt-match__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75em;
	padding: 0.45em 0.75em;
}
.frt-match__row + .frt-match__row { border-top: 1px solid var(--frt-line); }
.frt-match__row--winner { font-weight: 700; }
.frt-match__row--winner .frt-match__score { color: var(--frt-accent); }
.frt-match__team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frt-match__team a { text-decoration: none; }
.frt-match__score { font-variant-numeric: tabular-nums; font-weight: 600; }
.frt-match__note {
	font-size: 0.78em;
	padding: 0.25em 0.75em 0.45em;
	opacity: 0.7;
	border-top: 1px dashed var(--frt-line);
}
.frt-match--forfeit { opacity: 0.85; }
.frt-match--cancelled { opacity: 0.5; }
.frt-team--tbd, .frt-team--bye { opacity: 0.55; font-style: italic; }

/* Round robin */
.frt-rr-round { margin-bottom: 1.25em; }
.frt-rr-round__matches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 0.75em;
}

/* Tables */
.frt-table { width: 100%; border-collapse: collapse; margin-top: 0.75em; }
.frt-table th, .frt-table td {
	text-align: left;
	padding: 0.5em 0.75em;
	border-bottom: 1px solid var(--frt-line);
}
.frt-table th { font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }

/* Gallery */
.frt-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.6em;
	margin-top: 0.75em;
}
.frt-gallery__item img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

/* Forms */
.frt-form-section {
	margin: 2em 0;
	padding: 1.25em 1.5em;
	border: 1px solid var(--frt-line);
	border-radius: 10px;
}
.frt-form p { margin: 0 0 1em; }
.frt-form label { display: block; font-weight: 600; margin-bottom: 0.25em; }
.frt-form input[type="text"],
.frt-form input[type="email"],
.frt-form input[type="number"],
.frt-form select,
.frt-form textarea {
	width: 100%;
	max-width: 420px;
	padding: 0.5em 0.65em;
	border: 1px solid var(--frt-line);
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
}
.frt-check label { display: flex; align-items: center; gap: 0.5em; font-weight: 400; }
.frt-check--indent { margin-left: 1.5em; }
.frt-button {
	display: inline-block;
	padding: 0.6em 1.4em;
	border: 0;
	border-radius: 6px;
	background: var(--frt-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.frt-button:hover, .frt-button:focus { filter: brightness(1.1); }
.frt-button--small { padding: 0.35em 0.9em; font-size: 0.9em; }

/* Honeypot: visually removed, still in the DOM for bots. */
.frt-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Score entry */
.frt-score-row {
	display: flex;
	align-items: center;
	gap: 0.6em;
	flex-wrap: wrap;
}
.frt-score-row__team { font-weight: 600; min-width: 8em; }
.frt-score-row input[type="number"] { width: 4.5em; max-width: 4.5em; text-align: center; }
.frt-score-row__vs { opacity: 0.6; }
.frt-score-extra { margin: 0.5em 0 1.25em; font-size: 0.9em; }
.frt-score-extra summary { cursor: pointer; opacity: 0.75; }
.frt-score-extra label { font-weight: 400; }

/* Tournament list shortcode */
.frt-tournament-list { list-style: none; margin: 0; padding: 0; }
.frt-tournament-list__item {
	display: flex;
	align-items: center;
	gap: 0.75em;
	padding: 0.75em 0;
	border-bottom: 1px solid var(--frt-line);
}
.frt-tournament-list__icon { color: var(--frt-accent); line-height: 0; }
.frt-tournament-list__title { font-weight: 600; text-decoration: none; }
.frt-tournament-list__meta { opacity: 0.7; font-size: 0.9em; margin-left: auto; }

.frt-empty { opacity: 0.7; font-style: italic; }

@media (max-width: 600px) {
	.frt-header { flex-direction: column; align-items: flex-start; }
	.frt-round { min-width: 160px; }
	.frt-tournament-list__meta { margin-left: 0; flex-basis: 100%; }
	.frt-tournament-list__item { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: no-preference) {
	.frt-match { transition: border-color 0.2s ease; }
	.frt-match:hover { border-color: var(--frt-accent); }
}
