/* -------------------------------------------------------------------------
 * amedas.css  --  アメダス実況マップ
 * ------------------------------------------------------------------------- */

.amedas_wrap {
	margin-bottom: 20px;
}

.amedas_wrap .title {
	padding: 8px 10px;
	font-size: 16px;
	font-weight: bold;
	color: #fff;
	background-color: #333;
}

.amedas_head {
	padding: 8px 10px;
	border-bottom: 1px solid #ddd;
	overflow: hidden;
}

.amedas_head .amd_time {
	float: left;
	font-size: 15px;
	font-weight: bold;
	color: #333;
	line-height: 26px;
}

.amedas_head .amd_error {
	float: left;
	margin-left: 12px;
	font-size: 13px;
	color: #c00;
	line-height: 26px;
}

.amedas_head .amd_modes {
	float: right;
	list-style: none;
	margin: 0;
	padding: 0;
}

.amedas_head .amd_modes li {
	float: left;
	margin-left: 4px;
	padding: 4px 12px;
	font-size: 13px;
	color: #333;
	background-color: #eee;
	border: 1px solid #ccc;
	border-radius: 3px;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}

.amedas_head .amd_modes li:hover {
	background-color: #e0e0e0;
}

.amedas_head .amd_modes li.selected {
	color: #fff;
	font-weight: bold;
	background-color: #2f7fe0;
	border-color: #2f7fe0;
}

.amedas_body {
	position: relative;
}

.amedas_map {
	width: 100%;
	height: 640px;
	border: 1px solid #ccc;

	/* Leaflet 内部の z-index がページ側のポップアップより前に出ないようにする。 */
	position: relative;
	z-index: 0;
}

.amedas_note {
	padding: 8px 10px;
	font-size: 12px;
	color: #666;
	line-height: 1.6;
}

.amedas_note a {
	color: #0645ad;
}

/* ---- 凡例 ---- */
/* 見本の絵と同じく、地図の左側に濃い色の小さな板で重ねます。 */

.amd_legend {
	position: absolute;
	left: 8px;
	top: 44px;
	z-index: 500;
	padding: 7px 9px;
	background-color: rgba( 40, 62, 78, 0.72);
	border: none;
	border-radius: 3px;
	font-size: 11px;
	line-height: 1.5;
	color: #fff;
	pointer-events: none;
	text-shadow: 0 1px 2px rgba( 0, 0, 0, 0.6);
}

.amd_legend_block {
	margin-bottom: 7px;
}

.amd_legend_block:last-child {
	margin-bottom: 0;
}

.amd_legend_title {
	margin: 0 0 2px 0;
	font-weight: bold;
	color: #fff;
}

.amd_legend_item {
	margin: 0;
	white-space: nowrap;
}

.amd_legend_chip {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 4px;
	vertical-align: -2px;
	border: 1px solid rgba( 255, 255, 255, 0.45);
}


/* 凡例のいちばん上、降水量・気温の見出し（見本の絵と同じ小さな札）。 */
.amd_legend_values {
	margin-bottom: 8px;
}

.amd_key {
	display: inline-block;
	min-width: 84px;
	padding: 1px 6px;
	border-radius: 2px;
	font-weight: bold;
	text-shadow: none;
}

.amd_key_prec {
	background-color: #cfeeff;
	color: #12557f;
}

.amd_key_temp {
	margin-top: 2px;
	background-color: #ffd6e8;
	color: #a3185c;
}

/* 見出しの帯と、ズームボタン・レイヤ切替が重ならないようにする。 */
.amedas_map .leaflet-top {
	top: 36px;
}


/* 凡例のいちばん上、降水量・気温の見出し（見本の絵と同じ小さな札）。 */
.amd_legend_values {
	margin-bottom: 8px;
}

.amd_key {
	display: inline-block;
	min-width: 84px;
	padding: 1px 6px;
	border-radius: 2px;
	font-weight: bold;
	text-shadow: none;
}

.amd_key_prec {
	background-color: #cfeeff;
	color: #12557f;
}

.amd_key_temp {
	margin-top: 2px;
	background-color: #ffd6e8;
	color: #a3185c;
}

/* 見出しの帯と、ズームボタン・レイヤ切替が重ならないようにする。 */
.amedas_map .leaflet-top {
	top: 36px;
}


/* ---- 背景に緑をかける ---- */
/* 見本の絵と同じ緑の地形図にするため、淡色地図＋陰影起伏の上から
 * うすい緑を重ねています（掛け算で重ねるので、山の陰影は残ります）。
 *
 * 色や濃さを変えたいときは、この2行です。
 *   もっと濃く   background-color を #6f9a55、opacity を 0.58
 *   緑をやめる   opacity を 0
 *
 * 地点の文字・凡例・見出しの帯は、これより手前にあるので色が変わりません。 */

.amedas_map,
.amedas_mini {
	isolation: isolate;
}

.amd_green::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 250;
	background-color: #86ab6b;
	opacity: 0.45;
	mix-blend-mode: multiply;
	pointer-events: none;
}


/* ---- トップページの「アメダス」枠に入れる小さい地図 ---- */
/* 既設のアメダス画像のかわりに、同じ大きさの地図を入れます。 */

#weather_images .amedas {
	position: relative;
}

.amedas_mini {
	width: 310px;
	height: 233px;
	border: 1px solid #999;
	position: relative;
	z-index: 0;
}

/* 小さい地図の凡例。色の四角だけを左下に小さく置きます。 */
#weather_images .amedas .amd_legend {
	position: absolute;
	left: 5px;
	bottom: 34px;
	top: auto;
	z-index: 500;
	padding: 3px 5px;
	background-color: rgba( 40, 62, 78, 0.70);
	border-radius: 2px;
	font-size: 9px;
	line-height: 1.3;
	color: #fff;
	pointer-events: none;
}

#weather_images .amedas .amd_legend_block {
	display: inline-block;
	margin: 0 6px 0 0;
	vertical-align: top;
}

#weather_images .amedas .amd_legend_title {
	margin: 0;
	font-size: 9px;
	font-weight: bold;
}

#weather_images .amedas .amd_legend_chip {
	width: 8px;
	height: 8px;
	margin-right: 1px;
	vertical-align: -1px;
}

/* ---- 地点ラベル ---- */
/* 見本の絵に合わせて、白い枠は付けずに地図の上へ直接置きます。
 * 背景が山の色分けなので、文字のまわりに黒いふちを付けて読めるようにします。 */

.amd_label_wrap {
	background: none;
	border: none;
}

.amd_label {
	display: inline-block;
	padding: 0;
	white-space: nowrap;
	background: none;
	border: none;
	border-radius: 0;
	font-size: 11px;
	line-height: 1.25;
	text-align: left;
	box-shadow: none;
	text-shadow:
		-1px -1px 0 rgba( 0, 0, 0, 0.85),
		 1px -1px 0 rgba( 0, 0, 0, 0.85),
		-1px  1px 0 rgba( 0, 0, 0, 0.85),
		 1px  1px 0 rgba( 0, 0, 0, 0.85),
		 0    2px 3px rgba( 0, 0, 0, 0.55);
}

.amd_name {
	font-size: 12px;
	font-weight: bold;
	color: #fff;
}

.amd_line {
	white-space: nowrap;
}

/* 1行目のうしろに付く降水量。 */
.amd_prec {
	margin-left: 5px;
	font-size: 12px;
	font-weight: bold;
	color: #d8f4ff;
}

.amd_temp {
	font-size: 13px;
	font-weight: bold;
	color: #ff5fa8;
}

.amd_big {
	font-size: 15px;
	font-weight: bold;
	text-align: center;
	color: #fff;
}

.amd_big_wind,
.amd_big_sun {
	font-size: 14px;
	font-weight: bold;
	color: #fff;
	text-align: center;
}

.amd_wind {
	display: inline-block;
	width: 14px;
	font-size: 14px;
	line-height: 14px;
	text-align: center;
	vertical-align: -2px;
	text-shadow: 0 0 2px rgba( 0, 0, 0, 0.9);
}

.amd_calm {
	display: inline-block;
	width: 14px;
	font-size: 11px;
	color: #e8eef2;
	text-align: center;
}

.amd_sun {
	display: inline-block;
	width: 10px;
	height: 10px;
	margin: 0 4px 0 2px;
	border: 1px solid rgba( 255, 255, 255, 0.85);
	border-radius: 50%;
	vertical-align: -1px;
	box-shadow: 0 0 2px rgba( 0, 0, 0, 0.8);
}

/* ---- 地図の中の見出しの帯 ---- */

.amd_map_title {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	z-index: 600;
	padding: 6px 14px;
	background-color: rgba( 40, 62, 78, 0.78);
	color: #fff;
	font-size: 15px;
	font-weight: bold;
	line-height: 1.3;
	pointer-events: none;
}

.amd_map_title_date {
	float: right;
	font-size: 14px;
}

/* ---- 吹き出し ---- */

.amd_popup_name {
	margin: 0 0 4px 0;
	font-size: 14px;
	font-weight: bold;
}

.amd_popup_name span {
	margin-left: 6px;
	font-size: 11px;
	font-weight: normal;
	color: #666;
}

.amd_popup table {
	border-collapse: collapse;
	font-size: 12px;
}

.amd_popup th {
	padding: 2px 8px 2px 0;
	text-align: left;
	font-weight: normal;
	color: #555;
	white-space: nowrap;
}

.amd_popup td {
	padding: 2px 0;
	text-align: right;
	font-weight: bold;
	white-space: nowrap;
}

/* ---- トップページの「アメダス」パネルに置くリンク ---- */

.amd_map_link {
	display: block;
	margin-top: 4px;
	padding: 5px 8px;
	font-size: 13px;
	font-weight: bold;
	color: #fff !important;
	text-align: center;
	text-decoration: none;
	background-color: #2f7fe0;
	border-radius: 3px;
}

.amd_map_link:hover {
	background-color: #1f6ac4;
}

/* ---- トップページのパネル内に収める小さい地図 ---- */

.amedas_mini {
	width: 310px;
	height: 233px;
	border: 1px solid #999;

	/* Leaflet 内部の z-index がページ側のポップアップより前に出ないようにする。 */
	position: relative;
	z-index: 0;
}

.amd_compact {
	padding: 1px 3px;
	font-size: 10px;
	line-height: 1.2;
	border-radius: 2px;
}

.amd_compact .amd_name {
	font-size: 9px;
	font-weight: bold;
	color: #fff;
}

.amd_compact .amd_big {
	font-size: 11px;
}

.amedas_mini .leaflet-control-attribution {
	font-size: 9px;
	line-height: 12px;
}

/* オーバーレイ（メッシュのグラフ画面）の閉じるボタンが
 * ページ幅(1000px)から6pxはみ出して切れてしまうため、内側へ寄せる。 */
._overlay_container_ > .close_btn {
	margin-left: -14px;
}

/* ---- 狭い画面（スマホ） ---- */
/* 凡例が地図の左上に重なっていると、幅の狭い画面では地点の名前を
 * 隠してしまうので、地図の下へ回します。地図の高さも少し詰めます。 */
@media screen and (max-width: 640px) {

	.amedas_map {
		height: 460px;
	}

	.amd_legend {
		position: static;
		margin-top: 6px;
		padding: 8px 10px;
		background-color: #3a5568;
		border-radius: 0;
	}

	.amd_legend_block {
		display: inline-block;
		margin-right: 16px;
		margin-bottom: 4px;
		vertical-align: top;
	}
}
