.via-fcb-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    display: inline-flex;
    align-items: center;
    height: 56px;
    max-width: 56px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--via-fcb-bg, #2fb344);
    color: var(--via-fcb-color, #ffffff);
    box-shadow: var(--via-fcb-shadow, 0 4px 18px rgba(0, 0, 0, 0.3));
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.35s ease, padding 0.35s ease, box-shadow 0.2s ease;
}

.via-fcb-button:hover,
.via-fcb-button:focus-visible {
    max-width: 320px;
}

.via-fcb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.via-fcb-icon svg {
    width: 100%;
    height: 100%;
}

.via-fcb-text {
    margin-left: 12px;
    font-size: 15px;
    font-weight: 600;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s ease 0.05s, transform 0.25s ease 0.05s;
}

.via-fcb-button:hover .via-fcb-text,
.via-fcb-button:focus-visible .via-fcb-text {
    opacity: 1;
    transform: translateX(0);
}

/* Viber mode: button toggles a menu with call / Viber options */
.via-fcb-wrap {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
}

.via-fcb-wrap .via-fcb-button {
    position: static;
    border: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

.via-fcb-wrap.is-open .via-fcb-button {
    max-width: 320px;
}

.via-fcb-wrap.is-open .via-fcb-text {
    opacity: 1;
    transform: translateX(0);
}

.via-fcb-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.via-fcb-menu[hidden] {
    display: none;
}

.via-fcb-wrap.is-open .via-fcb-menu {
    animation: via-fcb-menu-in 0.2s ease;
}

@keyframes via-fcb-menu-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.via-fcb-option {
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 20px 0 16px;
    border-radius: 999px;
    box-shadow: var(--via-fcb-shadow, 0 4px 18px rgba(0, 0, 0, 0.3));
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.via-fcb-option:hover,
.via-fcb-option:focus-visible {
    transform: translateY(-1px);
}

.via-fcb-option-text {
    margin-left: 10px;
}

.via-fcb-option--call,
.via-fcb-option--call:hover,
.via-fcb-option--call:focus-visible {
    background: var(--via-fcb-bg, #2fb344);
    color: var(--via-fcb-color, #ffffff);
}

.via-fcb-option--viber,
.via-fcb-option--viber:hover,
.via-fcb-option--viber:focus-visible {
    background: #7360f2;
    color: #ffffff;
}

.via-fcb-option--viber:hover,
.via-fcb-option--viber:focus-visible {
    background: #665cac;
}

@media (max-width: 600px) {
    .via-fcb-button,
    .via-fcb-wrap {
        right: 16px;
        bottom: 16px;
    }
}
