/*
 * 参加書店の地図・一覧のスタイル。
 *
 * SimpleMap 2.6.1 の inc/styles/light.css から、実際に出力される要素の分だけを
 * 引き継いだもの（GPL）。見た目を変えないことを目的としているので、値は原則そのまま。
 *
 * 元ファイルから落としたもの:
 *   - #searchForm / #map_search / div.location_search 系
 *     … 検索フォームは display_search=hide で使っていないため
 *   - .infoBox 系 … InfoBox ライブラリを使っていないため
 *   - #powered_by_simplemap … 表示していないため
 *   - #simplemap-updating … 検索時のローディング表示専用で、到達しないため
 *
 * 地図は Google Maps から Leaflet に置き換えた。Leaflet 固有の調整は末尾の節にまとめる。
 */

/* ---------------------------------------------------------------- 地図本体 */

#simplemap {
	border: 1px solid #999;
	color: #000;
}

/*
 * テーマ側の img 指定が地図タイルやマーカーを崩すのを防ぐ（元CSSと同じ）。
 * 単一店舗ページの地図にも同じ打ち消しを掛ける。
 */
#simplemap img,
#comirano-single-map img {
	background: none !important;
	padding: 0 !important;
	max-width: none !important;
	max-height: none !important;
	border: none !important;
}

#simplemap a {
	color: #00c;
	background: none;
	text-decoration: none;
}

#simplemap a:hover {
	background: none;
	text-decoration: underline;
}

/* ------------------------------------------------------ マーカーの吹き出し */

.markertext {
	font-size: 0.9em;
	line-height: 1.2em;
	color: #000;
}

.markertext .bubble_category {
	font-size: 0.6em;
	font-style: italic;
}

.markertext a {
	color: #00c;
	text-decoration: underline;
}

.markertext h3 {
	margin-top: 0 !important;
	margin-bottom: 1em !important;
	text-align: left !important;
	line-height: 1.2em !important;
}

.markertext p {
	margin-bottom: 1em !important;
}

/* ------------------------------------------------- Leaflet の吹き出しの調整 */

/*
 * Leaflet の吹き出しは中身に余白を付けるが、.markertext が自前で 10px の余白を持つので外す。
 * 文字の大きさも Leaflet の既定（13px 固定）ではなくページの指定を引き継がせる。
 */
#simplemap .leaflet-popup-content {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

/* 右上の閉じるボタンが店舗名に重ならないよう、右側だけ余白を広げる。 */
#simplemap .leaflet-popup-content .markertext {
	padding-right: 24px !important;
}

/* 出典の表記。テーマの a 指定で色や下線が変わらないようにする。 */
.leaflet-control-attribution a {
	color: #0078a8 !important;
	background: none !important;
}

/* -------------------------------------------------------------- 結果の一覧 */

div#results {
	padding-bottom: 20px;
}

div.result {
	margin: 0;
	padding: 15px 5px;
	font-size: 0.9em;
	line-height: 1.2em;
	border-bottom: 1px solid #ccc;
}

div.result small {
	font-size: 0.7em;
	color: #999;
}

div.result:hover {
	background: #ebf0f1;
}

div.result address {
	font-style: normal;
}

div.result h3 {
	margin: 0 0 5px;
	font-size: 1.5em;
	text-transform: none;
}

div.result img {
	border: none;
}

div.result div.result_name {
	width: 100%;
}

div.result div.result_address {
	float: left;
	width: 40%;
}

div.result div.result_phone {
	float: left;
	width: 40%;
	min-height: 3em;
}

div.result div.result_links {
	float: left;
	display: table-cell;
	width: 20%;
	text-align: right;
	vertical-align: bottom;
}

div.result div.result_links div {
	clear: right;
	margin-bottom: 3px;
}

div.result div.result_phone span.result_phone,
div.result div.result_phone span.result_email,
div.result div.result_phone span.result_fax {
	display: block;
}

/* -------------------------------------------------- 単一店舗ページ */

.sm-single-location-default-template {
	padding: 3px;
}

/*
 * 元は iframe を padding-bottom 90% の枠に絶対配置していた。
 * iframe をやめて div に直接地図を描くため、同じ縦横比を保ちつつ簡素化する。
 */
.sm-single-map {
	position: relative;
	padding-bottom: 90%;
	height: 0;
	overflow: hidden;
}

.sm-single-map #comirano-single-map {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.sm-single-location-data {
	margin-top: 30px;
}

.sm-single-location-data-ul {
	list-style-type: none;
	padding-left: 0;
	margin-left: 0;
}

/* ------------------------------------------------------------ レスポンシブ */

@media screen and (max-width: 800px) {
	div.result div.result_address {
		width: 100%;
		float: none;
	}

	div.result div.result_phone {
		width: 70%;
		min-height: 0.1em;
	}

	div.result div.result_links {
		width: 30%;
	}

	div.result div.result_name {
		margin-bottom: 10px;
	}

	div.result div.result_phone span.result_phone,
	div.result div.result_phone span.result_email,
	div.result div.result_phone span.result_fax,
	div.result div.result_links div.result_website {
		display: block;
		margin: 5px 0;
	}

	div.result div.sm_category_list,
	div.result div.sm_tag_list {
		margin: 5px 0;
	}
}

@media screen and (max-width: 480px) {
	div.result div.result_phone,
	div.result div.result_links {
		width: 100%;
		min-height: 0;
		float: none;
		text-align: left;
	}
}
