@use 'sass:math';
@import '~@gisatcz/ptr-core/lib/styles/_variables';

.ptr-map-controls {
	position: absolute;
	bottom: m(math.div(1, 3));
	right: m(math.div(1, 3));
	z-index: 999;

	display: flex;
	flex-direction: column;
}

.ptr-map-controls .control {
	background: rgba(255, 255, 255, 0.8);
	border-radius: 0.3rem;
	z-index: 15;
	box-shadow: 0 0 0.3rem 0 rgba(0, 0, 0, 0.3);
	margin-bottom: m(math.div(1, 3));
}

.ptr-map-controls .control:last-child {
	margin-bottom: 0;
}

.ptr-map-controls .control > .ptr-button:focus,
.ptr-map-controls .menu-control > .ptr-button:focus {
	outline: none;
}

.ptr-map-controls .control > .ptr-button:focus::after {
	box-shadow: none;
	border: 0;
}

.ptr-map-controls .control > .ptr-button,
.ptr-map-controls .menu-control > .ptr-button {
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	user-select: none;
	display: block;
	width: 2rem;
	height: 2rem;
	text-align: center;
	font-size: 1.125rem;
	color: #666666;
	cursor: pointer;

	transition: color 0.2s ease-in-out, background 0.2s ease-in-out;
}

.ptr-map-controls .control > .ptr-button.disabled .ptr-icon .line,
.ptr-map-controls .menu-control > .ptr-button.disabled .ptr-icon .line {
	fill: #aaaaaa;
}

.ptr-map-controls .control .ptr-button {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ptr-map-controls .control .ptr-icon {
	width: 1.35rem;
	height: 1.35rem;
}

.ptr-map-controls .legend-control .ptr-icon {
	width: 1.6rem;
	height: 1.6rem;
}

.ptr-map-controls .legend-control.open .ptr-icon {
	color: var(--accent50);
}

.ptr-map-controls .control > .ptr-button:not(:first-child) {
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.ptr-map-controls .control > .ptr-button:first-child {
	border-top-right-radius: 0.3rem;
	border-top-left-radius: 0.3rem;
}
.ptr-map-controls .control > .ptr-button:last-child {
	border-bottom-right-radius: 0.3rem;
	border-bottom-left-radius: 0.3rem;
}

.ptr-map-controls .control > .ptr-button:hover,
.ptr-map-controls .menu-control > .ptr-button:hover {
	background-color: rgba(255, 255, 255, 1);
	color: var(--accent50);
}

.ptr-map-controls .control > .ptr-button:not(.ghost):not(.invisible):not(.primary):not(.inverted):hover:after,
.ptr-map-controls .control > .ptr-button:not(.ghost):not(.invisible):not(.primary):not(.inverted):hover:after {
	background: none;
}

.ptr-map-controls .rotate-needle-control i {
	/*transition: all .2s ease-in-out;*/
	-webkit-transform: rotate(-45deg);
	transform: rotate(-45deg);
}

/*#rotate-needle-control:hover i {*/
/*transform: rotate(-45deg);*/
/*}*/

.ptr-map-controls .tilt-control .ptr-button {
	/*	overflow: hidden;*/
	background-position: center center;
	background-size: 1.2rem;
	background-repeat: no-repeat;
}
