﻿/**
 * BITS Rugby Spieltermine & Turnierkalender
 * Frontend Stylesheet - Responsive & Mobile-first Dark Sports Theme
 */

:root {
	--bits-bg-main: #0b0f19;
	--bits-card-bg: #131b2e;
	--bits-card-border: #24324d;
	--bits-card-hover-border: #3b82f6;
	--bits-accent-blue: #38bdf8;
	--bits-accent-glow: rgba(56, 189, 248, 0.25);
	--bits-primary-btn: #2563eb;
	--bits-text-main: #f8fafc;
	--bits-text-muted: #94a3b8;
	--bits-text-dim: #64748b;
	--bits-badge-cancelled-bg: rgba(239, 68, 68, 0.15);
	--bits-badge-cancelled-border: rgba(239, 68, 68, 0.4);
	--bits-badge-cancelled-color: #f87171;
	--bits-badge-tba-bg: rgba(245, 158, 11, 0.15);
	--bits-badge-tba-border: rgba(245, 158, 11, 0.4);
	--bits-badge-tba-color: #fbbf24;
	--bits-badge-confirmed-bg: rgba(16, 185, 129, 0.15);
	--bits-badge-confirmed-border: rgba(16, 185, 129, 0.4);
	--bits-badge-confirmed-color: #34d399;
	--bits-radius: 12px;
	--bits-radius-sm: 6px;
}

/* Wrapper */
.bits-termine-wrapper {
	font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: var(--bits-bg-main);
	color: var(--bits-text-main);
	padding: 24px;
	border-radius: var(--bits-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	margin: 20px 0;
	box-sizing: border-box;
}

.bits-termine-wrapper *,
.bits-termine-wrapper *::before,
.bits-termine-wrapper *::after {
	box-sizing: border-box;
}

/* Header */
.bits-termine-header {
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--bits-card-border);
}

.bits-termine-header-badge {
	display: inline-block;
	background: rgba(37, 99, 235, 0.2);
	border: 1px solid rgba(59, 130, 246, 0.4);
	color: var(--bits-accent-blue);
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

.bits-termine-title {
	font-size: 24px;
	font-weight: 800;
	margin: 0 0 6px 0;
	color: #ffffff;
	letter-spacing: -0.5px;
}

.bits-termine-season-tag {
	font-size: 13px;
	color: var(--bits-text-muted);
	font-weight: 500;
}

/* Section Title */
.bits-termine-section-title {
	font-size: 18px;
	font-weight: 700;
	color: #ffffff;
	margin: 20px 0 14px 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.bits-termine-section-title span {
	background: linear-gradient(90deg, #ffffff 0%, #cbd5e1 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.bits-cup-title span {
	background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* 2-Column Grid for Divisions */
.bits-termine-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

/* Card */
.bits-termine-card {
	background: var(--bits-card-bg);
	border: 1px solid var(--bits-card-border);
	border-radius: var(--bits-radius);
	overflow: hidden;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
}

.bits-termine-card:hover {
	border-color: rgba(56, 189, 248, 0.4);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.bits-card-cup {
	border-color: rgba(245, 158, 11, 0.3);
}

.bits-card-cup:hover {
	border-color: rgba(245, 158, 11, 0.6);
}

/* Card Header */
.bits-card-header {
	background: rgba(15, 23, 42, 0.6);
	padding: 12px 16px;
	border-bottom: 1px solid var(--bits-card-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.bits-card-title {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	margin: 0;
}

.bits-card-count {
	font-size: 11px;
	color: var(--bits-text-dim);
	background: rgba(255, 255, 255, 0.05);
	padding: 2px 8px;
	border-radius: 12px;
	font-weight: 600;
}

/* Termine List */
.bits-termine-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.bits-termin-li {
	padding: 12px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	transition: background 0.15s ease;
}

.bits-termin-li:last-child {
	border-bottom: none;
}

.bits-termin-li:hover {
	background: rgba(255, 255, 255, 0.02);
}

.bits-termin-content {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
}

.bits-termin-bullet {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--bits-accent-blue);
	box-shadow: 0 0 6px var(--bits-accent-blue);
	flex-shrink: 0;
}

.bits-termin-li.is-cancelled .bits-termin-bullet {
	background: #ef4444;
	box-shadow: 0 0 6px #ef4444;
}

.bits-termin-li.is-tba .bits-termin-bullet {
	background: #f59e0b;
	box-shadow: 0 0 6px #f59e0b;
}

.bits-termin-main {
	flex-grow: 1;
	line-height: 1.4;
}

.bits-termin-location {
	font-weight: 600;
	color: #ffffff;
}

.bits-termin-li.is-cancelled .bits-termin-location {
	text-decoration: line-through;
	color: var(--bits-text-dim);
}

.bits-termin-sep {
	color: var(--bits-text-dim);
}

.bits-termin-date {
	color: var(--bits-text-main);
	font-weight: 500;
}

.bits-termin-weekday {
	color: var(--bits-text-muted);
	font-size: 13px;
	margin-left: 3px;
}

.bits-termin-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

/* Badges */
.bits-badge-cancelled {
	background: var(--bits-badge-cancelled-bg);
	border: 1px solid var(--bits-badge-cancelled-border);
	color: var(--bits-badge-cancelled-color);
	font-size: 11px;
	padding: 2px 7px;
	border-radius: 4px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.bits-badge-tba {
	background: var(--bits-badge-tba-bg);
	border: 1px solid var(--bits-badge-tba-border);
	color: var(--bits-badge-tba-color);
	font-size: 11px;
	padding: 2px 7px;
	border-radius: 4px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.bits-badge-confirmed {
	background: var(--bits-badge-confirmed-bg);
	border: 1px solid var(--bits-badge-confirmed-border);
	color: var(--bits-badge-confirmed-color);
	font-size: 11px;
	padding: 2px 7px;
	border-radius: 4px;
	font-weight: 600;
}

/* Live Link Button */
.bits-live-link-btn {
	background: rgba(37, 99, 235, 0.2);
	border: 1px solid rgba(59, 130, 246, 0.4);
	color: #ffffff;
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: var(--bits-radius-sm);
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: all 0.2s ease;
}

.bits-live-link-btn:hover {
	background: var(--bits-primary-btn);
	color: #ffffff;
	border-color: var(--bits-primary-btn);
}

.bits-live-link-btn .live-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 5px #22c55e;
}

/* ==========================================================================
   TIMELINE VIEW (Chronologisch)
   ========================================================================== */

.bits-timeline-filter-wrap {
	margin-bottom: 20px;
	position: relative;
}

.bits-filter-scroll {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.bits-filter-scroll::-webkit-scrollbar {
	display: none;
}

.bits-filter-btn {
	background: var(--bits-card-bg);
	border: 1px solid var(--bits-card-border);
	color: var(--bits-text-muted);
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s ease;
	font-family: inherit;
}

.bits-filter-btn:hover {
	background: rgba(255, 255, 255, 0.05);
	color: #ffffff;
}

.bits-filter-btn.active {
	background: var(--bits-primary-btn);
	border-color: var(--bits-primary-btn);
	color: #ffffff;
	box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.bits-timeline-month-block {
	margin-bottom: 24px;
}

.bits-month-header {
	font-size: 16px;
	font-weight: 700;
	color: var(--bits-accent-blue);
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bits-timeline-items {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bits-timeline-row {
	background: var(--bits-card-bg);
	border: 1px solid var(--bits-card-border);
	border-radius: var(--bits-radius);
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 14px;
	transition: border-color 0.2s ease;
}

.bits-timeline-row:hover {
	border-color: rgba(56, 189, 248, 0.3);
}

.bits-timeline-badge-date {
	background: rgba(15, 23, 42, 0.8);
	border: 1px solid var(--bits-card-border);
	padding: 8px 12px;
	border-radius: 8px;
	text-align: center;
	min-width: 105px;
	flex-shrink: 0;
}

.bits-date-str {
	display: block;
	font-weight: 700;
	font-size: 13px;
	color: #ffffff;
}

.bits-weekday-str {
	display: block;
	font-size: 11px;
	color: var(--bits-text-muted);
}

.bits-timeline-info {
	flex-grow: 1;
}

.bits-timeline-div-tag {
	font-size: 11px;
	font-weight: 700;
	color: var(--bits-accent-blue);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 2px;
}

.bits-timeline-location {
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
}

.bits-timeline-status-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

/* ==========================================================================
   MOBILE OPTIMIERUNGEN (Smartphones & Tablets)
   ========================================================================== */

@media (max-width: 768px) {
	.bits-termine-wrapper {
		padding: 16px 12px;
		border-radius: 8px;
	}

	.bits-termine-title {
		font-size: 20px;
	}

	/* 1 Spalte auf Smartphones */
	.bits-termine-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.bits-card-header {
		padding: 10px 12px;
	}

	.bits-card-title {
		font-size: 15px;
	}

	.bits-termin-li {
		padding: 10px 12px;
	}

	.bits-termin-content {
		flex-wrap: wrap;
		gap: 6px 10px;
	}

	.bits-termin-main {
		font-size: 13px;
		width: calc(100% - 20px);
	}

	.bits-termin-actions {
		width: 100%;
		padding-left: 16px;
		margin-top: 2px;
	}

	/* Timeline Mobile */
	.bits-timeline-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 12px;
	}

	.bits-timeline-badge-date {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 6px 10px;
	}

	.bits-timeline-info {
		width: 100%;
	}

	.bits-timeline-status-wrap {
		width: 100%;
		justify-content: flex-start;
	}
}

@media (max-width: 480px) {
	.bits-termine-wrapper {
		padding: 12px 8px;
	}

	.bits-card-title {
		font-size: 14px;
	}

	.bits-termin-main {
		font-size: 13px;
	}
}
