/*
======================================================================
Globala regler
======================================================================
*/

html {
	/*Bra storlek för att använda REM då 62.5% av 16px är 10*/
	font-size: 62.5%;
	scroll-behavior: smooth;
}

* {
	font-size: 1.6rem;
	font-family: "Montserrat", 'Roboto', Arial, Helvetica, sans-serif;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	margin: auto;

	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	background-color: #a9d8f7;
	flex-direction: column;
	align-items: center;
	background-image: url("../resources/background.svg");
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
}

header {
	width: 100%;
	text-align: center;
}

h1 {
	text-transform: uppercase;
	color: #6f9bb8;
	font-size: 6rem;
	text-shadow: 0px 0px 80px rgb(156, 156, 156);
	margin-top: 4rem;
}

/* Appen huvudweatherDeck */
#app {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	opacity: 0.9;
}

svg {
	width: 1200px;

	background-image: linear-gradient(to bottom, #a9d8f7 40%, #ffe91f 100%);
	border-radius: 6px;
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

svg text {
	font-size: 5px !important;
}

#svgWrapper {
	display: flex;
	justify-content: center;
	margin-bottom: 6rem;
}

/*
======================================================================
Andra regler
======================================================================
*/

/* Appens formulär */
form {
	flex: 1 1 auto;
	display: flex;
	max-width: 550px;
	margin: 1rem;
	align-items: center;
	justify-content: center;
}

input {
	border-radius: 6px;
	margin: 1rem;
	padding: 10px;
	border: none;
	background-color: rgb(255, 255, 255);
	font-weight: bold;
	box-shadow: 2px 2px 3px rgb(0, 0, 0);
	width: 100%;
}

button {
	border-radius: 6px;
	font-weight: bold;
	padding: 1rem;
	box-shadow: 1px 1px 2px rgb(0, 0, 0);
	border: none;
	background-color: rgb(255, 255, 255);
	height: 100%;
}

button img {
	width: 16px;
}

button:disabled,
button:active {
	background-color: #cbe6f8;
	color: #000;
	box-shadow: 2px 2px 3px rgb(0, 0, 0);

}

/* Navigationsalternativ */
#presentOptions {
	list-style: none;
	display: flex;
	flex-direction: row;
	padding: 1rem;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

/* Översikt */
.weatherCard {
	display: flex;
	flex-wrap: wrap;
	flex: 0 0 auto;
	flex-direction: column;
	max-width: -moz-fit-content;
	max-width: fit-content;
	text-align: center;
	min-width: 120px;
	white-space: nowrap;
	margin-right: 20px;
	background-color: rgb(255, 255, 255);
	box-shadow: 2px 2px 3px rgb(85, 85, 85);

}

.weatherCard section {
	margin: 10px;
	display: grid;
	justify-content: center;
	align-content: center;
}

.weatherCard section .temperature {
	font-weight: bolder;
	font-size: 2rem;
}

.weatherCard:hover {
	cursor: pointer;
}

/* Vädersymboler */
.weatherIcons {
	width: 90px;
	margin: 0;

}

table .weatherIcons {
	width: 70px;
	margin: auto;
}

/* weatherDeck för översikten */
.weatherDeck {
	display: flex;
	gap: 1rem;
	overflow-x: scroll;
	max-width: 800px;
	-ms-overflow-style: none;
	/* IE and Edge */
	scrollbar-width: none;
	/* Firefox */
	border-radius: 6px;
	margin-bottom: 6rem;
}

#hourlyPresentation {
	display: flex;
	flex-direction: column;
	max-width: 800px;
	width: 100%;
}

.weatherDeck::-webkit-scrollbar {
	display: none;
}

.showWindSpeed img {
	width: 40px;
}

.gray-last-child p:last-child,
.gray {
	font-size: 0.8em !important;
	color: gray;
	font-style: italic;
}

.dateTime p {
	font-size: 0.8em;
	color: gray;
	font-style: italic;
}

.windArrow {
	color: #000 !important;
	margin: 0.8rem;
	font-weight: bold;
	font-size: 1.7rem !important;
}

.scroll-buttons {
	position: sticky;
	border: none;
	display: flex;
	justify-content: center;
	align-items: stretch;
	min-width: 120px !important;
	align-content: center;
	cursor: pointer;
}

.scroll-buttons img {
	width: 20px;
}

#scroll-left {
	background: linear-gradient(to right,
			rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0) 100%);
	left: 0;
}

#scroll-right {
	background: linear-gradient(to left,
			rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0) 100%);
	right: 0;
}

.hidden {
	display: none !important;
}

table {
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
	flex: 1;
	margin-bottom: 5rem;
	border-collapse: collapse;
	background-color: white;
	font-weight: bold;
	text-align: center;
}

tr {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	justify-content: space-around;
	align-items: center;
	padding: 0 1rem;
}

tr:first-child {
	border-radius: 6px 6px 0 0;
	background-color: rgb(255, 233, 31) !important;
}

tr:last-child {
	border-radius: 0 0 6px 6px;
}

tr:nth-child(odd) {
	background-color: #a9d8f7;
}


th {
	margin: 1.5rem 0;
}


#scroll-right img {
	margin-left: 60%;
}

#scroll-left img {
	margin-right: 60%;
}

.showLocation {
	font-size: 2rem;
	background-color: rgb(255, 233, 31);
	height: 70px;
	width: 100%;
	max-width: 800px;
	margin-bottom: 1rem;
	font-weight: 600;
	padding: 0.4rem 1rem;
	margin-bottom: 4rem;
}

.showLocation p {
	font-size: 3rem;
}

.borderNshadow {
	border-radius: 6px;
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.weatherElementsSubContainer {

	background-image: linear-gradient(white, #a9d8f7);
	border-radius: 6px;
}

@media screen and (max-width: 1200px) {
	#svgWrapper {
		width: 100%;
	}

	svg {
		width: 100%;
		margin: 0;
	}
}

@media screen and (max-width: 950px) {

	button,
	input {
		font-size: 2rem;
	}

	body {
		display: flex;
		flex-wrap: nowrap;
	}

	.weatherDeck {
		display: block;
		width: 100%;
	}

	.weatherCard {
		min-width: 100%;
		display: grid;
		grid-template-columns: 1fr 1fr 1fr 2fr;
		max-width: 550px;
		margin: 0.5rem 0;


	}

	.weatherElementsSubContainer {
		display: grid;
		grid-template-columns: 1fr 1fr;
		max-width: 550px;
		margin: 0;
		background-image: none;
	}

	.windArrow {
		margin: 0;
	}

	#scroll-left,
	#scroll-right {
		display: none;
	}
}

@media screen and (max-width: 520px) {

	button,
	input {
		font-size: 1.5rem;
	}

	body {
		flex-wrap: nowrap;
	}

	.weatherDeck {
		display: block;
	}

	.dateTime {
		grid-area: dateTime;
	}

	.temp {
		grid-area: temp;
	}

	.weatherIcon {
		grid-area: weatherIcon;
	}

	.weatherIcons {
		width: 50px;
	}

	.weatherElementsSubContainer {
		grid-area: weatherElements;
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.weatherCard {
		min-width: 99%;
		display: grid;
		grid-template-areas:
			'dateTime dateTime dateTime dateTime'
			' weatherIcon  temp weatherElements weatherElements';
		justify-content: space-around;
		align-items: center;
		white-space: nowrap;
		max-width: 550px;
		padding: 0.5rem;
		gap: 1.6rem;
	}

	.weatherCard section {
		display: block;
		margin: 0;
	}

	#scroll-left,
	#scroll-right {
		display: none;
	}
}