/**
 * BVS Button - Remote.com Style Animated Button Component
 * Developed by Dominykas Vitkauskas (https://domvit.lt)
 * Plugin: BVS Elements
 * 
 * High Specificity & Theme-Override Protection
 */

/* ==================== HIGH SPECIFICITY RESET ==================== */
.elementor-widget-bvs-button .bvs-button-wrapper,
.bvs-button-wrapper,
.bvs-button-wrapper * {
    box-sizing: border-box !important;
    -webkit-font-smoothing: antialiased;
}

/* Button Wrapper / Container */
.elementor-widget-bvs-button .bvs-button-wrapper,
.bvs-button-wrapper {
    display: flex !important;
    width: 100% !important;
    position: relative !important;
}

.bvs-button-wrapper--left {
    justify-content: flex-start !important;
}

.bvs-button-wrapper--center {
    justify-content: center !important;
}

.bvs-button-wrapper--right {
    justify-content: flex-end !important;
}

.bvs-button-wrapper--justify {
    justify-content: stretch !important;
}

.bvs-button-wrapper--justify .bvs-button {
    width: 100% !important;
}

/* ==================== BUTTON BASE ==================== */
.elementor-widget-bvs-button a.bvs-button,
.elementor-widget-bvs-button button.bvs-button,
.bvs-button {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    isolation: isolate !important;
    overflow: clip !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    outline: none !important;
    border-style: solid;
    border-width: 0px;
    border-color: transparent;

    /* Default CSS Variables */
    --bvs-btn-bg: #467D6D;
    --bvs-btn-color: #ffffff;
    --bvs-btn-icon-color: #ffffff;
    --bvs-btn-hover-bg: #5f9c8a;
    --bvs-btn-hover-color: #ffffff;
    --bvs-btn-hover-icon-color: #ffffff;
    --bvs-btn-border-radius: 40px;
    --bvs-btn-transition-speed: 0.3s;
    --bvs-btn-icon-size: 16px;
    --bvs-btn-icon-gap: 10px;
    --bvs-btn-fill-dir-x: -100%;
    --bvs-btn-fill-dir-y: 0%;

    background-color: var(--bvs-btn-bg, #467D6D) !important;
    color: var(--bvs-btn-color, #ffffff) !important;
    border-radius: var(--bvs-btn-border-radius, 40px) !important;
    padding: 14px 28px !important;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    transition: color var(--bvs-btn-transition-speed, 0.3s) ease,
                background-color var(--bvs-btn-transition-speed, 0.3s) ease,
                border-color var(--bvs-btn-transition-speed, 0.3s) ease,
                box-shadow var(--bvs-btn-transition-speed, 0.3s) ease,
                transform 0.2s ease !important;
}

/* Background Slide Overlay Pseudo-element (:after) */
.elementor-widget-bvs-button a.bvs-button::after,
.elementor-widget-bvs-button button.bvs-button::after,
.bvs-button::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    background-color: var(--bvs-btn-hover-bg, #5f9c8a) !important;
    transform: translate(var(--bvs-btn-fill-dir-x, -100%), var(--bvs-btn-fill-dir-y, 0%)) !important;
    clip-path: inset(0px round var(--bvs-btn-border-radius, 40px)) !important;
    transition: transform var(--bvs-btn-transition-speed, 0.25s) cubic-bezier(0.4, 0, 1, 1),
                clip-path 0.15s cubic-bezier(0, 0, 0.2, 1) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Optional Inner Border Pseudo-element (:before) */
.elementor-widget-bvs-button a.bvs-button::before,
.elementor-widget-bvs-button button.bvs-button::before,
.bvs-button::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    clip-path: inset(0px round var(--bvs-btn-border-radius, 40px)) !important;
    transition: clip-path 0.15s cubic-bezier(0, 0, 0.2, 1) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Hover State - Slide Background In */
.elementor-widget-bvs-button a.bvs-button:hover:not(:disabled)::after,
.elementor-widget-bvs-button button.bvs-button:hover:not(:disabled)::after,
.bvs-button:hover:not(:disabled)::after {
    transform: translate(0, 0) !important;
    transition: transform var(--bvs-btn-transition-speed, 0.3s) cubic-bezier(0, 0, 0.2, 1),
                clip-path 0.15s cubic-bezier(0, 0, 0.2, 1) !important;
}

.elementor-widget-bvs-button a.bvs-button:hover,
.elementor-widget-bvs-button button.bvs-button:hover,
.bvs-button:hover {
    color: var(--bvs-btn-hover-color, #ffffff) !important;
    text-decoration: none !important;
}

/* Active / Pressed state */
.elementor-widget-bvs-button a.bvs-button:active,
.elementor-widget-bvs-button button.bvs-button:active,
.bvs-button:active {
    transform: scale(0.98) !important;
}

/* Focus state for keyboard accessibility */
.elementor-widget-bvs-button a.bvs-button:focus-visible,
.elementor-widget-bvs-button button.bvs-button:focus-visible,
.bvs-button:focus-visible {
    outline: 2px solid var(--bvs-btn-hover-bg, #5f9c8a) !important;
    outline-offset: 3px !important;
}

/* ==================== BUTTON CONTENT ==================== */
/* Text Container */
.elementor-widget-bvs-button .bvs-button__text,
.bvs-button .bvs-button__text {
    position: relative !important;
    z-index: 1 !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit !important;
    font-style: inherit !important;
    text-decoration: inherit !important;
    display: inline-block !important;
    transition: color var(--bvs-btn-transition-speed, 0.3s) ease !important;
}

/* Icon Container */
.elementor-widget-bvs-button .bvs-button__icon,
.bvs-button .bvs-button__icon {
    position: relative !important;
    z-index: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: var(--bvs-btn-icon-size, 16px) !important;
    width: var(--bvs-btn-icon-size, 16px) !important;
    height: var(--bvs-btn-icon-size, 16px) !important;
    color: var(--bvs-btn-icon-color, currentColor) !important;
    fill: var(--bvs-btn-icon-color, currentColor) !important;
    transition: color var(--bvs-btn-transition-speed, 0.3s) ease,
                fill var(--bvs-btn-transition-speed, 0.3s) ease,
                transform 0.25s ease !important;
    flex-shrink: 0 !important;
}

.bvs-button .bvs-button__icon svg {
    width: 100% !important;
    height: 100% !important;
    fill: currentColor !important;
}

.bvs-button .bvs-button__icon--left {
    margin-right: var(--bvs-btn-icon-gap, 10px) !important;
}

.bvs-button .bvs-button__icon--right {
    margin-left: var(--bvs-btn-icon-gap, 10px) !important;
}

/* Icon hover transitions */
.elementor-widget-bvs-button a.bvs-button:hover .bvs-button__icon,
.elementor-widget-bvs-button button.bvs-button:hover .bvs-button__icon,
.bvs-button:hover .bvs-button__icon {
    color: var(--bvs-btn-hover-icon-color, var(--bvs-btn-hover-color, currentColor)) !important;
    fill: var(--bvs-btn-hover-icon-color, var(--bvs-btn-hover-color, currentColor)) !important;
}

.elementor-widget-bvs-button a.bvs-button:hover .bvs-button__icon--right,
.elementor-widget-bvs-button button.bvs-button:hover .bvs-button__icon--right,
.bvs-button:hover .bvs-button__icon--right {
    transform: translateX(3px) !important;
}

.elementor-widget-bvs-button a.bvs-button:hover .bvs-button__icon--left,
.elementor-widget-bvs-button button.bvs-button:hover .bvs-button__icon--left,
.bvs-button:hover .bvs-button__icon--left {
    transform: translateX(-3px) !important;
}

/* ==================== SIZES ==================== */
.bvs-button--small {
    padding: 10px 20px !important;
    font-size: 0.875rem;
}

.bvs-button--medium {
    padding: 14px 28px !important;
    font-size: 1rem;
}

.bvs-button--large {
    padding: 18px 36px !important;
    font-size: 1.125rem;
}

.bvs-button--xlarge {
    padding: 22px 44px !important;
    font-size: 1.25rem;
}
