/*
Theme Name: BC Wangen
Theme URI: https://bcwangen.ch/
Author: BC Wangen
Description: Block-Theme für den Badminton Club Wangen bei Olten. Vereinsfarben Blau-Weiss, Schrift Barlow, fertige Seitenvorlagen für Startseite, Training, Anlässe, Verein und Kontakt.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bcwangen
*/

/* ---------- Grundlagen ---------- */

html {
	scroll-behavior: smooth;
}

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary-dark);
	outline-offset: 3px;
}

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	box-sizing: border-box;
	text-decoration: none;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	padding: 12px 24px;
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover {
	color: var(--wp--preset--color--primary);
	background: transparent;
}

.wp-block-button.is-style-outline > .wp-block-button__link.has-base-color:hover {
	background: rgba(255, 255, 255, 0.12);
}

.wp-block-button > .wp-block-button__link.has-base-background-color:hover {
	background-color: var(--wp--preset--color--tint) !important;
}

/* ---------- Kopfzeile ---------- */

.bcw-header .wp-block-site-logo img {
	border-radius: 10px;
}

.bcw-header .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
}

.bcw-header .wp-block-navigation .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary);
	box-shadow: inset 0 -3px 0 var(--wp--preset--color--primary);
}

.bcw-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 22px;
	padding: 6px 0;
}

/* ---------- Blockstil: Spielfeld (Linien im Hintergrund) ---------- */

.wp-block-group.is-style-court {
	position: relative;
	overflow: hidden;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 670 305' fill='none' stroke='rgba(255,255,255,0.16)' stroke-width='3'%3E%3Crect x='1.5' y='1.5' width='667' height='302'/%3E%3Cpath d='M0 23H670M0 282H670M38 0V305M632 0V305M236 0V305M434 0V305M0 152.5H236M434 152.5H670'/%3E%3Cpath d='M335 0V305' stroke-width='6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right -160px center;
	background-size: 860px auto;
}

@media (max-width: 781px) {
	.wp-block-group.is-style-court {
		background-position: right -300px bottom -40px;
		background-size: 600px auto;
	}
}

/* ---------- Blockstil: Dachzeile ---------- */

p.is-style-eyebrow {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.3;
}

p.is-style-eyebrow:not(.has-text-color) {
	color: var(--wp--preset--color--primary);
}

/* ---------- Blockstil: Liste mit Häkchen ---------- */

ul.wp-block-list.is-style-check {
	list-style: none;
	padding-left: 0;
}

ul.wp-block-list.is-style-check li {
	position: relative;
	padding-left: 34px;
	margin-bottom: 10px;
}

ul.wp-block-list.is-style-check li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 22px;
	height: 22px;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- Blockstil: Zeiten-Tabelle ---------- */

.wp-block-table.is-style-zeiten table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table.is-style-zeiten td,
.wp-block-table.is-style-zeiten th {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--linie);
	padding: 12px 0;
	vertical-align: baseline;
	text-align: left;
}

.wp-block-table.is-style-zeiten tr:last-child td {
	border-bottom: 1px solid var(--wp--preset--color--linie);
}

.wp-block-table.is-style-zeiten td:first-child {
	width: 76px;
	padding-right: 12px;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: 24px;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	white-space: nowrap;
}

.wp-block-table.is-style-zeiten td:last-child {
	font-weight: 500;
}

.wp-block-table.is-style-zeiten table.has-fixed-layout {
	table-layout: auto;
}

/* ---------- Blockstil: Datum-Kachel (Termine) ---------- */

.wp-block-group.is-style-datum {
	flex-shrink: 0;
	width: 84px;
	padding: 10px 0;
	border-radius: 12px;
	background: var(--wp--preset--color--tint);
	text-align: center;
	line-height: 1.05;
}

.wp-block-group.is-style-datum > * {
	margin: 0 !important;
}

.wp-block-group.is-style-datum > p:first-child {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: 32px;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
}

.wp-block-group.is-style-datum > p:last-child {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast);
}

/* ---------- Beitragslisten ---------- */

.bcw-chip {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.bcw-chip .wp-block-post-terms__separator {
	display: none;
}

.bcw-chip a {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--primary-dark);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
	text-decoration: none;
}

.bcw-chip a:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.bcw-beitragsliste .wp-block-post-template > li {
	border-bottom: 1px solid var(--wp--preset--color--linie);
}

.bcw-beitragsliste .wp-block-post-template {
	border-top: 1px solid var(--wp--preset--color--linie);
}

.bcw-beitragsliste .wp-block-post-date {
	flex: 0 0 170px;
}

.wp-block-post-featured-image img {
	border-radius: 14px;
}

.wp-block-query-pagination a {
	text-decoration: none;
	font-weight: 600;
}

/* ---------- Karten und Bilder ---------- */

.wp-block-image.is-style-rounded img,
.bcw-foto img {
	border-radius: 18px;
}

.bcw-foto img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* ---------- Kontaktformular (Ninja Forms) ---------- */

.nf-form-cont {
	font-size: 17px;
}

.nf-form-cont .nf-form-fields-required {
	font-size: 15px;
	color: var(--wp--preset--color--muted);
	margin-bottom: 16px;
}

.nf-form-cont .nf-field-container {
	margin-bottom: 20px;
}

.nf-form-cont .nf-field-label label {
	font-weight: 700;
}

.nf-form-cont .ninja-forms-req-symbol,
.nf-form-cont .nf-error-msg,
.nf-form-cont .nf-error .nf-error-msg {
	color: #B42318;
}

.nf-form-cont input[type="text"],
.nf-form-cont input[type="email"],
.nf-form-cont input[type="tel"],
.nf-form-cont input[type="number"],
.nf-form-cont input[type="date"],
.nf-form-cont select,
.nf-form-cont textarea {
	width: 100%;
	min-height: 48px;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1.5px solid #B8C4D4;
	border-radius: 10px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: 17px;
}

.nf-form-cont textarea {
	min-height: 140px;
	line-height: 1.5;
}

.nf-form-cont ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.nf-form-cont .listradio-wrap li,
.nf-form-cont .listcheckbox-wrap li {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
}

.nf-form-cont input[type="radio"],
.nf-form-cont input[type="checkbox"] {
	width: 20px;
	height: 20px;
	accent-color: var(--wp--preset--color--primary);
}

.nf-form-cont input[type="submit"],
.nf-form-cont input[type="button"],
.nf-form-cont button {
	min-height: 52px;
	padding: 0 28px;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
}

.nf-form-cont input[type="submit"]:hover,
.nf-form-cont input[type="button"]:hover,
.nf-form-cont button:hover {
	background: var(--wp--preset--color--primary-dark);
}

/* ---------- Fusszeile ---------- */

.bcw-footer a {
	text-decoration: none;
}

.bcw-footer a:hover {
	text-decoration: underline;
	color: var(--wp--preset--color--base);
}

.bcw-footer .bcw-footer-links p {
	margin: 0;
}

.bcw-footer .bcw-footer-links a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
}

/* ---------- Seitenaufbau ---------- */

.wp-site-blocks > * {
	margin-block-start: 0;
}

/* ---------- Kleine Bausteine ---------- */

p.bcw-nummer {
	flex: none;
	width: 44px;
	height: 44px;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

p.bcw-initialen {
	width: 72px;
	height: 72px;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
}

.bcw-gleich-hoch > .wp-block-column > .wp-block-group {
	height: 100%;
	box-sizing: border-box;
}

.bcw-zeile {
	border-bottom: 1px solid var(--wp--preset--color--linie);
}

.bcw-zeile:last-child {
	border-bottom: 0;
}

.wp-block-table.bcw-tabelle table {
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}

.wp-block-table.bcw-tabelle td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--linie);
	padding: 12px 18px;
	font-weight: 600;
	vertical-align: baseline;
}

.wp-block-table.bcw-tabelle tr:last-child td {
	border-bottom: 0;
}

.wp-block-table.bcw-tabelle td:last-child {
	text-align: right;
	color: var(--wp--preset--color--primary);
	white-space: nowrap;
}

.wp-block-table.bcw-tabelle-blau table {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 12px;
}

.wp-block-table.bcw-tabelle-blau td {
	border-bottom-color: rgba(255, 255, 255, 0.2);
	color: inherit;
	font-weight: 500;
}

.wp-block-table.bcw-tabelle-blau td:last-child {
	color: var(--wp--preset--color--base);
	font-weight: 700;
}

/* ---------- Ergänzungen ---------- */

.bcw-gleich-hoch > .wp-block-column > .wp-block-query,
.bcw-gleich-hoch > .wp-block-column > .wp-block-query > .wp-block-post-template,
.bcw-gleich-hoch > .wp-block-column > .wp-block-query > .wp-block-post-template > li,
.bcw-gleich-hoch > .wp-block-column > .wp-block-query > .wp-block-post-template > li > .wp-block-group {
	height: 100%;
	box-sizing: border-box;
	margin-top: 0;
	margin-bottom: 0;
}

.bcw-beitragsliste .wp-block-post-template > li > .wp-block-group > .wp-block-group {
	flex: 1 1 420px;
	min-width: 0;
}

.bcw-footer .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: #2A3B57;
}

.bcw-footer .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--footer-text);
	background: transparent;
}

@media (max-width: 600px) {
	.bcw-header .wp-block-buttons {
		display: none;
	}
}

.wp-block-post-featured-image.bcw-bild-platzhalter {
	margin: 0;
	aspect-ratio: 3 / 2;
	border-radius: 14px;
	background-color: var(--wp--preset--color--tint);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 670 305' fill='none' stroke='rgba(26,86,168,0.22)' stroke-width='4'%3E%3Crect x='2' y='2' width='666' height='301'/%3E%3Cpath d='M0 23H670M0 282H670M38 0V305M632 0V305M236 0V305M434 0V305M0 152.5H236M434 152.5H670M335 0V305'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 80% auto;
}

.wp-block-post-featured-image.bcw-bild-platzhalter a {
	display: block;
	width: 100%;
	height: 100%;
}

/* Mobiles Menü */

.bcw-header .wp-block-navigation-item.bcw-nur-mobil {
	display: none;
}

.bcw-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.bcw-nur-mobil {
	display: flex;
	margin-top: 12px;
}

.bcw-header .wp-block-navigation__responsive-container.is-menu-open .bcw-nur-mobil > .wp-block-navigation-item__content {
	padding: 12px 24px;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-size: 18px;
}

.bcw-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.bcw-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
}

.bcw-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 24px clamp(16px, 4vw, 40px);
}

.wp-block-table.bcw-tabelle-blau td:first-child {
	font-weight: 700;
	white-space: nowrap;
}

.wp-block-table.bcw-tabelle-blau td:last-child {
	white-space: normal;
	font-weight: 500;
}

@media (max-width: 600px) {
	.wp-block-table.bcw-tabelle-blau td {
		display: block;
		border-bottom: 0;
		padding-bottom: 2px;
		text-align: left;
	}
	.wp-block-table.bcw-tabelle-blau td:last-child {
		text-align: left;
		padding-top: 0;
		padding-bottom: 12px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	}
}
