.leaflet-tilelayer-manager {
	width: 56px;
	min-width: 56px;
	height: 56px;
	background-color: #fff;
	border-radius: 4px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	font: inherit;
	display: flex;
	flex-direction: column;
	transition: width 0.2s ease, height 0.2s ease, box-shadow 0.2s ease;
}

.leaflet-tilelayer-manager button {
	background: none;
	border: 0;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0.35rem;
	color: #1f2933;
	cursor: pointer;
}

.leaflet-tilelayer-manager button:focus-visible {
	outline: 2px solid #4279f1;
	outline-offset: 1px;
}

.leaflet-tilelayer-manager .ltlm-current {
	font-weight: 600;
	justify-content: center;
	background-color: rgba(66, 121, 241, 0.08);
}

.leaflet-tilelayer-manager .ltlm-list {
	display: none;
	flex-direction: column;
	max-height: 320px;
	overflow-y: auto;
}

.leaflet-tilelayer-manager.is-expanded {
	width: 172px;
	min-width: 172px;
	height: auto;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.leaflet-tilelayer-manager.is-expanded .ltlm-current {
	justify-content: flex-start;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.leaflet-tilelayer-manager.is-expanded .ltlm-list {
	display: flex;
}

.leaflet-tilelayer-manager.is-expanded button {
	padding: 0.35rem 0.55rem;
}

.leaflet-tilelayer-manager.is-collapsed {
	width: 56px;
	min-width: 56px;
	height: 56px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	opacity: 0.9;
}

.leaflet-tilelayer-manager.is-collapsed:hover {
	opacity: 1;
}

.leaflet-tilelayer-manager.is-collapsed .ltlm-current {
	padding: 0.25rem;
	border-bottom: 0;
}

.leaflet-tilelayer-manager.is-collapsed .ltlm-name {
	display: none;
}

.ltlm__entry {
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ltlm__entry:hover {
	background-color: rgba(66, 121, 241, 0.12);
}

.ltlm__entry.is-active {
	background-color: var(--primary-color, #3f51b5);
	color: var(--white, #fff);
}

.ltlm__entry.is-active .ltlm-preview {
	outline: 2px solid rgba(255, 255, 255, 0.8);
}

.ltlm-preview {
	width: 48px;
	height: 48px;
	border-radius: 3px;
	object-fit: cover;
	flex-shrink: 0;
}

.ltlm-name {
	flex: 1;
	text-align: left;
	font-size: 0.92rem;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (max-width: 640px) {
	.leaflet-tilelayer-manager.is-expanded {
		width: 150px;
		min-width: 150px;
	}

	.ltlm-preview {
		width: 44px;
		height: 44px;
	}

	.ltlm-name {
		font-size: 0.85rem;
	}
}
