/* Desktop: a slim icon column at the right edge (labels are kept for screen readers).
   Phones/tablets (<= 849px, Flatsome's mobile breakpoint): a bar docked to the bottom so it no longer
   covers page content. Colors fall back to literals when the theme tokens are missing. */
.tq-fixed-contact {
    position: fixed;
    right: 16px;
    bottom: 80px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    width: 52px;
    overflow: hidden;
    border: 1px solid var(--tq-line, #e6e6e6);
    border-radius: var(--tq-r-md, 10px);
    background: #fff;
    box-shadow: var(--tq-shadow-hover, 0 14px 30px rgba(0, 0, 0, 0.13));
}

.tq-fixed-contact__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 6px;
    border-bottom: 1px solid var(--tq-line, #e6e6e6);
    color: var(--tq-ink, #1a1a1a);
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease;
}

.tq-fixed-contact__item:last-child {
    border-bottom: 0;
}

.tq-fixed-contact__item:hover {
    background: var(--tq-yellow-soft, #fff8e8);
    color: var(--tq-ink, #1a1a1a);
}

.tq-fixed-contact__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.tq-fixed-contact__icon img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.tq-fixed-contact__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media only screen and (max-width: 849px) {
    .tq-fixed-contact {
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: row;
        width: auto;
        border: 0;
        border-radius: 0;
        background: var(--tq-ink, #1a1a1a);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .tq-fixed-contact__item {
        flex: 1 1 0;
        gap: 8px;
        min-width: 0;
        min-height: 52px;
        padding: 6px 8px;
        border-bottom: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.14);
        color: #fff;
    }

    .tq-fixed-contact__item:last-child {
        border-right: 0;
    }

    .tq-fixed-contact__item:hover {
        background: transparent;
        color: #fff;
    }

    .tq-fixed-contact__icon,
    .tq-fixed-contact__icon img {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .tq-fixed-contact__label {
        position: static;
        width: auto;
        height: auto;
        overflow: hidden;
        clip: auto;
        text-overflow: ellipsis;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.2;
    }

    /* keep the page end and the back-to-top button clear of the bar */
    body {
        padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
    }

    .back-to-top {
        bottom: 68px;
    }
}
