/* Matchday Club Pro – person cards construction kit (mdc/peoplekit). Parts sit freely on the card; sizes in cqw scale with the card. */
.mdc-pk { margin: 0 0 2rem; }
.mdc-pk__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--mdc-pk-w, 220px), 100%), 1fr)); gap: var(--mdc-pk-gap, 20px); }
.mdc-pk__card { position: relative; container-type: inline-size; aspect-ratio: 100 / var(--mdc-pk-ratio, 165); max-width: 100%; background: var(--mdc-pk-bg, var(--mdc-tile-bg, #fff)); color: var(--mdc-ink, #222); border-radius: var(--mdc-pk-radius, 12px); overflow: hidden; }
.mdc-pk.has-shadow .mdc-pk__card { box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.mdc-pk.has-line .mdc-pk__card { border-bottom: 4px solid var(--mdc-accent); }
.mdc-pk__card > .mdc-pp { position: absolute; margin: 0 !important; box-sizing: border-box; transform: none !important; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 0; font-size: max(11px, calc(var(--fs, 5) * 1cqw)); line-height: 1.25; overflow-wrap: anywhere; pointer-events: none; }
.mdc-pk__card > .mdc-pp > *, .mdc-pk__card > .mdc-pp.is-selected, .mdc-pk__card > .mdc-pp a { pointer-events: auto; }
.mdc-pp--image :is(.mdc-photo, .mdc-kit__img) { display: block; width: 100%; height: auto; aspect-ratio: 100 / var(--mdc-pk-photo-ratio, 108); object-fit: cover; border-radius: 0; }
.mdc-pp--image.is-round :is(.mdc-photo, .mdc-kit__img) { aspect-ratio: 1; border-radius: 50%; }
.mdc-pp--image.is-contain :is(.mdc-photo, .mdc-kit__img) { object-fit: contain; }
.mdc-pp--image :is(.mdc-photo--empty, .mdc-kit__img--empty) { background: linear-gradient(160deg, color-mix(in srgb, var(--mdc-accent) 35%, #fff), var(--mdc-accent)); }
.mdc-pp.is-strong { font-weight: 700; }
.mdc-pp.is-accent { text-transform: uppercase; letter-spacing: .04em; color: var(--mdc-role-color, var(--mdc-accent)); font-weight: 600; }
.mdc-pp.is-soft { font-style: italic; opacity: .85; }
.mdc-pk__html { display: flex; flex-direction: column; gap: .15em; width: 100%; }
.mdc-pk__html a { color: inherit; }
.mdc-pp--badge { font-weight: 800; }
.mdc-pp--badge.is-badge .mdc-pk__num { display: grid; place-items: center; min-width: 2.2em; height: 2.2em; padding: 0 .25em; border-radius: 999px; background: var(--mdc-accent); color: var(--mdc-on-accent, #fff); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.mdc-kit__link { position: absolute; inset: 0; z-index: 2; }
.mdc-pk__card:has(.mdc-kit__link) { transition: transform .2s ease, box-shadow .2s ease; }
.mdc-pk__card:has(.mdc-kit__link):hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
/* Editor */
.mdc-pk.is-editing .mdc-pk__stage { position: relative; display: inline-block; max-width: 100%; }
.mdc-pk.is-editing .mdc-pk__card { max-width: 100%; }
.mdc-pk__card > .mdc-pp.is-selected { z-index: 3; outline: 1px dashed #3858e9; outline-offset: 2px; cursor: move; }
.mdc-pk__handle { position: absolute; right: -6px; bottom: -6px; z-index: 5; width: 18px; height: 18px; cursor: nwse-resize; border-right: 3px solid #3858e9; border-bottom: 3px solid #3858e9; background: rgba(56,88,233,.15); }
.mdc-pk__hint { font-size: 12px; opacity: .6; margin: .4rem 0 0; }
.mdc-pk__sample { opacity: .45; font-style: italic; }
.mdc-pk__img { display: block; width: 100%; }
/* Banner kit */
.mdc-kit--herokit .mdc-pk__card { color: #fff; background: var(--mdc-pk-bg, var(--mdc-primary, #0b7a3b)); }
.mdc-pp--cover { overflow: hidden; }
.mdc-pp--cover :is(.mdc-kit__img, .mdc-pk__img, .mdc-pk__img img) { display: block; width: 100%; height: 100%; object-fit: cover; }
.mdc-pk__dim { position: absolute; inset: 0; background: rgba(0,0,0, var(--mdc-pk-dim, .35)); pointer-events: none; }
.mdc-pp.is-light { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
/* Club name of the banner as H1, H2 or paragraph (setting of the part): looks like the plain text */
.mdc-pp > .mdc-pp__h { margin: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; hyphens: inherit; overflow-wrap: inherit; word-break: inherit; }
.mdc-pk__btn { display: inline-block; padding: .55em 1.4em; border-radius: var(--mdc-btn-radius, 999px); background: var(--mdc-btn-bg, var(--mdc-accent)); color: var(--mdc-btn-color, #fff) !important; font-weight: 700; text-decoration: none; white-space: nowrap; }
.mdc-kit--herokit .mdc-pk__grid { grid-template-columns: 1fr; }
/* Phones: the banner keeps a usable height instead of shrinking with its width */
@media (max-width: 600px) { .mdc-kit--herokit .mdc-pk__card { aspect-ratio: auto; min-height: 360px; } }
.mdc-kit--herokit.is-editing .mdc-pk__stage, .mdc-kit--herokit.is-editing .mdc-pk__card { display: block; width: 100% !important; }

/* News & Termine kit */
.mdc-pp.is-left { align-items: flex-start; text-align: left; }
/* Left-aligned parts are wide but their text is short: the text box fills the part, so a click anywhere on it selects the part. */
.mdc-pp.is-left > * { align-self: stretch; }
.mdc-pp.is-clamp > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.mdc-kit--newskit .mdc-pk__grid { grid-template-columns: 1fr; }
.mdc-kit--newskit .mdc-pk__card { background: var(--mdc-pk-bg, var(--mdc-tile-bg, #f6f7f9)); }
.mdc-kit--newskit.is-editing .mdc-pk__stage, .mdc-kit--newskit.is-editing .mdc-pk__card { display: block; width: 100% !important; }

/* Table width handle (Trainingszeiten, Spielplan) */
.mdcp-resize { position: relative; }
.mdcp-resize__h { position: absolute; top: 50%; right: -9px; z-index: 5; width: 14px; height: 44px; margin-top: -22px; border-radius: 7px; background: #3858e9; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: ew-resize; }

/* Team tiles in the editor (swap, size, picture) */
.mdc-teamlist.is-editing .mdc-teamlist__item { cursor: grab; }
.mdc-teamlist.is-editing .mdc-teamlist__item.is-active { outline: 3px solid #3858e9; outline-offset: 2px; }
.mdc-teamlist.is-editing .mdc-teamlist__item.is-dragging { opacity: .4; }
.mdc-teamlist__add { position: absolute !important; top: 10px; right: 10px; z-index: 3; }

/* Frei verschieben (every block): shown shifted, the place in the page stays */
.mdc-free { translate: var(--mdc-fx, 0) var(--mdc-fy, 0); scale: var(--mdc-fs, 1); transform-origin: 0 0; position: relative; z-index: var(--mdc-fz, auto); }
@media (max-width: 781px) { .mdc-free:not(.mdc-free--mobile) { translate: none; scale: none; } }
.mdc-free-moving { outline: 2px dashed #3858e9 !important; outline-offset: 3px; cursor: move !important; }
.mdc-free-moving * { cursor: move !important; user-select: none; }
.mdc-free-handle { position: absolute; z-index: 100000; width: 18px; height: 18px; background: #3858e9; border: 2px solid #fff; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.4); cursor: nwse-resize; }
/* Freely moved push button: the old corner placement is replaced by the free shift. */
.mdc-free .mdc-push.is-at, .mdc-free-moving .mdc-push.is-at, .mdc-free.mdc-push.is-at { position: relative !important; inset: auto !important; transform: none !important; }
.mdcp-resize--cards > .mdcp-resize__h { top: 60px; margin-top: 0; }
.mdcp-resize__label { position: absolute; top: 30px; right: -6px; z-index: 5; padding: 1px 6px; border-radius: 4px; background: #3858e9; color: #fff; font: 600 11px/1.6 system-ui, sans-serif; }

/* Line-up (builder): round player photos, formation on/off, own card width on the bench */
.mdc-lk-pitch { margin: 0 auto 1rem; max-width: var(--mdc-lk-w, none); }
@media (max-width: 600px) { .mdc-lk-pitch { max-width: none; } }
.mdc-lk-pitch.is-round .mdc-slot .mdc-photo { aspect-ratio: 1; border-radius: 50%; object-position: 50% 20%; }
.mdc-lk-pitch.no-formation .mdc-pitch__formation { display: none; }
.mdc-lk-bench.has-cardw .mdc-bench .mdc-cards { grid-template-columns: repeat(auto-fill, min(100%, var(--mdc-card-w))); }
.mdc-lk-edit { position: relative; }
.mdc-lk-edit .mdc-slot { cursor: pointer; }
/* Team tiles (0.14): fixed columns like the simple block, name and league on the photo, whole list in the editor. */
.mdc-pk.has-cols .mdc-pk__grid { grid-template-columns: repeat(var(--mdc-pk-cols, 4), minmax(0, 1fr)); }
@media (max-width: 900px) { .mdc-pk.has-cols .mdc-pk__grid { grid-template-columns: repeat(min(var(--mdc-pk-cols, 4), 2), minmax(0, 1fr)); } }
@media (max-width: 520px) { .mdc-pk.has-cols .mdc-pk__grid { grid-template-columns: 1fr; } }
.mdc-pk.has-cols .mdc-pk__card { width: 100%; }
.mdc-kit--teamkit.is-overlay .mdc-pk__card { background: var(--mdc-pk-bg, var(--mdc-accent, #0b7a3b)); color: var(--mdc-on-accent, #fff); }
.mdc-kit--teamkit.is-overlay .mdc-pk__card:has(.mdc-pp--team-photo img) { color: #fff; }
.mdc-kit--teamkit.is-overlay .mdc-pk__card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(transparent 30%, rgba(0,0,0,.75)); pointer-events: none; }
.mdc-kit--teamkit.is-overlay .mdc-pk__card:not(:has(.mdc-pp--team-photo img))::after { display: none; }
.mdc-kit--teamkit.is-overlay .mdc-pk__card > .mdc-pp:not(.mdc-pp--image) { z-index: 2; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.mdc-kit--teamkit.is-overlay .mdc-pp--team-name { text-transform: uppercase; font-weight: 800; }
.mdc-kit--teamkit.is-overlay .mdc-pp--team-league { opacity: .9; text-transform: none; letter-spacing: normal; font-weight: 400; }
.mdc-kit--teamkit.is-overlay :is(.mdc-pp--team-name, .mdc-pp--team-league) { align-items: flex-start; text-align: left; }
.mdc-kit--teamkit.is-overlay .mdc-pp.is-accent { color: inherit; }
.mdc-pk.is-all .mdc-pk__stage { display: block; position: relative; }
.mdc-pk.is-all .mdc-pk__cell { position: relative; min-width: 0; }
.mdc-pk.is-all .mdc-pk__cell.is-preview { cursor: grab; }
.mdc-pk.is-all .mdc-pk__cell.is-preview * { pointer-events: none; }
.mdc-pk.is-all .mdc-pk__cell.is-dragging { opacity: .4; }
.mdc-pk__grip { position: absolute; left: 4px; top: 4px; z-index: 6; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: rgba(255,255,255,.9); color: #1e1e1e; font-size: 16px; line-height: 1; cursor: grab; box-shadow: 0 1px 4px rgba(0,0,0,.3); }

/* ---------- Team tiles: one tile per team (0.15.0) ----------
   Fixed columns; a tile spans --c columns and --r rows. Its height follows the width of one column (the grid is
   the size container): rows × column width × tile height % + the gaps in between. Text sizes are counted per
   column, so a wide tile does not get bigger letters. Phones: at most 2 columns (≤ 900 px), 1 column (≤ 520 px). */
.mdc-pk.has-tiles { --mdc-pk-ce: var(--mdc-pk-cols, 4); }
.mdc-pk.has-tiles .mdc-pk__grid { container-type: inline-size; grid-template-columns: repeat(var(--mdc-pk-ce), minmax(0, 1fr)); grid-auto-flow: dense; align-items: start; }
.mdc-pk.has-tiles .mdc-pk__tile { --ce: min(var(--c, 1), var(--mdc-pk-ce)); --re: var(--r, 1); aspect-ratio: auto; width: auto; max-width: none; margin: 0 !important;
	height: calc(var(--re) * (100cqw - (var(--mdc-pk-ce) - 1) * var(--mdc-pk-gap, 20px)) / var(--mdc-pk-ce) * var(--mdc-pk-ratio, 90) / 100 + (var(--re) - 1) * var(--mdc-pk-gap, 20px)); }
.mdc-pk.has-tiles .mdc-pk__tile > .mdc-pp { font-size: max(11px, calc(var(--fs, 5) * 1cqw / var(--ce))); }
.mdc-pk.has-tiles .mdc-pk__tile > .mdc-pp--image { height: min(100%, calc(var(--mdc-pk-photo-ratio, 60) / var(--mdc-pk-ratio, 90) * 100%)); }
.mdc-pk.has-tiles .mdc-pk__tile > .mdc-pp--image :is(.mdc-photo, .mdc-kit__img, .mdc-pk__img, img) { height: 100%; aspect-ratio: auto; }
.mdc-pk.has-tiles .mdc-pk__tile > .mdc-pp--image .mdc-pk__img { display: block; }
.mdc-pk.has-tiles .mdc-pk__tile.is-c1 { grid-column: span 1; }
@media (max-width: 900px) {
	.mdc-pk.has-tiles { --mdc-pk-ce: min(var(--mdc-pk-cols, 4), 2); }
	.mdc-pk.has-tiles .mdc-pk__tile:is(.is-c3, .is-c4, .is-c5, .is-c6, .is-c7, .is-c8) { grid-column: span 2 !important; }
}
@media (max-width: 520px) {
	.mdc-pk.has-tiles { --mdc-pk-ce: 1; }
	.mdc-pk.has-tiles .mdc-pk__tile { --re: 1; grid-column: span 1 !important; grid-row: span 1 !important; }
}
/* Editor: drag a tile by its grip onto another place, pull the corner for its size. */
.mdc-pk__tile > .mdc-pk__grip { opacity: .85; touch-action: none; }
.mdc-pk__tile:is(:hover, .is-selected, .has-child-selected) > .mdc-pk__grip { opacity: 1; }
.mdc-pk__tile > .mdc-pk__size { position: absolute; right: 2px; bottom: 2px; z-index: 6; width: 20px; height: 20px; cursor: nwse-resize; touch-action: none; border-right: 4px solid #3858e9; border-bottom: 4px solid #3858e9; background: rgba(255,255,255,.75); border-radius: 0 0 6px 0; }
.mdc-pk__tile.is-lifted { z-index: 20; opacity: .85; box-shadow: 0 16px 40px rgba(0,0,0,.35) !important; pointer-events: none; transition: none; }
.mdc-pk__tile.is-target { outline: 3px dashed #3858e9; outline-offset: 3px; }
.mdc-pk__tile.is-sizing { outline: 2px solid #3858e9; outline-offset: 2px; }
.mdc-pk__tile.is-gone { opacity: .45; }
.mdc-pk__tilebar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0 0; font-size: 13px; }

/* ---------- Team tiles (0.16.0): fixed tiles in the grid of the simple block "Teams (overview)" ----------
   Website: MDC_Shortcodes::team_list(). Editor: the tile blocks are the grid items themselves. */
.mdc-tt .mdc-teamlist > .wp-block { margin: 0 !important; max-width: none !important; width: auto; }
.mdc-tt.is-editing .mdc-teamlist__item { cursor: default; user-select: none; }
.mdc-tt.is-editing .mdc-teamlist__item img { pointer-events: none; }
.mdc-tt .mdc-teamlist__item > .mdc-pk__grip { z-index: 6; opacity: .85; touch-action: none; }
.mdc-tt .mdc-teamlist__item:is(:hover, .is-selected) > .mdc-pk__grip { opacity: 1; }
.mdc-tt .mdc-teamlist__item.is-selected { outline: 3px solid #3858e9; outline-offset: 2px; }
.mdc-tt .mdc-teamlist__item.is-lifted { z-index: 20; opacity: .85; box-shadow: 0 16px 40px rgba(0,0,0,.35) !important; pointer-events: none; transition: none; }
.mdc-tt .mdc-teamlist__item.is-target { outline: 3px dashed #3858e9; outline-offset: 3px; }
.mdc-tt .mdc-teamlist__item.is-gone { opacity: .45; }
.mdc-tt.is-editing .mdc-teamlist__item:hover { transform: none; } /* editor only: the hover effect stays on the website */

/* Person cards in the editor (0.17.0): all people in the grid of the website; the first card is the template. */
.mdc-pk.is-editing .mdc-pk__grid > .mdc-pk__cell { position: relative; min-width: 0; }
.mdc-pk.is-editing .mdc-pk__grid > .mdc-pk__stage { display: block; max-width: none; }
.mdc-pk.is-editing .mdc-pk__grid > .mdc-pk__stage .mdc-pk__card { width: 100%; }
.mdc-pk.is-editing .mdc-pk__cell.is-preview { cursor: default; }
.mdc-pk.is-editing .mdc-pk__cell.is-preview * { pointer-events: none; }
.mdc-pk.is-editing .mdc-pk__cell.is-preview .mdc-pk__card { width: 100%; }
/* All person cards in the editor (0.17.1): parts without a value for the first person (no number, no anecdote …)
   are missing on the website, so they are hidden on the editable card too – a faint frame on hover or when chosen. */
.mdc-pk.is-editing .mdc-pk__grid > .mdc-pk__stage .mdc-pp.is-empty { opacity: 0; }
.mdc-pk.is-editing .mdc-pk__grid > .mdc-pk__stage:hover .mdc-pp.is-empty,
.mdc-pk.is-editing .mdc-pk__grid > .mdc-pk__stage .mdc-pp.is-empty.is-selected,
.mdc-pk.is-editing .mdc-pk__grid > .mdc-pk__stage .mdc-pp.is-empty:focus-within { opacity: .5; outline: 1px dashed currentColor; }
