:root {
    --bbf-size: 52px;
    --bbf-radius: 999px;
    --bbf-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    --bbf-bg: var(--wd-primary-color, #83b735);
    --bbf-bg-hover: var(--wd-alternative-color, #6f9e2b);
    --bbf-text: #ffffff;
    --bbf-border: rgba(255, 255, 255, 0.3);
    --bbf-icon-bg: rgba(255, 255, 255, 0.16);
}

#bbf-portal {
    all: initial;
}

.bbf-back-button {
    position: absolute;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: var(--bbf-size);
    height: var(--bbf-size);
    padding: 0 14px 0 10px;
    border: 1px solid var(--bbf-border);
    border-radius: var(--bbf-radius);
    background: var(--bbf-bg);
    color: var(--bbf-text);
    box-shadow: var(--bbf-shadow);
    cursor: pointer;
    font-family: var(--wd-text-font, inherit);
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease, background-color 0.2s ease;
}

.bbf-back-button.bbf-anchor-viewport {
    position: fixed;
}

.bbf-back-button.bbf-anchor-page {
    position: absolute;
}

.bbf-back-button.bbf-anchor-fallback {
    position: absolute;
}

.bbf-back-button.bbf-visible {
    display: inline-flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.bbf-back-button:hover,
.bbf-back-button:focus,
.bbf-back-button:focus-visible {
    background: var(--bbf-bg-hover);
    outline: none;
}

.bbf-back-button:active {
    transform: translateY(1px) scale(0.99);
}

.bbf-back-button__icon {
    display: inline-flex;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bbf-icon-bg);
    align-items: center;
    justify-content: center;
}

.bbf-back-button__icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.bbf-back-button__label {
    display: inline-block;
    white-space: nowrap;
}

.bbf-back-button.bbf-shape-pill {
    border-radius: 999px;
}

.bbf-back-button.bbf-shape-rounded {
    border-radius: 14px;
}

.bbf-back-button.bbf-shape-square {
    border-radius: 0;
}

.bbf-back-button.bbf-shape-circle {
    border-radius: 50%;
    width: var(--bbf-size);
    min-width: var(--bbf-size);
    padding: 0;
}

.bbf-back-button.bbf-layout-icon-only {
    width: var(--bbf-size);
    min-width: var(--bbf-size);
    padding: 0;
}

.bbf-back-button.bbf-layout-icon-only .bbf-back-button__label,
.bbf-back-button.bbf-shape-circle .bbf-back-button__label {
    display: none;
}

@media (max-width: 991px) {
    .bbf-back-button {
        max-width: 140px;
    }
}

@media (max-width: 480px) {
    :root {
        --bbf-size: 50px;
    }

    .bbf-back-button {
        font-size: 12px;
        padding: 0 10px;
        min-width: 46px;
    }

    .bbf-back-button__label {
        display: none;
    }
}
