* {
	margin: 0;
}

@media (prefers-color-scheme: dark) {
	body {
		background-color: black;
		filter: invert(1);
	}

	img {
		filter:  invert(1);
	}
}

#weather-content {
	overflow-x: auto;
}

#weather-content::-webkit-scrollbar {
    width: 8px;
    background-color: #F5F5F5;
}


#weather-content::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(104, 140, 240, 0.3);
  }

#weather-content::-webkit-scrollbar-thumb {
    background-color: #00ADEE;
    outline: 1px solid slategrey;
}

.maxwidth {
	width:  100%;
	max-width:  100%;
}

.card-body {
	font-size: 135%;
}

#location-clicker i {
	padding: 0.1em;
	margin-right: 0.5em;
}

.figure-img {
	height: 206px;
	width:  206px;
}

.night {
	filter: grayscale(100%);
}

.shrink {
	width: 80%;
	height: 80%;
	margin: 8.5%;
}

.autocomplete-suggestions { border: 1px solid #ccc; background: #fff; overflow: auto; cursor: default;}
.autocomplete-suggestion { padding: 2px 5px; white-space: nowrap; overflow: hidden; cursor: pointer; }
.autocomplete-selected { background: #ccc; }
.autocomplete-suggestions strong { font-weight: normal; color: black; }
.autocomplete-group { padding: 2px 5px; text-transform: capitalize; font-weight: bold; }
.autocomplete-group strong { display: block; border-bottom: 1px solid #000; }

/* Spinner styles */
.lds-ring {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #007bff;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #007bff transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}
@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Additional styles for better mobile responsive design */
.weather-card {
  min-width: 180px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .weather-card {
    min-width: 150px;
  }
  
  .figure-img {
    height: 120px;
    width: 120px;
  }
}

/* Custom location suggestions dropdown */
#location-suggestions {
	border: 1px solid #ccc;
	border-top: none;
	border-radius: 0 0 4px 4px;
	background: white;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	color: #212529;
}

#location-suggestions .list-group-item {
	border: none;
	border-bottom: 1px solid #eee;
	cursor: pointer;
	color: #212529;
}

#location-suggestions .list-group-item:last-child {
	border-bottom: none;
}

#location-suggestions .list-group-item:hover,
#location-suggestions .list-group-item.active {
	background-color: #f8f9fa;
	color: #212529;
}

#location-suggestions .list-group-item h6 {
	font-size: 0.9rem;
	margin-bottom: 2px;
	color: #212529;
}

#location-suggestions .list-group-item small {
	font-size: 0.75rem;
	color: #212529;
}

#location-suggestions .list-group-item small.text-muted {
	color: #6c757d !important;
	font-style: italic;
}

/* Clear button styling */
#location-clear {
	font-size: 16px;
	opacity: 0.6;
	transition: opacity 0.2s ease, color 0.2s ease;
	z-index: 10;
}

#location-clear:hover {
	opacity: 1;
	color: #dc3545 !important;
}

#location-clear:active {
	transform: translateY(-50%) scale(0.95);
}

/* Expandable search box */
#location.expandable-search {
	width: 250px !important;  /* Much larger default on desktop */
	transition: width 0.3s ease-in-out !important;
}

#location.expandable-search:focus,
#location.expandable-search.expanded {
	width: 400px !important;  /* Very generous expanded size on desktop */
	outline: none;
	box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

@media (max-width: 768px) {
	/* Mobile: smaller default and expanded sizes */
	#location.expandable-search {
		width: 80px !important;
	}
	
	#location.expandable-search:focus,
	#location.expandable-search.expanded {
		width: 160px !important;
	}
}