.tcsp-wrapper {
	max-width: 1400px;
	margin: 0 auto;
}

.tcsp-dashboard {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	margin-bottom: 22px;
	padding: 18px;
}

.tcsp-dashboard-header {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: space-between;
}

.tcsp-dashboard-header h2 {
	font-size: 22px;
	margin: 0;
}

.tcsp-dashboard-content {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	margin-top: 14px;
}

.tcsp-dashboard-content[hidden] {
	display: none;
}

.tcsp-metric,
.tcsp-ranking,
.tcsp-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
}

.tcsp-metric {
	padding: 16px;
}

.tcsp-metric-label {
	display: block;
	color: #646970;
	font-size: 13px;
	margin-bottom: 6px;
}

.tcsp-metric strong {
	color: #1d2327;
	font-size: 26px;
	line-height: 1;
}

.tcsp-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 20px;
	align-items: end;
}

.tcsp-dashboard-toggle {
	align-items: center;
	background: transparent;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	color: #2c3338;
	cursor: pointer;
	display: inline-flex;
	font-size: 13px;
	font-weight: 600;
	gap: 8px;
	padding: 7px 10px;
}

.tcsp-dashboard-toggle:hover,
.tcsp-dashboard-toggle:focus {
	border-color: #2271b1;
	color: #135e96;
}

.tcsp-dashboard-toggle-icon::before {
	content: '\25B2';
	display: block;
	font-size: 10px;
}

.tcsp-dashboard-collapsed .tcsp-dashboard-toggle-icon::before {
	content: '\25BC';
}

.tcsp-search-wrapper {
	flex: 1 1 280px;
	min-width: 220px;
	position: relative;
	display: block;
}

.tcsp-sort-wrapper {
	display: block;
	flex: 1 1 180px;
	max-width: 240px;
	min-width: 180px;
}

.tcsp-filter-wrapper {
	display: block;
	flex: 1 1 160px;
	max-width: 220px;
	min-width: 160px;
}

.tcsp-search-icon {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
}

#tcsp-search,
#tcsp-sort,
#tcsp-status-filter,
#tcsp-gallery-search,
#tcsp-gallery-sort,
#tcsp-gallery-status-filter {
	width: 100%;
	border: 1px solid #8c8f94;
	border-radius: 8px;
	box-sizing: border-box;
	font-size: 16px;
	background-color: #fff;
}

#tcsp-search,
#tcsp-gallery-search {
	padding: 13px 15px 13px 45px;
}

#tcsp-sort,
#tcsp-status-filter,
#tcsp-gallery-sort,
#tcsp-gallery-status-filter {
	min-height: 49px;
	padding: 10px 12px;
}

.tcsp-sort-wrapper span,
.tcsp-filter-wrapper span {
	display: block;
	color: #646970;
	font-size: 13px;
	margin-bottom: 4px;
}

#tcsp-search:focus,
#tcsp-sort:focus,
#tcsp-status-filter:focus,
#tcsp-gallery-search:focus,
#tcsp-gallery-sort:focus,
#tcsp-gallery-status-filter:focus {
	border-color: #2271b1;
	box-shadow: none;
	outline: none;
}

.tcsp-checkbox-wrapper {
	align-items: center;
	display: flex;
	flex: 1 1 220px;
	gap: 8px;
	max-width: 280px;
	min-height: 49px;
	min-width: 220px;
}

.tcsp-checkbox-wrapper input {
	margin: 0;
}

.tcsp-checkbox-wrapper span {
	color: #50575e;
	font-size: 14px;
	line-height: 1.25;
}

.tcsp-ranking {
	margin-bottom: 22px;
	padding: 18px;
}

.tcsp-ranking-header {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: space-between;
}

.tcsp-ranking h2 {
	font-size: 22px;
	margin: 0;
}

.tcsp-ranking-content {
	margin-top: 14px;
}

.tcsp-ranking-content[hidden] {
	display: none;
}

.tcsp-ranking-toggle {
	align-items: center;
	background: transparent;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	color: #2c3338;
	cursor: pointer;
	display: inline-flex;
	font-size: 13px;
	font-weight: 600;
	gap: 8px;
	padding: 7px 10px;
}

.tcsp-ranking-toggle:hover,
.tcsp-ranking-toggle:focus {
	border-color: #2271b1;
	color: #135e96;
}

.tcsp-ranking-toggle-icon::before {
	content: '\25B2';
	display: block;
	font-size: 10px;
}

.tcsp-ranking-collapsed .tcsp-ranking-toggle-icon::before {
	content: '\25BC';
}

.tcsp-ranking ol {
	display: grid;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tcsp-ranking li {
	align-items: center;
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) auto;
	gap: 12px;
	padding: 10px 0;
}

.tcsp-rank-number {
	align-items: center;
	background: #f0f6fc;
	border-radius: 50%;
	color: #2271b1;
	display: inline-flex;
	font-weight: 700;
	height: 32px;
	justify-content: center;
	width: 32px;
}

.tcsp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
}

.tcsp-card {
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}

.tcsp-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	transform: translateY(-3px);
}

.tcsp-image img {
	display: block;
	height: 210px;
	object-fit: cover;
	width: 100%;
}

.tcsp-card-body {
	padding: 18px;
}

.tcsp-card-header {
	align-items: flex-start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 16px;
}

.tcsp-card h3 {
	font-size: 21px;
	line-height: 1.25;
	margin: 0;
}

.tcsp-title-preview {
	color: inherit;
	text-decoration: none;
}

.tcsp-title-preview:hover,
.tcsp-title-preview:focus {
	color: #135e96;
	text-decoration: underline;
}

.tcsp-status {
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	padding: 7px 10px;
	white-space: nowrap;
}

.tcsp-status-geplant {
	background: #f0f6fc;
	color: #135e96;
}

.tcsp-status-aktiv {
	background: #edfaef;
	color: #008a20;
}

.tcsp-status-beendet {
	background: #fcf0f1;
	color: #b32d2e;
}

.tcsp-period {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0 0 16px;
}

.tcsp-period div {
	background: #f6f7f7;
	border-radius: 8px;
	padding: 10px;
}

.tcsp-period dt {
	color: #646970;
	font-size: 12px;
	margin-bottom: 4px;
}

.tcsp-period dd {
	font-weight: 700;
	margin: 0;
}

.tcsp-stats {
	color: #50575e;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin-bottom: 18px;
}

.tcsp-button {
	background: #2271b1;
	border-radius: 8px;
	color: #fff !important;
	display: inline-block;
	font-weight: 700;
	padding: 10px 16px;
	text-decoration: none;
}

.tcsp-button:hover {
	background: #135e96;
}

.tcsp-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tcsp-button-voting {
	background: #008a20;
}

.tcsp-button-voting:hover {
	background: #006b1b;
}

.tcsp-button-preview {
	background: #646970;
}

.tcsp-button-preview:hover {
	background: #3c434a;
}

.tcsp-empty,
.tcsp-error {
	background: #fff8e5;
	border: 1px solid #f0d38a;
	border-radius: 8px;
	padding: 20px;
}

.tcsp-gallery-wrapper {
	display: grid;
	gap: 28px;
	max-width: 1400px;
	margin: 0 auto;
}

.tcsp-gallery-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: end;
}

.tcsp-gallery-contest {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 18px;
}

.tcsp-gallery-contest h2 {
	font-size: 24px;
	margin: 0 0 18px;
}

.tcsp-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.tcsp-gallery-card {
	margin: 0;
}

.tcsp-gallery-card a {
	display: block;
	position: relative;
	text-decoration: none;
}

.tcsp-gallery-card img {
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.tcsp-gallery-rank {
	align-items: center;
	background: #2271b1;
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	font-weight: 700;
	height: 34px;
	justify-content: center;
	left: 10px;
	position: absolute;
	top: 10px;
	width: 34px;
}

.tcsp-gallery-card h3 {
	font-size: 18px;
	line-height: 1.3;
	margin: 12px 0 4px;
}

.tcsp-gallery-card p {
	color: #50575e;
	margin: 0;
}

.tcsp-gallery-card p span {
	display: block;
	font-weight: 700;
	margin-top: 4px;
}

.tcsp-voting {
	max-width: 1400px;
	margin: 0 auto;
}

.tcsp-voting-selector {
	display: block;
	max-width: 520px;
}

.tcsp-voting-selector span {
	display: block;
	color: #646970;
	font-size: 13px;
	margin-bottom: 4px;
}

#tcsp-voting-contest {
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 8px;
	box-sizing: border-box;
	font-size: 16px;
	min-height: 49px;
	padding: 10px 12px;
	width: 100%;
}

.tcsp-voting-help {
	color: #646970;
	font-size: 14px;
	margin: 10px 0 18px;
}

.tcsp-voting-message {
	border-radius: 8px;
	margin-bottom: 18px;
	padding: 0;
}

.tcsp-voting-message:not(:empty) {
	border: 1px solid #dcdcde;
	padding: 12px 14px;
}

.tcsp-voting-message-success {
	background: #edfaef;
	border-color: #72aee6 !important;
	color: #006b1b;
}

.tcsp-voting-message-error {
	background: #fcf0f1;
	border-color: #d63638 !important;
	color: #8a2424;
}

.tcsp-voting-message-pending {
	background: #f0f6fc;
	color: #135e96;
}

.tcsp-voting-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.tcsp-voting-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	margin: 0;
	overflow: hidden;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.tcsp-voting-card img {
	aspect-ratio: 4 / 3;
	cursor: pointer;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.tcsp-voting-card img:focus {
	outline: 3px solid #2271b1;
	outline-offset: -3px;
}

.tcsp-voting-card figcaption {
	font-weight: 700;
	padding: 12px 14px;
}

.tcsp-voting-card-voted {
	border-color: #00a32a;
	box-shadow: 0 0 0 2px rgba(0, 163, 42, .2);
}

.tcsp-lightbox[hidden] {
	display: none;
}

.tcsp-lightbox {
	align-items: center;
	background: rgba(0, 0, 0, .9);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 48px 24px 24px;
	position: fixed;
	z-index: 100000;
}

.tcsp-lightbox img {
	max-height: calc(100vh - 72px);
	max-width: 100%;
	object-fit: contain;
}

.tcsp-lightbox-close {
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	font-size: 42px;
	line-height: 1;
	padding: 4px 10px;
	position: absolute;
	right: 12px;
	top: 8px;
}

body.tcsp-lightbox-open {
	overflow: hidden;
}

@media (max-width: 900px) {
	.tcsp-gallery-grid {
		grid-template-columns: 1fr;
	}

	.tcsp-dashboard-content {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.tcsp-dashboard-content,
	.tcsp-grid,
	.tcsp-period,
	.tcsp-ranking li {
		grid-template-columns: 1fr;
	}

	.tcsp-ranking li {
		align-items: start;
	}
}
