.safb-wrap {
    position: fixed;
    bottom: var(--safb-bottom, 24px);
    z-index: var(--safb-z, 99999);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(420px, calc(100vw - 24px));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.safb-wrap.safb-right {
    right: var(--safb-side, 24px);
}

.safb-wrap.safb-left {
    left: var(--safb-side, 24px);
}

.safb-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: auto;
    min-height: 64px;
    padding: 11px 16px 11px 12px;
    border-radius: 999px;
    color: var(--safb-text, #ffffff) !important;
    background: var(--safb-primary, #95BF47);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 45px rgba(31, 52, 23, 0.26), 0 3px 10px rgba(31, 52, 23, 0.18);
    text-decoration: none !important;
    line-height: 1.15;
    transform: translateY(0) scale(1);
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
    overflow: hidden;
    isolation: isolate;
}

.safb-button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.36), transparent 34%), linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.08));
    pointer-events: none;
}

.safb-button:hover,
.safb-button:focus-visible {
    color: var(--safb-text, #ffffff) !important;
    background: var(--safb-dark, #5E8E3E);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 24px 55px rgba(31, 52, 23, 0.34), 0 6px 16px rgba(31, 52, 23, 0.2);
    outline: none;
}

.safb-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(149, 191, 71, 0.32), 0 24px 55px rgba(31, 52, 23, 0.34);
}

.safb-logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    min-width: 92px;
    height: 40px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.safb-logo img {
    display: block;
    max-width: 100%;
    max-height: 28px;
    width: auto;
    height: auto;
}

.safb-logo-fallback {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    color: var(--safb-dark, #5E8E3E);
    font-weight: 800;
    font-size: 22px;
}

.safb-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.safb-micro {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    opacity: .88;
    white-space: nowrap;
}

.safb-label {
    display: block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.safb-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 20px;
    font-weight: 800;
    transition: transform 180ms ease;
}

.safb-button:hover .safb-arrow,
.safb-button:focus-visible .safb-arrow {
    transform: translateX(2px);
}

.safb-close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(17, 24, 39, 0.72);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
    cursor: pointer;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    transition: transform 160ms ease, background-color 160ms ease;
}

.safb-close:hover,
.safb-close:focus-visible {
    background: rgba(17, 24, 39, 0.94);
    transform: scale(1.08);
    outline: none;
}

.safb-hidden {
    display: none !important;
}

.safb-shortcode-wrap {
    position: static;
    max-width: none;
    display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
    .safb-button,
    .safb-arrow,
    .safb-close {
        transition: none;
    }
}

@media (max-width: 600px) {
    .safb-wrap {
        left: 12px !important;
        right: 12px !important;
        bottom: max(12px, env(safe-area-inset-bottom));
        max-width: calc(100vw - 24px);
    }

    .safb-button {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 58px;
        padding: 10px 12px 10px 10px;
        gap: 10px;
    }

    .safb-logo {
        width: 78px;
        min-width: 78px;
        height: 36px;
    }

    .safb-logo img {
        max-height: 24px;
    }

    .safb-micro {
        font-size: 10px;
    }

    .safb-label {
        font-size: 14px;
        white-space: normal;
    }

    .safb-arrow {
        width: 28px;
        height: 28px;
    }

    .safb-close {
        width: 28px;
        height: 28px;
        line-height: 28px;
    }
}
