html {
	scroll-behavior: smooth;	
}

#container {
    display: flex;
    flex-direction: column;
 	min-height: 100vh; /* Damit das Bild die gesamte Höhe ausfüllt */
}
        
#header-image {
	flex: 1;
    background-image: url("../images/background.webp");  /* Header-Grafik */
    background-size: cover;
    background-position: center top;
}

#overlay-box {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 110px;
	background: rgba(255, 255, 255, 0.9);
	padding: 20px 30px;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
 	width: 95%;
	max-width: 1400px;
	height: min-content;
}

#overlay-box2 {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 110px;
 	width: 95%;
	max-width: 1400px;
	height: min-content;
	background-color: white;
	padding: 30px 25px 35px 30px;
	box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, .2);
}

#holding-container {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 100px;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
 	
}
#overlay-box3 {
	width: 95%;
	max-width: 1400px;
	height: min-content;
	background-color: white;
	padding: 30px 25px 35px 30px;
	box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, .2);
}
#slogan-container {
	margin-bottom: 30px;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

#form-container {
	display: grid;
	grid-template-columns: 3fr 7fr;
	row-gap: 10px;
}

#range-container {
	display: grid;
  	grid-template-columns: 70% 30%;
}	

.form-label {
	display: flex;
	align-items: center;	
}

#slider-value-container {
	display: flex;
	align-items: center;
	justify-content: center;
}

#location-input-container { /* Zusammenspiel aus Input und Button */
	position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

#form-container input[type=text] { /* Input */
	width: 100%;
	height: 50px;
	padding-left: 10px;
    padding-right: 50px;
    line-height: 50px;
	font-size: 14px; 
    display: block;
    outline: none;
    border: 2px solid var(--blue);
    background-color: transparent;
}

#form-container button  { /* Such-Button im Input */
	user-select: none;
	cursor: pointer;
	background-color: transparent;
	outline: none;
	border: none;
	position: absolute;
	right: 7px;
	top: 7px;
	z-index: 4;	
	padding: 0;
	box-shadow: none;
}

#transition-box {
	width: 95%;
	max-width: 1400px;
	height: min-height;
	padding: 20px;
}


#filter-container {
	font-size: 20px;
	width: 100%;
	margin-top: 10px;
	display: grid; 
	grid-template-columns: auto auto auto auto;
	gap: 50px;
}

.filter, .filter-label {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 25px;
}

#markt-results-container {
	width: 95%;
	max-width: 1400px;
}

#markt-map {
	width: 100%;
	height: 100%;
}

#markt-results-box {
	height: min-height;
	margin-top: -100px;
	padding: 20px;
}

#scroll-notice-container {
	text-align: center;
	margin-top: 20px;
	color: white;	
}

#markt-map-container {
	width: 100%;
	height: 450px;
	background-image: url("/../images/loading.gif");
	background-repeat: no-repeat;
	background-position: center;
}

#markt-table-container {
	display: flex;
	justify-content: center;
	width: 100%;
}

#markt-table {
	font-size: 18px;
	border-collapse: collapse;
	background-color: white;
	overflow: scroll;
	width: 95%;
	max-width:1400px;
}

#markt-table td, th {
	text-align: left;
	padding: 10px;
}

.autocomplete-container {
	position: relative;
	width: 300px;
}


.suggestions {
	position: absolute;
  	border: 1px solid #ccc;
  	border-top: none;
  	max-height: calc(3 * 40px); /* Höhe für 4 Vorschläge, hier 4 x 40px */
  	overflow-y: auto;
  	min-width: 50%;
  	background: white;
  	z-index: 1000;
}

.suggestion-item {
  	padding: 10px;
  	cursor: pointer;
  	height: 40px;        /* Feste Höhe pro Vorschlag */
  	line-height: 20px;
  	box-sizing: border-box;
}

.suggestion-item:hover {
  	background-color: #eee;
}
								
/* TABELLEN STYLES */

/* Tabellenüberschrift */
#markt-table th {
	color: white;
	background-color: var(--dark);
}

/* Normale Zeile */
#markt-table td:not(#no-markt-message) {
	border-top: 1px solid var(--dark);
	border-bottom: 1px solid var(--dark);
}

/* Gesamtspalte ausblenden (nur für Mobilgeräte) */
#markt-table td:nth-child(1):not(#no-markt-message) {
	display: none;	
}

/* Hover bei Marktname */
.markt-name:hover {
	cursor: pointer;
	text-decoration: underline;
}	

/* Anfragen-Link */
#markt-table td a {
	color: var(--blue);
  	cursor: pointer;
}

#footer {
	height: 50px;
	display: flex;
    justify-content: flex-end; /* Footer-Inhalt rechtsbündig machen */
    align-items: center;
	color: var(--dark);
	padding: 10px 30px;
}

/* Responsives Design */

@media (max-width: 1280px) {
	#filter-container {
		grid-template-columns: auto auto;
	}	
}

@media (max-width: 620px) {
	#filter-container {
		grid-template-columns: auto;
	}	
}


@media (max-height: 1000px) and (max-width: 620px) {
	#holding-container {
    	bottom: 10px;
  	}
  	
	#overlay-box3 {
	    max-height: 90vh;
	    overflow-y: auto;
  	}
  	
	#markt-map-container {
		height: 300px;
	}
}

@media (max-width: 767px) {
	#slogan {
		font-size: 13px;
	}
	
	#form-container {
    	grid-template-columns: 1fr; /* Labels und Inputs untereinander */
  	}
  
	#footer {
    	justify-content: center; /* Footer auf Mobilgeräten zentrieren */
  	}
  	
  	#markt-table {
		width: 100%;
		overflow-x: hidden;
	}
	
	/* Schriftgröße anpassen */
	#markt-table td {
		font-size: 16px;
	}
	
	/* Gesamtspalte einblenden */
	#markt-table td:nth-child(1):not(#no-markt-message) {
		display: table-cell;
	}
	
	/* Einzelspalten Symbol, Name, Adresse, Telefonnummer ausblenden */
	#markt-table td:nth-child(2), #markt-table td:nth-child(3), #markt-table td:nth-child(5), #markt-table td:nth-child(6) {
		display: none;
	}
}

@media (max-width: 380px) {
	#footer {
		font-size: 15px; /* Bei kleineren Geräten Schriftgröße verkleinern + Padding weglassen */
		padding: 0;
	}	
}