.map-container {
    width: 100%;
    height: 0;
    padding-bottom: 35%;
    position: relative;
}

@media screen and (max-device-width: 768px) { 
    .map-container {
        padding-bottom: 70%;
    }
}
@media screen and (min-device-width: 769px) { 
    .map-container {
        padding-bottom: 440px;
    }
}

.map-container svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.legend {
    margin-top: 1em;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1em;
    margin-bottom: 0.5em;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.5em;
    border: none;
}

.legend-label {
    font-size: 1rem;
}

.label-manager-container {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
}

.label-manager-color-picker {
    width: 20px;
    height: 20px;
    background-color: #000;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
    border: 1px solid black;
}

.label-manager-button-container {
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.label-manager-container .components-base-control,
.label-manager-container .components-base-control__field {
    margin-bottom: initial !important;
}

.modal-labels {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
}

.components-modal__header {
    display: none !important;
}

.modal-labels .components-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 5px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    background-color: transparent;
    color: initial;
}

.modal-labels .components-button:hover {
    opacity: 0.8;
}

.custom-modal .components-modal__content {
    padding: 0px !important;
    margin: 0px auto !important;
    max-width: 350px;
}

.components-modal__frame.custom-modal {
    min-width: 150px !important;
}

@media screen and (max-width: 758px) {
    .legend {
        justify-content: center;
    }

    .legend-item {
        flex: 0 1 auto;
        margin: 0 auto 1em;
        width: 100%;
        max-width: 400px;
        justify-content: center;
    }
}

.wp-block-map-viz-map-block {
    display: block;
    max-width: var(--paragraph-width);
}

.tippy-box[data-theme~='dark'] {
    background-color: white;
    color: black;
    border: 1px solid black;
}

.tippy-box[data-theme~='dark'][data-placement^='bottom'] > .tippy-arrow::before {
    background-color: white;
}

.tippy-box[data-theme~='dark'][data-placement^='top'] > .tippy-arrow::before {
    border-top-color: white;
}

.map-viz-svg * {
  pointer-events: auto !important;
}
