/* Container */
.container {
	width: 99%;
    max-width: 900px;
    margin: 20px auto;
    background: #f7f7f7;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.statsSelect {
	width: 100%;
	max-width: 400px;
	max-height: 400px;
	display: block;
	font-size: 16px;
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 5px;
	padding: 12px 8px;
}

#topRow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}


.fa-headphones, .fa-ranking-star {
	margin-bottom: 5px;
	font-size: 18px;
}


#topRow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.listeners_ststs {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.stats_error {
	color: red;
}

.ts-control,
.ts-dropdown .option,
.ts-dropdown .optgroup-header {
	font-size: 16px;
}

.ts-control {
	display: block !important;
	font-size: 16px !important;
	background-color: #fff !important;
	border: 0px solid #ccc !important;
	padding: 0 !important;
	text-align: center !important;
	cursor: pointer !important;
}

.ts-dropdown .option {
	padding: 8px 0 8px 18px !important;
	text-align: left;
}

.ts-dropdown .optgroup-header {
	font-weight: bold;
	padding: 6px 12px;
	background-color: #f5f5f5;
	color: #333;
	border-bottom: 1px solid #ddd;
	margin-top: 0px;
	text-align: left;
}

.ts-dropdown {
	max-height: min(400px, 60vh);  
	overflow-y: auto;
}

.ts-dropdown-content {
	max-height: 1000px !important;
	overflow-y: hidden !important;
}

.ts-control:focus {
	outline: none !important;
	box-shadow: none !important;
}

.ts-control > * {
	font-size: 17px !important;
}

/* Standard: Pfeil nach unten */
.ts-control::after {
	content: "\f078"; 
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%) rotate(0deg);
	transition: transform 0.2s ease;
	pointer-events: none;
	color: #666;
	font-size: 14px;
}

.ts-wrapper.dropdown-active .ts-control::after {
	content: "\f077"; 
}



/* Tabelle */
.stats-table {
    width: 100%;
    margin-top: 20px;
    background: #fff;
}

.table-header {
	display: flex;
	font-weight: bold;
	padding: 5px 0;
	border-bottom: 1px solid #ddd;
	align-items: center;
	justify-content: center;
}

.header-cell {
    display: inline-block;
    width: 20%; /* Platzaufteilung */
    padding: 10px 5px;
    text-align: center;
}

/* TabellenkÃ¶rper */
.table-body {
    display: block;
    width: 100%;
}

.table-row {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5px 0;
	/* border-bottom: 1px solid #f0f0f0; */
	margin-top: -1px;
}

.day-row {
	padding: 15px 0;
	border-top: 1px solid #cacaca;
	cursor: pointer;
}

.day-row .table-cell {
	cursor: inherit;
}

.table-details {
	font-weight: bold;
}

.table-row.active-row {
    background-color: #eef6ff;
	border-top: 1px solid #cacaca;
}

.table-cell {
    display: inline-block;
    width: 20%;
    padding: 0px;
    text-align: center;
}

/* Detailsbereich */
.details-row {
    display: none;
    background: #eef6ff;
    padding: 0px;
	border-bottom: 1px solid #cacaca;
}

.details-row .details {
    margin-top: 0px;
}


.details .table-row {
    display: flex;
}

.details .table-cell {
    display: inline-block;
    width: 20%;
    padding: 10px 5px;
}

.head-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
	margin-top: 20px;
	border: 1px solid #ddd;
}

.head-1 {
    display: flex;
    flex-direction: row; 
	justify-content: center;
    align-items: center;
    gap: 1rem;
}

.head-container > * {
    text-align: center;
}

.ranking, .listeners {
	width: 20%;
    font-size: 1rem;
    color: #333;
}

.fa-question {
	color: #ff0000;
	margin-right: 10px;	
}

.state_img {
	width: 16px;
	height: auto;
	margin-right: 10px;	
}

.top-cities-header {
	text-align: center;
	font-size: 1.2em;
	font-weight: bold;
	color: #333;
	margin-bottom: 10px;
}

.top-cities-list {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 30px;
	margin-bottom: 40px;
	width: 100%;
}

.top-city-item {
	display: flex;
	align-items: center;
	background-color: #f9f9f9;
	border-radius: 8px;
	padding: 15px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	transition: background-color 0.3s ease;
	min-width: 150px;
}

.city-icon {
	font-size: 1.5em;
	color: #007bff;
	margin-right: 10px;
}

.city-details {
	display: flex;
	flex-direction: column;
}

.city-name {
	font-weight: bold;
	font-size: 1.0em;
	color: #333;
}

.city-coordinates {
	display: none;
	font-size: 0.9em;
	color: #666;
}

.noData {
	display: flex;
	height: 80px;
	justify-content: center;
	align-items: center;
}

.city-icon:hover {
	cursor: pointer;
	color: red;
}

#rangeSelectorContainer {
	width: 100%;
	margin: 10px 0 10px 0;	
}

.statsRadioGroup .label {
	margin-right: 10px;
	cursor: pointer !important;	
}

.statsRadioGroup {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin: 15px 0;
}

.radioOption {
  flex: 1 1 20%; 
  max-width: 20%;
  min-width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  text-align: center;
  user-select: none;
}

.radioOption:hover {
  background-color: #e0e0e0;
}

.radioOption input[type="radio"] {
  display: none;
}

.radioOption i {
  font-size: 16px;
}

/* Aktive Auswahl hervorheben */
.radioOption:has(input[type="radio"]:checked) {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
}

.radioOption:has(input[type="radio"]:checked) i,
.radioOption:has(input[type="radio"]:checked) span {
  color: #fff;
}

/* Mobile Ansicht */

@media (max-width: 768px) {
	.statsRadioGroup {
		gap: 20px;
		margin: 5px 0;
	}
	.statsSelect {
		width: 50%;
	}	
    .head-container {
		padding: 10px 5px;
    }
	.header-cell, .table-cell {
		font-size: 12px;
	}
	.top-cities-list {
		font-size: 0.9em;
	}
	.top-cities-header {
		font-size: 1.1em;
	}
	.city-name {
		font-size: 0.9em;
	}
	
	.city-coordinates {
		font-size: 0.8em;
	}
	.top-city-item {
		width: 40%;
	}
	.top-cities-list {
		gap: 20px;
	}
	.ranking, .listeners {
		width: 25%;
	}

	.head-container {
		justify-content: space-between; 
	}	
}

/* Für Bildschirmgrößen kleiner als 350px */
@media (max-width: 459px) {
	
	#ranking, #listeners {
		order: -1;
		flex: 1 1 45%;
		justify-content: center;
	}

	#stationSelector,
	.ts-wrapper {
		width: 100%;
	}
	
	.ranking, .listeners {
		width: 50%;
	}
	
	#topRow {
		margin: 5px 0;
	}
	
	.radioOption {
		min-width: calc(100% - 40px);
		font-size: 12px;
	}
	.top-city-item {
		width: 85%;
	}
	.top-cities-list {
		gap: 10px;
	}
	.top-cities-header {
		font-size: 1.0em;
	}	
	.aggregatorName {
		display: none !important;
	}
	.hero p {
		font-size: 1.0rem;
	}
    .statsSelect {
        width: calc(100% - 30px);
		margin: 5px 0;
    }
	.statsRadioGroup {
		gap: 10px;
	}
}