.mfsb-floating-bar {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: var(--mfsb-gap, 8px);
    padding: var(--mfsb-pad-top, 0) var(--mfsb-pad-right, 0) var(--mfsb-pad-bottom, 0) var(--mfsb-pad-left, 0);
    box-sizing: border-box;
    pointer-events: none;
}

.mfsb-floating-bar * {
    box-sizing: border-box;
}

.mfsb-floating-bar.mfsb-right {
    right: var(--mfsb-offset-right, 0);
    left: auto;
    align-items: flex-end;
}

.mfsb-floating-bar.mfsb-left {
    left: var(--mfsb-offset-left, 0);
    right: auto;
    align-items: flex-start;
}

.mfsb-floating-bar.mfsb-v-center {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

.mfsb-floating-bar.mfsb-v-top {
    top: var(--mfsb-offset-top, 0);
    bottom: auto;
    transform: none;
}

.mfsb-floating-bar.mfsb-v-bottom {
    bottom: var(--mfsb-offset-bottom, 0);
    top: auto;
    transform: none;
}

.mfsb-item {
    position: relative;
    display: flex;
    align-items: center;
    width: var(--mfsb-size, 48px);
    height: var(--mfsb-size, 48px);
    background: var(--mfsb-bg, #1f2937);
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    text-decoration: none !important;
    transition: width 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    line-height: 1;
}

.mfsb-floating-bar.mfsb-right .mfsb-item {
    justify-content: flex-end;
    border-radius: 10px 0 0 10px;
}

.mfsb-floating-bar.mfsb-left .mfsb-item {
    justify-content: flex-start;
    border-radius: 0 10px 10px 0;
}

.mfsb-item:hover,
.mfsb-item:focus {
    width: var(--mfsb-expanded, 150px);
    background: var(--mfsb-hover-color, #111827);
    color: #ffffff;
    outline: none;
}

.mfsb-label {
    position: absolute;
    opacity: 0;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    transition: opacity 0.2s ease 0.08s;
}

.mfsb-floating-bar.mfsb-right .mfsb-label {
    left: 16px;
    right: auto;
}

.mfsb-floating-bar.mfsb-left .mfsb-label {
    left: calc(var(--mfsb-size, 48px) + 10px);
    right: auto;
}

.mfsb-item:hover .mfsb-label,
.mfsb-item:focus .mfsb-label {
    opacity: 1;
}

.mfsb-icon-wrap {
    position: absolute;
    width: var(--mfsb-size, 48px);
    min-width: var(--mfsb-size, 48px);
    height: var(--mfsb-size, 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mfsb-floating-bar.mfsb-right .mfsb-icon-wrap {
    right: 0;
    left: auto;
}

.mfsb-floating-bar.mfsb-left .mfsb-icon-wrap {
    left: 0;
    right: auto;
}

.mfsb-icon-wrap svg {
    width: calc(var(--mfsb-size, 48px) * 0.5);
    height: calc(var(--mfsb-size, 48px) * 0.5);
    display: block;
    fill: currentColor;
    stroke: currentColor;
}

@media (max-width: 767px) {
    .mfsb-item {
        width: min(var(--mfsb-size, 48px), 44px);
        height: min(var(--mfsb-size, 48px), 44px);
    }

    .mfsb-icon-wrap {
        width: min(var(--mfsb-size, 48px), 44px);
        min-width: min(var(--mfsb-size, 48px), 44px);
        height: min(var(--mfsb-size, 48px), 44px);
    }

    .mfsb-item:hover,
    .mfsb-item:focus {
        width: min(var(--mfsb-expanded, 150px), 140px);
    }
}
