/**
 * BCS Rechner für Pferde
 *
 * Alle Regeln sind auf .bcs-container begrenzt. Der Vorgänger hat mit
 * Selektoren auf *, body, h1, h2 und h3 die komplette Seite umformatiert.
 */

.bcs-container {
	--bcs-primary: #4a6741;
	--bcs-secondary: #8ba888;
	--bcs-surface: #f5f5f0;
	--bcs-text: #333;
	--bcs-radius: 8px;
	--bcs-shadow: 0 2px 5px rgba( 0, 0, 0, 0.1 );

	max-width: 800px;
	margin: 0 auto;
	padding: 20px;
	background-color: #fff;
	border-radius: var( --bcs-radius );
	box-shadow: var( --bcs-shadow );
	color: var( --bcs-text );
	line-height: 1.6;
	text-align: left;
}

.bcs-container *,
.bcs-container *::before,
.bcs-container *::after {
	box-sizing: border-box;
}

.bcs-container p {
	margin: 0 0 10px;
}

.bcs-container p:last-child {
	margin-bottom: 0;
}

/* Kopfbereich */

.bcs-header {
	text-align: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid var( --bcs-secondary );
}

.bcs-container .bcs-title {
	color: var( --bcs-primary );
	margin: 0 0 5px;
	font-size: 1.8em;
	line-height: 1.25;
}

.bcs-container .bcs-subtitle {
	color: var( --bcs-secondary );
	font-style: italic;
	margin: 0;
}

.bcs-container .bcs-heading {
	color: var( --bcs-primary );
	margin: 25px 0 15px;
	padding-bottom: 5px;
	border-bottom: 1px solid var( --bcs-secondary );
	font-size: 1.35em;
	line-height: 1.3;
}

.bcs-intro {
	background-color: var( --bcs-surface );
	padding: 15px;
	border-radius: var( --bcs-radius );
	margin-bottom: 20px;
}

/* Vorbereitung */

.bcs-tips {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 15px;
}

.bcs-tip {
	/* 140px, damit alle vier Hinweise nebeneinander passen und der letzte nicht
	   allein umbricht. Mobil ergibt das zwei Kacheln je Reihe. */
	flex: 1 1 140px;
	background-color: var( --bcs-surface );
	padding: 15px;
	border-radius: var( --bcs-radius );
	text-align: center;
	box-shadow: var( --bcs-shadow );
}

.bcs-tip-icon {
	font-size: 24px;
	line-height: 1;
	margin-bottom: 10px;
}

/* Abschnitte */

.bcs-container .bcs-instruction {
	margin-bottom: 20px;
	font-weight: 700;
}

.bcs-section {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 25px;
	padding: 15px;
	background-color: var( --bcs-surface );
	border-radius: var( --bcs-radius );
	box-shadow: var( --bcs-shadow );
}

.bcs-section-info {
	flex: 2 1 380px;
}

.bcs-container .bcs-section-title {
	color: var( --bcs-primary );
	margin: 0 0 10px;
	font-size: 1.15em;
	line-height: 1.3;
}

.bcs-container .bcs-section-scale {
	margin: 10px 0 0 20px;
	padding: 0;
}

.bcs-container .bcs-section-scale li {
	margin-bottom: 4px;
}

.bcs-section-rating {
	flex: 1 1 220px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.bcs-container .bcs-label {
	font-weight: 700;
	margin-bottom: 5px;
	display: block;
}

/* Schieberegler */

.bcs-container .bcs-slider {
	width: 100%;
	margin: 15px 0 0;
	-webkit-appearance: none;
	appearance: none;
	height: 20px;
	border-radius: 10px;
	background: #d3d3d3;
	outline: none;
	box-shadow: inset 0 1px 3px rgba( 0, 0, 0, 0.2 );
}

.bcs-container .bcs-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var( --bcs-primary );
	cursor: pointer;
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
	margin-top: -8px;
}

.bcs-container .bcs-slider::-moz-range-thumb {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var( --bcs-primary );
	cursor: pointer;
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
}

.bcs-container .bcs-slider:focus-visible {
	outline: 3px solid var( --bcs-primary );
	outline-offset: 3px;
}

.bcs-scale-strip {
	display: flex;
	justify-content: space-between;
	width: 100%;
	margin-top: 5px;
	font-size: 12px;
	color: #666;
}

.bcs-scale-mark {
	width: 20px;
	text-align: center;
}

.bcs-step-buttons {
	display: flex;
	justify-content: space-between;
	width: 100%;
	margin-top: 10px;
}

.bcs-container .bcs-step-button {
	background-color: var( --bcs-primary );
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	min-width: 40px;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba( 0, 0, 0, 0.2 );
}

.bcs-container .bcs-step-button:hover {
	background-color: #3c5535;
}

.bcs-container .bcs-step-button:active {
	transform: scale( 0.95 );
}

.bcs-container .bcs-step-button:focus-visible {
	outline: 3px solid var( --bcs-primary );
	outline-offset: 2px;
}

.bcs-rating-display {
	font-size: 28px;
	font-weight: 700;
	color: var( --bcs-primary );
	margin: 15px 0 0;
	padding: 5px 15px;
	background-color: rgba( 255, 255, 255, 0.7 );
	border-radius: 20px;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.1 );
}

/* Ergebnis */

.bcs-result-box {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	padding: 20px;
	background-color: var( --bcs-surface );
	border-radius: var( --bcs-radius );
	box-shadow: var( --bcs-shadow );
}

.bcs-formula {
	flex: 1 1 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 24px;
	font-weight: 700;
}

.bcs-score {
	display: inline-block;
	width: 60px;
	height: 60px;
	line-height: 60px;
	text-align: center;
	background-color: var( --bcs-primary );
	color: #fff;
	border-radius: 50%;
	font-size: 28px;
}

.bcs-interpretation-wrap {
	flex: 2 1 380px;
}

.bcs-interpretation {
	padding: 15px;
	border-radius: var( --bcs-radius );
	background-color: #fff;
	box-shadow: var( --bcs-shadow );
	border-left: 5px solid var( --bcs-secondary );
}

.bcs-container .bcs-interpretation-title {
	margin: 0 0 10px;
	color: var( --bcs-primary );
	font-size: 1.1em;
	line-height: 1.3;
}

.bcs-interpretation.bcs-is-low {
	background-color: #f8d7da;
	border-left-color: #dc3545;
}

.bcs-interpretation.bcs-is-normal {
	background-color: #d4edda;
	border-left-color: #28a745;
}

.bcs-interpretation.bcs-is-high {
	background-color: #fff3cd;
	border-left-color: #ffc107;
}

/* Fuß */

.bcs-footer {
	margin-top: 30px;
	text-align: center;
	font-size: 0.9em;
	color: #777;
}

.bcs-container .bcs-credits,
.bcs-container .bcs-disclaimer {
	margin-top: 5px;
	font-size: 0.85em;
}

/* Mobil */

@media ( max-width: 600px ) {
	.bcs-container {
		padding: 15px;
	}

	/* .bcs-tips bleibt bewusst in Zeilenrichtung: bei flex-direction column
	   würde die flex-basis auf die Höhe wirken und die Kacheln aufblähen. */
	.bcs-section,
	.bcs-result-box {
		flex-direction: column;
	}

	/* Gestapelt darf die flex-basis nicht mehr als Mindesthöhe wirken,
	   sonst entstehen meterhohe Leerflächen. */
	.bcs-section-info,
	.bcs-section-rating,
	.bcs-formula,
	.bcs-interpretation-wrap {
		flex: 0 0 auto;
	}

	.bcs-container .bcs-slider {
		height: 24px;
	}

	.bcs-container .bcs-slider::-webkit-slider-thumb {
		width: 44px;
		height: 44px;
		margin-top: -10px;
	}

	.bcs-container .bcs-slider::-moz-range-thumb {
		width: 44px;
		height: 44px;
	}

	.bcs-container .bcs-step-button {
		width: 48px;
		height: 48px;
		min-width: 48px;
	}
}
