* { margin: 0; padding: 0; border: none; }
body { font-family: 'Montserrat', sans-serif; color: #e6e6e9; background: #0b0f14; }
li { list-style: none; }

.left { float: left; }
.right { float: right; }
.notes { font-size: 1rem; }

header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 2;
	font-size: 19px;
	height: 56px;
	padding: 8px 10px;
	background: rgba(10, 14, 19, 0.8);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(255,255,255,0.06);
	color: white;
}

header p {
	/*font-weight: bold;*/
}

header li {
	display: inline-block;
	margin-right: 5px;
	margin-top:4px;
	height: 20px;
	overflow: hidden;
}

header li:last-child {
	margin-right: 0;
}

header a {
	color: #e6e6e9;
	text-decoration: none;
	font-weight: 600;
}

header a.active {
	color: white;
}

.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: #16a085; border-color: #16a085; box-shadow: 0 8px 20px rgba(22,160,133,.25); }
.btn-primary:hover { background: #149174; border-color: #149174; }
.btn-primary.active { background: #1862AD; border-color: #1862AD; box-shadow: 0 8px 20px rgba(24,98,173,.25); }
.btn-secondary { background: #1f2937; border-color: #1f2937; color: #e6e6e9; }
.btn-secondary:hover { background: #111827; border-color: #111827; color: #fff; }

.dropdown-menu { background: #0f172a; border: 1px solid rgba(255,255,255,0.06); }
.dropdown-item { color: #e6e6e9; }
.dropdown-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.dropdown-item.active { background: #16a085; }

#map {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

.tour #map {
	position: static;
	width: 670px;
	height: 360px;
	margin: 10px 10px;
	float: left;
}

#tour-info {
	display: none;
}

.tour #tour-info {
	display: block;
	width: 580px;
	height: 360px;
	margin: 10px 0;
	float: left;
}

#tour-nav {
	display: none;
}

.tour #tour-nav {
	display: block;
	margin-top: 30px;
	padding: 0 10px;
	overflow: hidden;
}

#tour-nav h3 {
	display: none;
	text-align: center;
}

.tour #types {
	display: none;
}

.types {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	margin: 62px 0 0 10px;
	padding-bottom: 8px;
	max-height: 702px;
}

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

.types .type {
	background: rgba(17,24,39,0.85);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border: 1px solid rgba(255,255,255,0.06);
	box-shadow: 0 10px 30px rgba(0,0,0,0.25);
	margin-top: 10px;
	border-radius: 12px;
	overflow: hidden;
}

.types .type:first-child { margin-top: 0; }

.types .type h3 {
	font-size: 0.95em;
	padding: 10px 12px;
	background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
	color: #e6e6e9;
	cursor: pointer;
}

/* Clear collapse state and improve affordance */
.types .type.collapsed h3 {
	background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

/* Chevron rotation already via :after; emphasize when expanded */
.types .type:not(.collapsed) h3 { border-bottom: 1px solid rgba(255,255,255,0.06); }
.types .type h3:after { transition: transform .2s ease, opacity .2s ease; }
.types .type:not(.collapsed) h3:after { transform: rotate(0deg); opacity: .9; }

.types .type ul { padding: 8px 12px; font-weight: 500; }

.types .type.collapsed ul {
	display: none;
}

.types .type li { margin-bottom: 6px; overflow: hidden; min-width: 200px; max-width: 340px; white-space: nowrap; }

.types .type label {
	cursor: pointer;
	vertical-align: middle;
	margin-top: 4px;
}

.types .type input {
	display: none;
}

.types .type img { width: 18px; position: relative; -webkit-filter: grayscale(1); opacity: .25; margin-right: 8px; }

.types .type input:checked + img {
	-webkit-filter: grayscale(0);
	opacity: 1;
}

.tt {
	width: 20px;
	height: 20px;
	background-image: url(icons/signpost.png);
	display: inline-block;
	background-position: 0 61px;
	float: right;
}

.types .details {
	color: #777;
	text-decoration: none;
	float: right;
	margin-top: 4px;
}

.types .details:hover { color: #fff; }

.types .back {
	float: left;
	margin: 0 5px 0 0;
}

.gm-style-mtc {
	margin-top: 40px !important;
}
.listview {
	overflow-y: scroll;
    max-height: 500px;
}

.hidden {
	display: none;
}

html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map { height: 100% }

/* ===== Enhanced Professional UI ===== */

/* Smooth transitions */
* { transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease; }

/* Header branding */
header p.left a { font-size: 18px; letter-spacing: .2px; }

/* Button polish */
.btn { padding: 6px 12px; border-width: 0; }
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(22,160,133,.25); }

/* Sidebar layout improvements */
.types { width: 320px; }
.types .type { backdrop-filter: blur(6px); }
.types .type h3 { display: flex; align-items: center; justify-content: space-between; }
.types .type h3:after { content: '\2193'; font-size: .9em; opacity: .6; }
.types .type.collapsed h3:after { transform: rotate(-90deg); }

/* List items */
.types .type li { padding: 8px 10px; border-radius: 10px; display: flex; align-items: center; transition: background 0.2s ease; }
.types .type li:hover { background: rgba(255,255,255,0.08); }
.types .type label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #e6e6e9; }

/* Icon states */
.types .type img { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3)); }
.types .type input:checked + img { opacity: 1; filter: drop-shadow(0 0 0 rgba(0,0,0,0)) brightness(1.1); }

/* Details link */
.types .details { padding: 2px 6px; border-radius: 6px; }
.types .details:hover { background: rgba(255,255,255,0.06); }

/* Dropdown polish */
.dropdown-menu { border-radius: 10px; overflow: hidden; }
.dropdown-item { padding: 8px 12px; }

/* ===== Enhanced Info Window/Popup Styling ===== */

/* Google Maps Info Window Container */
.gm-style .gm-style-iw-c {
	background: rgba(17, 24, 39, 0.98) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
	border-radius: 16px !important;
	padding: 0 !important;
	overflow: hidden !important;
}

.gm-style .gm-style-iw-d {
	background: transparent !important;
	color: #e6e6e9 !important;
	overflow: visible !important;
}

.gm-style .gm-style-iw-tc::after {
	background: rgba(17, 24, 39, 0.98) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Close button styling */
.gm-style .gm-ui-hover-effect {
	opacity: 0.8 !important;
	top: 8px !important;
	right: 8px !important;
}

.gm-style .gm-ui-hover-effect:hover {
	opacity: 1 !important;
}

.gm-style .gm-ui-hover-effect > span {
	background-color: rgba(255, 255, 255, 0.9) !important;
	border-radius: 50% !important;
	width: 28px !important;
	height: 28px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* Info Window Content */
#info-window {
    color: #e6e6e9;
    font-family: 'Montserrat', sans-serif;
    max-width: 420px;
    width: 100%;
}

#info-window .scrollable {
	padding: 0;
}

/* Header Section */
.info-header {
	padding: 16px 20px;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-header:hover {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.info-title-section {
	display: flex;
	align-items: center;
	gap: 16px;
}

.info-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	border: 3px solid;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Territory Logo Styling */
.territory-logo {
	width: 90px;
	height: 90px;
	border-radius: 12px;
	object-fit: contain;
	flex-shrink: 0;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
	background: rgba(255, 255, 255, 0.95);
	padding: 8px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.territory-logo:hover {
	transform: scale(1.08);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.territory-logo-small {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	object-fit: contain;
	margin-right: 12px;
	display: inline-block;
	vertical-align: middle;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
	background: rgba(255, 255, 255, 0.95);
	padding: 4px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	transition: transform 0.2s ease;
}

.territory-logo-small:hover {
	transform: scale(1.15);
}

#info-window h3 {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	color: #ffffff;
	letter-spacing: -0.3px;
	line-height: 1.3;
}

/* Info Body */
#info-body {
	padding: 20px;
}

/* Notes Section */
.info-notes {
	margin-top: 8px;
	padding: 12px;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 8px;
	border-left: 3px solid rgba(22, 160, 133, 0.5);
}

#info-window .notes {
	color: #cfd2d7;
	font-size: 14px;
	line-height: 1.7;
	margin: 0;
	font-weight: 400;
}

/* Video Section */
#info-window h4 {
	font-size: 12px;
	font-weight: 600;
	margin: 16px 0 8px 0;
	color: #cfd2d7;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Images */
#info-body img {
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Links */
#info-body a {
	color: #16a085;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

#info-body a:hover {
	color: #149174;
	text-decoration: underline;
}

/* Scrollbar aesthetics for list view */
.listview { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.listview::-webkit-scrollbar { width: 8px; }
.listview::-webkit-scrollbar-track { background: transparent; }
.listview::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.15); border-radius: 8px; }

/* MapType control spacing fix for taller header */
.gm-style-mtc { margin-top: 58px !important; }


/*
 * Mobile devices
 */

@media only screen and (max-device-width: 568px) {
	.right {
		/*display: none;*/
		max-width: 300px;
	}

	.types {
		opacity: 0.75;
	}

	.gm-style-mtc {
		margin-top: 36px !important;
	}

	.gm-style-mtc div {
		padding: 0px 2px 0px 2px !important;
	}
}

/*
 * Responsive videos
 */

.youtubewrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	padding-top: 25px;
	height: 0;
}
.youtubewrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

#info-body img {
	width: 100%;
}
