@charset "utf-8";

/* ===================================================================
DISASTER
=================================================================== */

/* MAIN HEADING
--------------------*/

.d-main-heading {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	column-gap: 50px;
	margin: 40px 0;
}

.d-main-heading-start {
	font-size: 30px;
	font-weight: 600;
	letter-spacing: .1em;
}

/* DISASTER
--------------------*/

.d-disaster {
	margin: 0 0 35px;
}

.d-disaster-upper {
	display: flex;
	justify-content: center;
	align-items: center;
	column-gap: 15px;
	width: 100%;
	min-height: 52px;
	padding: 10px;
	color: #FFF;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .1em;
	background: #339999;
}

.d-disaster-lower {
	padding: 20px 30px;
	background: #F1F1EB;
}

.d-disaster-lower-start {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 0 20px;
	padding: 0 0 20px;
	border-bottom: 1px solid #D2D2D2;
}

/* ===================================================================
WEATHER
=================================================================== */

/* SUB HEADING
--------------------*/

.d-sub-heading {
	margin: 0 0 20px;
	font-size: 24px;
	font-weight: 600;
	letter-spacing: .1em;
}

.d-daily, .d-weekly {
	margin: 0 0 35px;
}

/* WEATHER FIRST TABLE
--------------------*/

.d-first-table {
	margin: 0 0 10px;
	line-height: 1.2;
}

.d-first-table-inner {
	display: flex;
}

.d-first-table-inner > dl {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.d-first-table-inner > dl > dt {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 40px;
	padding: 5px;
	color: #FFF;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .1em;
	background: #339999;
	outline: 1px solid #52A8A8;
}

.d-first-table-inner > dl > dd {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 5px;
	letter-spacing: .1em;
	outline: 1px solid #D2D2D2;
}

.d-first-table-inner > dl:first-of-type > dd {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .1em;
	background: #F1F1EB;
}

.d-first-table-inner > dl:not(:first-of-type) > dd {
	font-size: 14px;
	background: #FFF;
}

.d-first-table-inner > dl:not(:first-of-type) > dd.b {
	font-size: 12px;
}

.d-first-table-inner > dl > dd.a { min-height: 40px }
.d-first-table-inner > dl > dd.b { min-height: 80px }
.d-first-table-inner > dl > dd.c { min-height: 40px }
.d-first-table-inner > dl > dd.d { min-height: 60px }
.d-first-table-inner > dl > dd.e { min-height: 40px }
.d-first-table-inner > dl > dd.f { min-height: 40px }
.d-first-table-inner > dl > dd.g { min-height: 40px }

/* WEATHER SECOND TABLE
--------------------*/

.d-second-table {
	margin: 0 0 10px;
}

.d-second-table table {
	width: 100%;
	line-height: 1.2;
}

.d-second-table table {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
}

.d-second-table table thead,
.d-second-table table tbody,
.d-second-table table thead tr,
.d-second-table table tbody tr {
	display: contents;
}

.d-second-table table thead tr th,
.d-second-table table tbody tr td {
	padding: 10px 4px;
	text-align: center;
	vertical-align: middle;
}

.d-second-table table thead tr th {
	grid-row: 1;
	color: #FFF;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .1em;
	background: #339999;
	border: 1px solid #52A8A8;
}

.d-second-table table tbody tr td {
	grid-row: 2;
	font-size: 12px;
	background: #FFF;
	border: 1px solid #D2D2D2;
}

.d-w-icon {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	row-gap: 10px;
}

.d-w-icon-start {
	width: 45px;
}

.d-w-icon-img {
	position: relative;
	display: block;
	width: 100%;
	height: 0;
	padding: calc(30 / 45 * 100%) 0 0;
}

.d-w-icon-end {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	row-gap: 10px;
}

.d-w-temperature {
	display: flex;
	justify-content: center;
	align-items: center;
	column-gap: 8px;
}

.d-w-maximum-temperature { color: #FE1016 }
.d-w-minimum-temperature { color: #0009F8 }

.d-w-precipitation-probability {
	display: flex;
	justify-content: center;
	align-items: center;
}

.d-time {
	text-align: right;
}

/* MODAL
--------------------*/

.d-modal {
	width: calc(100% - 20px);
}

.d-modal-inner {
	position: relative;
	padding: 55px 49px 60px;
	max-height: calc(100dvh - 20px);
	overflow-y: auto;
	background: #F1F1EB;
}

.d-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	justify-content: center;
	align-items: center;
	column-gap: 10px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .1em;
	cursor: pointer;
}

.d-modal-heading {
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 600;
	text-align: center;
	letter-spacing: .1em;
}

.d-modal-grid {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	row-gap: 2px;
}

.d-modal-grid > dl {
	display: flex;
	flex-direction: column;
	width: 82px;
}

.d-modal-grid > dl > dt,
.d-modal-grid > dl > dd {
	display: flex;
	justify-content: center;
	align-items: center;
}

.d-modal-grid > dl > dt {
	height: 40px;
	color: #FFF;
	font-weight: 600;
	background: #339999;
	outline: 1px solid #52A8A8;
}

.d-modal-grid > dl > dd {
	height: 70px;
	background: #FFF;
	outline: 1px solid #D2D2D2;
}

.d-modal-icon {
	width: 45px;
}

.d-modal-icon-inner {
	position: relative;
	display: block;
	width: 100%;
	height: 0;
	padding: calc(30 / 45 * 100%) 0 0;
}

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

	/* ===================================================================
	DISASTER
	=================================================================== */

	/* MAIN HEADING
	--------------------*/

	.d-main-heading {
		flex-direction: column;
		align-items: center;
		row-gap: 10px;
		margin: 0 0 30px;
	}

	.d-main-heading-start {
		font-size: 26px;
	}

	/* DISASTER
	--------------------*/

	.d-disaster {
		margin: 0 0 25px;
	}

	.d-disaster-upper {
		justify-content: flex-start;
		min-height: 40px;
	}

	.d-disaster-lower {
		padding: 20px;
	}

	.d-disaster-lower-start {
		flex-direction: column;
		justify-content: flex-start;
		row-gap: 10px;
		margin: 0 0 15px;
		padding: 0 0 15px;
	}

	.d-disaster-lower-end {
		font-size: 12px;
	}

	/* ===================================================================
	WEATHER
	=================================================================== */

	/* SUB HEADING
	--------------------*/

	.d-sub-heading {
		margin: 0 0 15px;
		font-size: 18px;
	}

	.d-daily, .d-weekly {
		margin: 0 0 25px;
	}

	/* WEATHER FIRST TABLE
	--------------------*/

	.d-first-table {
		padding: 0 1px 14px;
		overflow-x: auto;
	}

	.d-first-table::-webkit-scrollbar {
		width: 4px;
		height: 4px;
	}

	.d-first-table::-webkit-scrollbar-track {
		background: #F5F5F1;
	}

	.d-first-table::-webkit-scrollbar-thumb {
		background: #339999;
	}

	@-moz-document url-prefix() {

		.d-first-table {
			scrollbar-width: thin;
			scrollbar-color: #339999 #F5F5F1;
		}

	}

	.d-first-table-inner {
		width: 800px;
	}

	.d-first-table-inner > dl > dt {
		font-size: 14px;
	}

	.d-first-table-inner > dl:first-of-type > dd {
		font-size: 14px;
	}

	.d-first-table-inner > dl:not(:first-of-type) > dd {
		font-size: 12px;
	}

	/* WEATHER SECOND TABLE
	--------------------*/

	.d-second-table table {
		grid-template-columns: 100px 1fr;
	}

	.d-second-table table thead tr th:nth-of-type(1) { grid-row: 1; grid-column: 1 }
	.d-second-table table tbody tr td:nth-of-type(1) { grid-row: 1; grid-column: 2 }
	.d-second-table table thead tr th:nth-of-type(2) { grid-row: 2; grid-column: 1 }
	.d-second-table table tbody tr td:nth-of-type(2) { grid-row: 2; grid-column: 2 }
	.d-second-table table thead tr th:nth-of-type(3) { grid-row: 3; grid-column: 1 }
	.d-second-table table tbody tr td:nth-of-type(3) { grid-row: 3; grid-column: 2 }
	.d-second-table table thead tr th:nth-of-type(4) { grid-row: 4; grid-column: 1 }
	.d-second-table table tbody tr td:nth-of-type(4) { grid-row: 4; grid-column: 2 }
	.d-second-table table thead tr th:nth-of-type(5) { grid-row: 5; grid-column: 1 }
	.d-second-table table tbody tr td:nth-of-type(5) { grid-row: 5; grid-column: 2 }
	.d-second-table table thead tr th:nth-of-type(6) { grid-row: 6; grid-column: 1 }
	.d-second-table table tbody tr td:nth-of-type(6) { grid-row: 6; grid-column: 2 }

	.d-second-table table thead tr th,
	.d-second-table table tbody tr td {
		padding: 5px 4px;
		border: none;
	}

	.d-second-table table thead tr th {
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 14px;
		outline: 1px solid #52A8A8;
	}

	.d-second-table table tbody tr td {
		outline: 1px solid #D2D2D2;
	}

	.d-second-table .d-w-icon {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 1.5fr 1fr;
		align-items: stretch;
		gap: 8px;
		max-width: 250px;
		margin: 0 auto;
	}

	.d-second-table .d-w-icon-start {
		grid-column: 1;
		grid-row: 1;
		justify-self: center;
		align-self: flex-end;
	}

	.d-second-table .d-w-icon-end {
		display: contents;
	}

	.d-second-table .d-w-name {
		grid-column: 1;
		grid-row: 2;
		justify-self: center;
		align-self: flex-start;
	}

	.d-second-table .d-w-temperature {
		grid-column: 2;
		grid-row: 1;
		justify-self: flex-start;
		align-self: flex-end;
	}
	
	.d-second-table .d-w-precipitation-probability {
		grid-column: 2;
		grid-row: 2;
		justify-self: flex-start;
		align-self: flex-start;
	}

	.d-time {
		font-size: 12px;
	}

	/* MODAL
	--------------------*/

	.d-modal-inner {
		padding: 45px 10px 50px;
	}

	.d-modal-close {
		top: 8px;
		right: 8px;
		column-gap: 6px;
		font-size: 12px;
	}

	.d-modal-close svg {
		width: 24px;
	}

	.d-modal-heading {
		font-size: 18px;
	}

}