﻿.bottom-right {
    position: fixed;
    right: 12px;
    bottom: 140px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    padding: 8px;
    background: var(--color-bg-light, #f7f7f7);
    border: 1px solid var(--color-border, #e3e3e3);
    border-radius: 32px;
    z-index: 50;
}

    .bottom-right.has-scroll-top {
        padding-bottom: 8px;
    }

.bottom-right-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 12px;
    background: var(--color-white, #ffffff);
    border-radius: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button.bottom-right-item {
    border: 0;
    appearance: none;
}

.bottom-right-item.px-small {
    border-radius: 22px;
}

.bottom-right-item.w-full {
    width: 100%;
}

.bottom-right-scroll-top {
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    margin-left: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .bottom-right-scroll-top.is-visible {
        display: flex;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

.bottom-right-item:hover,
.bottom-right-item:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(39, 32, 31, 0.08);
    background-color: #27201F;
}

    .bottom-right-item:hover img,
    .bottom-right-item:focus-within img {
        filter: brightness(0) invert(1);
    }

/* Tooltip Base */
.bottom-right-item.tooltip-left {
    position: relative;
}

    .bottom-right-item.tooltip-left::before,
    .bottom-right-item.tooltip-left::after {
        position: absolute;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        pointer-events: none;
        z-index: 100;
    }

    /* Tooltip text */
    .bottom-right-item.tooltip-left::before {
        content: attr(data-tooltip);
        right: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%);
        background-color: #27201F;
        color: #ffffff;
        font-size: 14px;
        font-weight: 400;
        padding: 6px 12px;
        border-radius: 6px;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    /* Tooltip triangle */
    .bottom-right-item.tooltip-left::after {
        content: '';
        right: calc(100% + 6px);
        top: 50%;
        transform: translateY(-50%);
        border-width: 6px 0 6px 6px;
        border-style: solid;
        border-color: transparent transparent transparent #27201F;
    }

    /* Show tooltip on hover */
    .bottom-right-item.tooltip-left:hover::before,
    .bottom-right-item.tooltip-left:hover::after,
    .bottom-right-item.tooltip-left:focus-within::before,
    .bottom-right-item.tooltip-left:focus-within::after {
        opacity: 1;
        visibility: visible;
    }

.bottom-right-item .icon-route-one,
.bottom-right-item .icon-earth,
.bottom-right-item .icon-up-small {
    width: 24px;
    height: 24px;
}

.bottom-right-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Hide wrapper when it contains no child elements */
.bottom-right:empty,
.bottom-right.is-empty {
    display: none;
}

@media (max-width: 768px) {
    .bottom-right {
        display: none;
    }
}
