/**
 * 学校マップスタイル
 *
 * Google Maps JavaScript API用スタイル
 *
 * @package ShingakuEventManager
 * @since 4.1.0
 * @since 32.0.0 Google Maps移行
 */

/* マップコンテナ */
.shgk-school-map-container {
	margin: 20px 0;
	position: relative;
}

/* マップ本体（複数インスタンス対応） */
.shgk-school-map-container > div[id^="shgk-school-map-block-"] {
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

/* 後方互換性：旧IDセレクター */
#shgk-school-map {
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

/* ローディング表示 */
.shgk-map-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	background: rgba(255, 255, 255, 0.95);
	padding: 20px 30px;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	z-index: 1000;
}

.shgk-map-loading .spinner {
	float: none;
	margin: 0 auto 10px;
}

.shgk-map-loading p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

/* エラー表示（Google Maps APIキー未設定時等） */
.shgk-map-error {
	padding: 20px;
	background: #f8f8f8;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-align: center;
	color: #666;
	font-size: 14px;
}

.shgk-map-error a {
	color: #0073aa;
	text-decoration: none;
}

.shgk-map-error a:hover {
	text-decoration: underline;
}

/* フィルタUI（今後実装予定） */
.shgk-school-map-filter {
	margin-bottom: 15px;
	padding: 15px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
}

/* ポップアップスタイル（Google Maps InfoWindow内） */
.shgk-school-popup {
	min-width: 200px;
	max-width: 300px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.shgk-popup-thumbnail {
	width: 100%;
	height: auto;
	max-height: 150px;
	object-fit: cover;
	border-radius: 4px;
	margin-bottom: 10px;
}

.shgk-popup-title {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: bold;
	color: #333;
	line-height: 1.4;
}

.shgk-popup-meta {
	margin: 0 0 8px 0;
	font-size: 13px;
	color: #666;
}

.shgk-popup-address {
	margin: 0 0 12px 0;
	font-size: 13px;
	color: #666;
	line-height: 1.4;
}

.shgk-popup-link {
	margin: 0;
}

.shgk-popup-link .button {
	display: inline-block;
	padding: 6px 12px;
	background: #0073aa;
	color: #fff;
	text-decoration: none;
	border-radius: 3px;
	font-size: 13px;
	transition: background 0.2s ease;
}

.shgk-popup-link .button:hover {
	background: #005a87;
	color: #fff;
}

/* 会場マップブロック */
.shgk-venue-map-block {
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.shgk-venue-map-empty {
	background: #f8f8f8;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666;
	font-size: 14px;
}

/* 会場ポップアップ */
.shgk-venue-popup {
	min-width: 180px;
	max-width: 280px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* 学校詳細ブロックの地図ラッパー（Google MapsのCSS隔離用） */
.shgk-map-wrapper {
	contain: layout style;
	isolation: isolate;
}

/* 学校からのコメント - 切り詰め防止 */
.shgk-school-description-section .shgk-school-description,
.shgk-school-description-section .shgk-school-description p {
	overflow: visible !important;
	text-overflow: clip !important;
	white-space: normal !important;
	display: block !important;
	max-height: none !important;
	line-clamp: unset !important;
	-webkit-line-clamp: unset !important;
	-webkit-box-orient: unset !important;
}

/* 学校詳細ブロックの地図コンテナ */
.shgk-map-container {
	height: 300px;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
	.shgk-school-map-container {
		margin: 15px 0;
	}

	.shgk-school-map-container > div[id^="shgk-school-map-block-"],
	#shgk-school-map {
		height: 400px !important;
	}

	.shgk-popup-thumbnail {
		max-height: 120px;
	}

	.shgk-school-popup,
	.shgk-venue-popup {
		min-width: 180px;
		max-width: 260px;
	}

	.shgk-map-container {
		height: 250px;
	}
}

/* Google Maps InfoWindowのスタイル上書き */
.gm-style .gm-style-iw-c {
	padding: 12px !important;
	border-radius: 8px !important;
}

.gm-style .gm-style-iw-d {
	overflow: auto !important;
}

/* 路線切り替えボタン（ホバー時） */
.shgk-transit-btn:hover {
	background: #f5f5f5 !important;
}

.shgk-transit-btn:focus {
	outline: 2px solid #4285f4;
	outline-offset: 2px;
}
