.map-compass-control {
    display: grid;
    grid-template-columns: 30px 34px 30px;
    overflow: hidden;
    background: #fff;
}

.map-compass-control__button {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    width: 100%;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-right: 1px solid #ccc;
    border-radius: 0;
    color: #333;
    background: #fff;
    font: 700 20px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    cursor: pointer;
}

.map-compass-control__button:last-child {
    border-right: 0;
}

.map-compass-control__button:hover {
    background: #f4f4f4;
}

.map-compass-control__button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

.map-compass-control__north {
    position: relative;
}

.map-compass-control__needle {
    position: relative;
    display: block;
    width: 22px;
    height: 28px;
    transform-origin: 50% 50%;
    transition: transform 80ms linear;
}

.map-compass-control__north-label {
    position: absolute;
    top: 0;
    left: 50%;
    color: #c62828;
    font-size: 10px;
    line-height: 10px;
    transform: translateX(-50%);
}

.map-compass-control__needle-tip {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 0;
    height: 0;
    border-right: 5px solid transparent;
    border-bottom: 12px solid #c62828;
    border-left: 5px solid transparent;
    transform: translateX(-50%);
}

.map-compass-control__needle-tip::after {
    position: absolute;
    top: 12px;
    left: -5px;
    width: 0;
    height: 0;
    border-top: 7px solid #6b7280;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    content: "";
}

.leaflet-container.map-is-rotating,
.leaflet-container.map-is-rotating .leaflet-interactive {
    cursor: ew-resize;
}

@media (pointer: coarse) {
    .map-compass-control {
        grid-template-columns: 36px 40px 36px;
    }

    .map-compass-control__button {
        height: 40px;
    }
}
