/* ============================================================
   MLS Genie™ — GenieLayers Panel
   v1.6.635
   
   Button and panel live inside a Google Maps native control
   (map.controls[TOP_LEFT]) — no absolute positioning needed.
   Google Maps handles placement, z-index, and overflow.
   ============================================================ */

/* Control wrapper — Google Maps injects this into the controls layer */
.mlsg-ov-control-wrap {
	position: relative;
	margin: 10px 0 0 10px; /* offset from top-left corner */
	font-family: inherit;
}

/* ── Layers Button ── */
.mlsg-ov-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 16px;
	height: 40px;
	background: var(--mlsg-teal, #0ea5e9);
	border: none;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0,0,0,.3);
	font-size:0.875em;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	cursor: pointer;
	white-space: nowrap;
	font-family: inherit;
	letter-spacing: .04em;
	transition: background .15s;
	line-height: 1;
}
.mlsg-ov-btn:hover { background: #0284c7; }
button#mlsg-ov-btn { display: inline-flex; }

.mlsg-ov-btn__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	display: none;
	flex-shrink: 0;
}
.mlsg-ov-btn--active .mlsg-ov-btn__dot { display: block; }

/* ── Panel ── */
.mlsg-ov-panel {
	position: fixed;
	top: auto;
	left: auto;
	z-index: 9999;
	width: 240px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0,0,0,.2);
	overflow: hidden;
	display: none;
	font-family: inherit;
}
.mlsg-ov-panel.is-open { display: block; }

.mlsg-ov-panel__section {
	padding: 12px 16px;
}
.mlsg-ov-panel__section + .mlsg-ov-panel__section {
	border-top: 1px solid #e5e7eb;
}
.mlsg-ov-panel__heading {
	font-size:0.75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #6b7280;
	margin: 0 0 10px;
}
.mlsg-ov-panel__footer {
	padding: 7px 14px;
	border-top: 1px solid #e5e7eb;
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 5px;
	font-size:0.75em;
	color: #9ca3af;
}

/* ── Rows ── */
.mlsg-ov-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 0;
	cursor: pointer;
	font-size:1em;
	color: #1a1a2e;
}
.mlsg-ov-row input[type="radio"],
.mlsg-ov-row input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--mlsg-teal, #0ea5e9);
	cursor: pointer;
	flex-shrink: 0;
	margin: 0;
}
.mlsg-ov-row__label {
	flex: 1;
	font-size:0.875em;
	line-height: normal;
	user-select: none;
}
.mlsg-ov-row__swatch {
	width: 12px;
	height: 12px;
	border-radius: 2px;
	flex-shrink: 0;
	opacity: 0.85;
}
.mlsg-ov-row__badge {
	font-size:0.75em;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 20px;
	background: #e5e7eb;
	color: #6b7280;
}

/* Zoom hint — shown below an overlay row when user must zoom in to see data */
.mlsg-ov-zoom-hint {
	font-size:0.75em;
	color: #d97706;
	margin: 0 0 4px 26px;
	padding: 3px 6px;
	background: #fef9c3;
	border-radius: 4px;
	line-height: 1.4;
}

/* ── Accordion groups (Air Quality, Pollen) ──────────────────────────────── */
.mlsg-ov-accordion {
	border-radius: 5px;
	overflow: hidden;
	margin-bottom: 2px;
}

.mlsg-ov-accordion__hd {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 6px 4px;
	background: none;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size:0.875em;
	font-weight: 600;
	color: #374151;
	text-align: left;
	transition: background .12s;
	font-family: inherit;
}
.mlsg-ov-accordion__hd:hover { background: #f3f4f6; }

.mlsg-ov-accordion__icon {
	width: 18px;
	text-align: center;
	color: #6b7280;
	font-size:0.875em;
	flex-shrink: 0;
}
.mlsg-ov-accordion__label { flex: 1; }

.mlsg-ov-accordion__chevron {
	font-size:0.75em;
	color: #9ca3af;
	transition: transform .2s;
	flex-shrink: 0;
}
.mlsg-ov-accordion--open .mlsg-ov-accordion__chevron {
	transform: rotate(180deg);
}

.mlsg-ov-accordion__body {
	display: none;
	padding: 0 0 4px 0;
}
.mlsg-ov-accordion--open .mlsg-ov-accordion__body {
	display: block;
}

/* Indented rows inside accordion body */
.mlsg-ov-row--indent {
	padding-left: 12px;
}

/* ── GenieLayers Legend ──────────────────────────────────────────────────── */
.mlsg-ov-legend {
	position: fixed;
	z-index: 9998;
	background: rgba(255,255,255,0.95);
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
	padding: 8px 12px;
	font-family: inherit;
	min-width: 180px;
	max-width: 260px;
	pointer-events: none;
}

.mlsg-legend__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 7px;
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 5px;
}
.mlsg-legend__title {
	font-size:0.75em;
	font-weight: 700;
	color: #1e293b;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.mlsg-legend__source {
	font-size:0.75em;
	color: #94a3b8;
	flex-shrink: 0;
}

.mlsg-legend__stops {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.mlsg-legend__stop {
	display: flex;
	align-items: center;
	gap: 8px;
}
.mlsg-legend__swatch {
	width: 14px;
	height: 14px;
	border-radius: 3px;
	flex-shrink: 0;
	border: 1px solid rgba(0,0,0,.1);
}
.mlsg-legend__label {
	font-size:0.75em;
	color: #374151;
}

.mlsg-legend__note {
	font-size:0.75em;
	color: #9ca3af;
	margin-top: 5px;
	padding-top: 4px;
	border-top: 1px solid #f1f5f9;
	line-height: normal;
}
