/* UTC Redaktion – nutzt die Farben des Themes, mit Fallbacks */
.utc-red {
	--r-gruen: var(--wp--preset--color--gruen, #17432B);
	--r-gelb: var(--wp--preset--color--ballgelb, #D7E52A);
	--r-text: var(--wp--preset--color--text, #13211A);
	--r-grau: var(--wp--preset--color--grau, #4A5A50);
	--r-linie: var(--wp--preset--color--linie, #DDE2D6);
	--r-hell: var(--wp--preset--color--hellgruen, #E9F0E4);
	font-size: 1rem;
	color: var(--r-text);
}
.utc-red * { box-sizing: border-box; }
.utc-red h2 { margin: 0; font-size: 2rem; }

/* Meldungen */
.utc-red__msg { padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-weight: 600; }
.utc-red__msg.is-ok { background: var(--r-hell); color: var(--r-gruen); }
.utc-red__msg.is-fehler { background: #FBE3E1; color: #8E1F17; }
.utc-red__note { background: #fff; border: 1px dashed var(--r-linie); border-radius: 14px; padding: 20px; color: var(--r-grau); }
.utc-red__small { font-size: .875rem; color: var(--r-grau); margin: 6px 0 0; }

/* Buttons */
.utc-red__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--r-linie);
	background: #fff; color: var(--r-text); font: inherit; font-weight: 700; font-size: .9375rem;
	text-decoration: none; cursor: pointer; white-space: nowrap;
}
.utc-red__btn:hover { border-color: var(--r-gruen); color: var(--r-gruen); }
.utc-red__btn.is-primary { background: var(--r-gruen); border-color: var(--r-gruen); color: #fff; }
.utc-red__btn.is-primary:hover { background: var(--wp--preset--color--dunkelgruen, #0F2E1E); color: #fff; }
.utc-red__btn.is-ghost { border-color: transparent; background: transparent; }
.utc-red__btn.is-danger:hover { border-color: #B3261E; color: #B3261E; }

/* Login */
.utc-red__login { max-width: 420px; margin: 0 auto; background: #fff; border: 1px solid var(--r-linie); border-radius: 18px; padding: 28px; }
.utc-red__login p { color: var(--r-grau); }
.utc-red__login .utc-red__btn { width: 100%; margin-top: 16px; }

/* Formularfelder */
.utc-red label, .utc-red__label { display: block; font-weight: 700; margin: 18px 0 6px; }
.utc-red input[type="text"], .utc-red input[type="password"], .utc-red select {
	width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--utc-feldrand, #C3CBBC); border-radius: 12px;
	font: inherit; background: #fff; color: var(--r-text);
}
.utc-red input:focus, .utc-red select:focus, .utc-red__area:focus { outline: 3px solid color-mix(in srgb, var(--utc-gruen, #17432B) 25%, transparent); border-color: var(--r-gruen); }
.utc-red .utc-red__check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 12px 0 0; }

/* Kopfzeile */
.utc-red__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid var(--r-linie); }
.utc-red__tabs { display: flex; gap: 6px; }
.utc-red__tabs a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--r-grau); }
.utc-red__tabs a.is-active { background: var(--r-hell); color: var(--r-gruen); }
.utc-red__user { display: flex; flex-wrap: wrap; gap: 14px; font-size: .9375rem; color: var(--r-grau); }
.utc-red__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }

/* Liste */
.utc-red__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.utc-red__item { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--r-linie); border-radius: 16px; padding: 12px; }
.utc-red__thumb { flex: none; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--r-hell); }
.utc-red__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.utc-red__info { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.utc-red__title { font-weight: 700; font-size: 1.0625rem; }
.utc-red__meta { font-size: .875rem; color: var(--r-grau); }
.utc-red__chip { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-right: 6px; }
.utc-red__chip.is-online { background: var(--r-hell); color: var(--r-gruen); }
.utc-red__chip.is-offline { background: #EEF0F2; color: #4D5560; }
.utc-red__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.utc-red__actions form { margin: 0; }
.utc-red__pages { display: flex; gap: 6px; margin-top: 18px; }
.utc-red__pages a { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--r-linie); text-decoration: none; }
.utc-red__pages a.is-active { background: var(--r-gruen); color: #fff; border-color: var(--r-gruen); }

/* Bearbeiten */
.utc-red__form { background: #fff; border: 1px solid var(--r-linie); border-radius: 18px; padding: 8px 24px 24px; }
.utc-red__photo-current img { display: block; max-width: 100%; width: 320px; height: auto; border-radius: 12px; }
.utc-red__file { display: inline-flex !important; margin: 10px 0 0 !important; cursor: pointer; }
.utc-red__file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.utc-red__file span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px dashed var(--utc-feldrand, #C3CBBC); font-weight: 700; }
.utc-red__file:focus-within span, .utc-red__file:hover span { border-color: var(--r-gruen); color: var(--r-gruen); }
.utc-red__editor { border: 1px solid var(--utc-feldrand, #C3CBBC); border-radius: 12px; overflow: hidden; }
.utc-red__toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--wp--preset--color--hintergrund, #F5F6F0); border-bottom: 1px solid var(--r-linie); }
.utc-red__toolbar button { min-width: 44px; min-height: 40px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; font: inherit; font-weight: 600; cursor: pointer; color: var(--r-text); }
.utc-red__toolbar button:hover { background: #fff; border-color: var(--r-linie); }
.utc-red__area { min-height: 260px; padding: 14px; line-height: 1.6; background: #fff; }
.utc-red__area:empty::before { content: "Hier den Text schreiben …"; color: var(--utc-auf-dunkel-3, #8A958E); }
.utc-red__area h3 { font-size: 1.375rem; margin: 1em 0 .4em; }
.utc-red__submit { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

@media (max-width: 600px) {
	.utc-red__form { padding: 4px 16px 18px; }
	.utc-red__actions { width: 100%; }
	.utc-red__actions .utc-red__btn { flex: 1 1 auto; }
	.utc-red__submit .utc-red__btn { width: 100%; }
}

/* Mitgliedsbeiträge */
.utc-red textarea, .utc-red input[type="number"] {
	width: 100%; padding: 10px 14px; border: 1px solid var(--utc-feldrand, #C3CBBC); border-radius: 12px; font: inherit; background: #fff; color: var(--r-text);
}
.utc-red input[type="number"] { min-height: 48px; }
.utc-red__box { border: 1px solid var(--r-linie); border-radius: 14px; padding: 4px 18px 16px; margin: 18px 0 0; }
.utc-red__box legend { font-weight: 800; padding: 0 6px; }
.utc-red__row { display: flex; flex-wrap: wrap; gap: 0 14px; }
.utc-red__col { flex: 1 1 220px; min-width: 0; }
.utc-red__col.is-small { flex: 0 1 130px; }
.utc-red__checks { display: flex; flex-wrap: wrap; gap: 0 24px; }

/* Termine */
.utc-red input[type="date"], .utc-red input[type="time"] {
	width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--utc-feldrand, #C3CBBC); border-radius: 12px; font: inherit; background: #fff; color: var(--r-text);
}
.utc-red__sub { font-size: 1.125rem; margin: 22px 0 10px; text-transform: none; letter-spacing: 0; font-family: inherit; font-weight: 700; }
.utc-red__date { flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--r-hell); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; color: var(--r-gruen); }
.utc-red__date b { font-size: 1.5rem; }
.utc-red__date small { font-size: .75rem; text-transform: uppercase; margin-top: 3px; }
.utc-red__list.is-past .utc-red__item { opacity: .7; }

/* Filter, Radio */
.utc-red__filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.utc-red__filter a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--r-linie); text-decoration: none; font-weight: 600; font-size: .875rem; color: var(--r-text); }
.utc-red__filter a.is-active { background: var(--r-gruen); border-color: var(--r-gruen); color: #fff; }
.utc-red__radio { border: 0; padding: 0; margin: 18px 0 0; }
.utc-red__radio legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.utc-red__radio label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 0 24px 0 0; min-height: 44px; }

/* Startseiten-Vorschau */
.utc-red__hero { background: var(--r-gruen); border-radius: 18px; padding: 22px 24px 26px; display: flex; flex-direction: column; }
.utc-red__hero .utc-red__hero-tag { display: inline-block; align-self: flex-start; margin: 16px 0 4px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.utc-red__hero .utc-red__hero-tag:first-child { margin-top: 0; }
.utc-red__hero input, .utc-red__hero textarea {
	width: 100%; background: transparent; border: 2px dashed rgba(255,255,255,.35); border-radius: 10px; padding: 6px 10px; color: #fff; box-sizing: border-box;
}
.utc-red__hero input:focus, .utc-red__hero textarea:focus { border-style: solid; border-color: var(--r-gelb); outline: none; }
.utc-red__hero-kicker { font-weight: 700 !important; font-size: .875rem !important; letter-spacing: .14em; text-transform: uppercase; color: var(--r-gelb) !important; min-height: 40px; }
.utc-red__hero-big { font-family: var(--wp--preset--font-family--barlow-condensed, "Barlow Condensed", sans-serif) !important; font-weight: 800 !important; font-size: clamp(2rem, 6vw, 3.5rem) !important; line-height: 1 !important; text-transform: uppercase; min-height: 64px; }
.utc-red__hero-big.is-gelb { color: var(--r-gelb) !important; }
.utc-red__hero-text { font-size: 1.125rem !important; line-height: 1.5; color: var(--utc-auf-dunkel, #D9E4DC) !important; resize: vertical; }
.utc-red .utc-red__hero input[type="text"], .utc-red .utc-red__hero textarea { background: transparent; color: #fff; border: 2px dashed rgba(255,255,255,.35); min-height: 0; }
.utc-red .utc-red__hero input[type="text"]:focus, .utc-red .utc-red__hero textarea:focus { border-style: solid; border-color: var(--r-gelb); }

/* Layout mit Seitennavigation */
.utc-red__layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.utc-red__side { flex: 0 0 230px; background: #fff; border: 1px solid var(--r-linie); border-radius: 18px; padding: 14px; }
.utc-red__main { flex: 999 1 520px; min-width: 0; }
.utc-red__brand { display: flex; flex-direction: column; padding: 6px 10px 12px; border-bottom: 1px solid var(--r-linie); margin-bottom: 8px; }
.utc-red__brand-title { font-weight: 800; font-size: 1.125rem; color: var(--r-gruen); }
.utc-red__brand-user { font-size: .8125rem; color: var(--r-grau); }
.utc-red__nav { display: flex; flex-direction: column; gap: 2px; }
.utc-red__nav-group { font-size: .6875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--r-grau); padding: 12px 10px 4px; }
.utc-red__nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: 10px; text-decoration: none; color: var(--r-text); font-weight: 600; font-size: .9375rem; }
.utc-red__nav a svg { flex: none; color: var(--r-grau); }
.utc-red__nav a:hover { background: var(--wp--preset--color--hintergrund, #F5F6F0); color: var(--r-text); }
.utc-red__nav a.is-active { background: var(--r-gruen); color: #fff; }
.utc-red__nav a.is-active svg { color: var(--r-gelb); }
.utc-red__nav-sep { height: 1px; background: var(--r-linie); margin: 10px 4px; }
.utc-red__nav a.is-logout { color: var(--r-grau); font-weight: 500; }

@media (max-width: 860px) {
	.utc-red__layout { flex-direction: column; gap: 16px; }
	.utc-red__side { position: static; flex: none; width: 100%; padding: 8px; }
	.utc-red__brand { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 4px 8px 8px; }
	.utc-red__nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: thin; }
	.utc-red__nav-group, .utc-red__nav-sep { display: none; }
	.utc-red__nav a { flex: none; min-height: 40px; padding: 0 12px; border: 1px solid var(--r-linie); border-radius: 999px; white-space: nowrap; }
	.utc-red__nav a.is-trash { margin-left: auto; }
}

/* Spielgebiet-Zeile */
.utc-red__inline { background: #fff; border: 1px solid var(--r-linie); border-radius: 14px; padding: 2px 16px 16px; margin-bottom: 18px; }
.utc-red__inline-row { display: flex; gap: 10px; flex-wrap: wrap; }
.utc-red__inline-row input { flex: 1 1 220px; }

/* Seitenleiste nur dann mitlaufen lassen, wenn sie wirklich neben dem Inhalt steht */
@media (min-width: 1100px) {
	.utc-red__layout { flex-wrap: nowrap; }
	.utc-red__side { position: sticky; top: 24px; }
}

/* Sponsoren-Logos */
.utc-red__logo { flex: none; width: 120px; height: 72px; border-radius: 10px; background: #fff; border: 1px solid var(--r-linie); display: flex; align-items: center; justify-content: center; padding: 6px; }
.utc-red__logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.utc-red__logo.is-large { width: 260px; height: 140px; margin-bottom: 8px; }
.utc-red input[type="email"] { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--utc-feldrand, #C3CBBC); border-radius: 12px; font: inherit; background: #fff; flex: 1 1 220px; }

/* Livestream */
.utc-red__courts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.utc-red__court { background: #fff; border: 2px solid var(--r-linie); border-radius: 18px; padding: 14px 16px 18px; display: flex; flex-direction: column; }
.utc-red__court.is-live { border-color: #C8312B; }
.utc-red__court-head { display: flex; justify-content: space-between; align-items: center; }
.utc-red__court-name { font-weight: 800; font-size: 1.125rem; }
.utc-red__court-img { margin-top: 10px; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--utc-flaeche, #1C3D2B); color: var(--utc-auf-dunkel, #D9E4DC); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; font-size: .875rem; }
.utc-red__court-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.utc-red__court-img small { position: absolute; right: 8px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 8px; border-radius: 6px; }
.utc-red__court-img small.is-alt { background: #B3261E; }
.utc-red__court .utc-red__btn { margin-top: 16px; }
.utc-red__switch { display: flex !important; align-items: center; gap: 10px; font-weight: 700 !important; margin-top: 16px !important; min-height: 44px; }
.utc-red__switch input { width: 22px; height: 22px; accent-color: #C8312B; }
.utc-red__chip.is-online:is(.utc-red__court-head *) { background: #C8312B; color: #fff; }

/* Kamerabild im Hochformat */
.utc-red__court-img { aspect-ratio: 3 / 4; max-height: 340px; }
.utc-red__court-img img { object-fit: contain; background: var(--utc-tief, #0A1911); }

/* Vorstand: rundes Foto bzw. Initialen */
.utc-red__avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--r-hell); color: var(--r-gruen); display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; }
.utc-red__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.utc-red__avatar.is-large { width: 140px; height: 140px; margin-bottom: 8px; }

/* News: optionaler Termin */
.utc-red__termin-opt { margin-top: 18px; }
.utc-red__termin-opt .utc-red__btn { margin-top: 12px; }
.utc-red__chip.is-termin { background: var(--r-hell); color: var(--r-gruen); }

/* Galerie */
.utc-red__gal-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.utc-red__gal-filter a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--r-linie); color: var(--r-text); text-decoration: none; font-weight: 600; font-size: .9375rem; background: #fff; }
.utc-red__gal-filter a.is-active { background: var(--r-gruen); border-color: var(--r-gruen); color: #fff; }
.utc-red__gal-filter small { opacity: .7; }
.utc-red__album { margin-bottom: 28px; }
.utc-red__album h3 { margin: 0 0 10px; font-size: 1.125rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.utc-red__album h3 small { font-weight: 500; color: var(--r-grau); font-size: .875rem; }
.utc-red__gal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.utc-red__gal li { position: relative; }
.utc-red__gal-bild { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--r-hell); border: 1px solid var(--r-linie); }
.utc-red__gal-bild img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.utc-red__gal-bild:hover img { transform: scale(1.04); }
.utc-red__gal form { position: absolute; top: 6px; right: 6px; margin: 0; }
.utc-red__gal-del { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .875rem; cursor: pointer; }
.utc-red__gal-del:hover { background: #B3261E; }
.utc-red textarea#utc-gal-text { width: 100%; padding: 10px 14px; border: 1px solid var(--utc-feldrand, #C3CBBC); border-radius: 12px; font: inherit; }

/* Turnier: Spielzeilen */
.utc-red__spielzeile { align-items: flex-end; padding: 6px 0 12px; border-bottom: 1px solid var(--r-linie); }
.utc-red__spielzeile label { margin-top: 10px; }
.utc-red__spiel-weg { flex: none; width: 44px; height: 48px; border-radius: 12px; border: 1.5px solid var(--r-linie); background: #fff; color: #8E1F17; font-size: 1rem; cursor: pointer; }
.utc-red__spiel-weg:hover { border-color: #B3261E; background: #FBE3E1; }

/* News: weitere Fotos / Galerie-Kennzeichen */
.utc-red__galerie-check { align-items: flex-start !important; margin-top: 18px !important; padding: 14px 16px; border: 1.5px solid var(--r-linie); border-radius: 12px; background: #fff; }
.utc-red__galerie-check input { margin-top: 4px; }
.utc-red__photo .utc-red__gal { margin-bottom: 12px; }
.utc-red__photo .utc-red__gal .utc-red__check { margin-top: 4px; font-size: .875rem; }

/* Spiel-Rangliste */
.utc-red__rang { margin: 8px 0 16px; padding-left: 1.6em; }
.utc-red__rang li { margin-bottom: 6px; }

/* Spiel-Rangliste (Tabelle) */
.utc-red__tabelle-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--r-linie); border-radius: 14px; }
.utc-red__tabelle { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.utc-red__tabelle th, .utc-red__tabelle td { padding: 8px 12px; border-bottom: 1px solid var(--r-linie); text-align: left; white-space: nowrap; }
.utc-red__tabelle th { font-size: .8125rem; color: var(--r-grau); font-weight: 700; }
.utc-red__tabelle tr:last-child td { border-bottom: 0; }
.utc-red .utc-red__tabelle input.utc-red__kuerzel { width: 5em; min-height: 38px; text-transform: uppercase; font-family: ui-monospace, Consolas, monospace; letter-spacing: .15em; }
.utc-red .utc-red__tabelle input.utc-red__punkte { width: 7em; min-height: 38px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Speichern: Sperre mit Fortschrittsanzeige */
.utc-red__sperre { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; background: rgba(255,255,255,.72); backdrop-filter: blur(2px); cursor: progress; animation: utc-red-einblenden .15s ease-out; }
.utc-red__sperre-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 34px; border-radius: 18px; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.18); text-align: center; color: var(--r-text); }
.utc-red__sperre-box strong { font-size: 1.125rem; }
.utc-red__sperre-box small { color: var(--r-grau); }
.utc-red__spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--r-hell); border-top-color: var(--r-gruen); animation: utc-red-drehen .8s linear infinite; }
@keyframes utc-red-drehen { to { transform: rotate(360deg); } }
@keyframes utc-red-einblenden { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .utc-red__spinner { animation-duration: 2.4s; } }
body.utc-red-gesperrt { overflow: hidden; }
