/**
 * Common
 */
.dt-geo-sr-only {
    /* see: https://github.com/twbs/bootstrap/blob/c82919e8970c7ebebb87ded191b815c76737cd04/scss/mixins/_visually-hidden.scss#L8 */
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.dt-geo-sr-only * {
    overflow: hidden !important;
}

/**
 * Selector
 */
.dt-geo-selector {
    position: relative;
    width: fit-content;
}

/**
 * Dropdown
 */
.dt-geo-dropdown {
    position: relative;
    width: fit-content;
}

.dt-geo-dropdown__button {
    appearance: none;
    display: flex;
    width: max-content;
    align-items: center;
    column-gap: 0.5em;
    color: currentColor;
    background-color: transparent;
}

.dt-geo-dropdown__list {
    position: absolute;
    top: calc(100% + 0.5em);
    right: 0;
    z-index: 4;
    list-style-type: none;
    min-width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0.5em 0;
    background-color: white;
    opacity: 0;
    transition: opacity ease-in-out 150ms;

    @supports (interpolate-size: allow-keywords) {
        height: 0;
        transition: height ease-in-out 150ms, opacity ease-in-out 150ms;
        interpolate-size: allow-keywords;
    }
}

.dt-geo-dropdown__list--active {
    opacity: 1;

    @supports (interpolate-size: allow-keywords) {
        height: fit-content;
    }
}

.dt-geo-dropdown__list-item {
    margin: 0;
}

.dt-geo-dropdown__link {
    display: block;
    padding: 0.5em 1em;
    text-decoration: none;
    white-space: nowrap;
    color: currentColor;
}

/**
 * Tooltip
 */
.dt-geo-tooltip {
    --dt-geo-tooltip--color-fg: white;
    --dt-geo-tooltip--color-bg: black;
    --dt-geo-tooltip--size-arrow: 14px;

    position: absolute;
    top: calc(100% + var(--dt-geo-tooltip--size-arrow));
    right: 0;
    z-index: 1000;
    display: none;
    width: max-content;
    padding: 0;
    border-radius: 20px;
    color: var(--dt-geo-tooltip--color-fg);
    background-color: var(--dt-geo-tooltip--color-bg);
    transition: opacity ease-in-out 150ms, display 150ms allow-discrete;
    opacity: 0;
}

.dt-geo-tooltip--active {
    display: block;
    opacity: 1;

    @starting-style {
        opacity: 0;
    }
}

.dt-geo-tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    top: -14px;
    right: 16px;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 18px solid var(--dt-geo-tooltip--color-bg);
    transform: rotate(180deg);
}

.dt-geo-tooltip__close {
    position: absolute;
    top: 1em;
    right: 1em;
    width: 1em;
    height: 1em;
    padding: 0;
    border: 0;
    background-color: transparent;
    cursor: pointer;
}

.dt-geo-tooltip__close-icon {
    display: block;
    width: 100%;
    height: 100%;
}

.dt-geo-tooltip__content {
    padding: 1em;
    color: var(--dt-geo-tooltip--color-fg);
}

.dt-geo-tooltip__heading {
    margin: 0 0 1em;
    font-size: 1.2em;
    line-height: 1;
    color: currentColor;
}

.dt-geo-tooltip__text {
    margin: 0;
}

.dt-geo-tooltip__link {
    text-decoration: underline;
}
