.wbk_button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px !important;
    border-radius: colors.$wbk-button-border-radius !important;
    outline: none;
    cursor: pointer !important;
    border: none;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.5%;
    text-align: center;
    vertical-align: middle;
    transition: 0.3s all cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none !important;
    position: relative;

    &:active,
    &:focus {
        outline: none;
        box-shadow: none;
    }

    &:active {
        transform: scale(0.95);
    }

    &:hover:not(.disabled):not(:active) {
        transform: translateY(-4px) scale(1.03) perspective(400px) rotateX(4deg);
        box-shadow:
            0 8px 24px rgba(0, 0, 0, 0.18),
            0 1.5px 4px rgba(0, 0, 0, 0.1);
    }

    &--primary {
        background-color: colors.$wbk-bg-button-primary !important;
        color: colors.$wbk-color-button-primary !important;

        svg {
            path {
                fill: colors.$wbk-color-button-primary !important;
            }
        }

        &:hover:not(.disabled) {
            background-color: colors.$wbk-bg-button-primary-hover !important;
            color: colors.$wbk-color-button-primary-hover !important;

            svg {
                path {
                    fill: colors.$wbk-color-button-primary-hover !important;
                }
            }
        }
    }

    &--secondary {
        background-color: colors.$wbk-bg-button-secondary !important;
        color: colors.$wbk-color-button-secondary !important;

        svg {
            path {
                fill: colors.$wbk-color-button-secondary !important;
            }
        }

        &:hover {
            background-color: colors.$wbk-bg-button-secondary-hover !important;
            color: colors.$wbk-color-button-secondary-hover !important;

            svg {
                path {
                    fill: colors.$wbk-color-button-secondary-hover !important;
                }
            }
        }
    }

    &--generic {
        border: none !important;
        background-color: transparent !important;
        color: #668091 !important;
        box-shadow: none;
        outline: none;
        position: static;
        transition: none;

        &:hover:not(.disabled):not(:active) {
            transform: none;
            box-shadow: none;
            color: #668091 !important;
            background-color: transparent !important;
        }

        &:active:not(.disabled) {
            transform: none;
            box-shadow: none;
            color: #668091 !important;
            background-color: transparent !important;
        }
    }

    &--error {
        background-color: #dc2626 !important;
        color: #fff !important;

        &:hover {
            background-color: #b91c1c !important;
            color: #fff !important;
        }
    }

    &--disabled {
        background-color: colors.$wbk-bg-button-inactive !important;
        color: colors.$wbk-color-button-inactive !important;
        cursor: not-allowed;

        &:hover {
            background-color: colors.$wbk-bg-button-inactive !important;
            color: colors.$wbk-color-button-inactive !important;
            transform: none !important;
            box-shadow: none !important;
        }

        svg {
            path {
                fill: colors.$wbk-color-button-inactive !important;
            }
        }
    }

    &:hover {
        .wbk_button__tooltip {
            visibility: visible;
            z-index: 9999;
            opacity: 1;
        }
    }

    &__tooltip {
        background: #fff;
        color: #222;
        padding: 8px 14px;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        font-size: 14px;
        white-space: pre-line;
        pointer-events: none;
        transition: all 0.3s ease;
        text-align: center;
        min-width: 180px;
        max-width: 320px;
        position: absolute;
        z-index: -1;
        opacity: 0;
        visibility: hidden;
        bottom: calc(100% + 12px);
        right: 30%;
        margin-left: 12px;

        &::after {
            content: '';
            position: absolute;
            top: 100%;
            left: calc(100% - 16px);
            transform: translateX(-50%);
            border-width: 6px;
            border-style: solid;
            border-color: #fff transparent transparent transparent;
        }
    }

    &__loader {
        width: 20px;
        height: 20px;
        border: 3px solid #fff;
        border-top: 3px solid #668091;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin-right: 8px;
    }

    &__icon {
        line-height: 0;

        svg {
            width: 16px;
            height: 16px;
            path {
                transition: 0.3s all cubic-bezier(0.25, 0.8, 0.25, 1);
            }
        }
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
