/* Global scale variable */
.bm-button-wrapper {
    transform: scale(var(--bm-scale, 1));
    transform-origin: center center;
}

/* Base Button Styles */
.bm-button-wrapper {
    display: inline-block;
    position: relative;
}

.bm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    --bm-animation-speed: 0.3s;
    --bm-position-speed: 0.3s;
    transition: background 0.3s ease-in-out;
    background: transparent;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
}

.bm-button-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.bm-button-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Only add transitions for position animations */
.bm-button[class*="bm-position-"]:not(.bm-position-none) {
    transition: transform var(--bm-position-speed) ease-in-out;
}

/* Remove all transitions when no animations */
.bm-button.bm-position-none {
    transition: none !important;
}

/* Hermosa Button Style */
.bm-button-hermosa {
    display: inline-block;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    line-height: 1;
    opacity: 1 !important;
}

.bm-button-hermosa .bm-button-inner {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
}

/* Hover/Border background (supports gradient) */
.bm-button-hermosa .bm-button-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.53, 0.21, 0, 1);
    pointer-events: none;
    background: var(--e-global-color-primary);
}

/* Border and base styles */
.bm-button-hermosa .bm-button-inner {
    border: 2px solid var(--e-global-color-primary);
    transition: all 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

/* Hover state */
.bm-button-hermosa .bm-button-inner:hover::before {
    transform: translateX(0);
}

/* For gradient backgrounds, use a solid color for the border */
.bm-button-hermosa .bm-button-inner[style*="background-image"] {
    border-image: none !important;
}

.bm-button-hermosa .bm-button-inner[style*="background-image"]::before {
    background: var(--e-global-color-primary);
}

/* Editor specific styles */
.elementor-editor-active .bm-button-hermosa .bm-button-inner {
    pointer-events: auto;
}

/* Fix for gradient border */
[data-elementor-device-mode="desktop"] .bm-button-hermosa .bm-button-inner[style*="background-image"] {
    border-color: transparent !important;
}

/* End Hermosa Button Style */


.bm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    --bm-animation-speed: 0.3s;
    --bm-position-speed: 0.3s;
    transition: background 0.3s ease-in-out;
}

/* Only add transitions for position animations */
.bm-button[class*="bm-position-"]:not(.bm-position-none) {
    transition: transform var(--bm-position-speed) ease-in-out;
}

/* Remove all transitions when no animations */
.bm-animation-none.bm-position-none {
    transition: none !important;
}

.bm-animation-none.bm-position-none:hover {
    transition: none !important;
}

.bm-button-content-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Preset Styles */
/* Basic */
.bm-button-basic {
    padding: 12px 24px;
    border-radius: 4px;
}

/* Gradient */
.bm-button-gradient{padding:12px 24px;border-radius:4px;background:linear-gradient(135deg,#ff6a00,#ee0979);color:#fff;}
.bm-button-gradient-blue{padding:12px 24px;border-radius:4px;background:linear-gradient(135deg,#2193b0,#6dd5ed);color:#fff;}

.bm-button-gradient-green{padding:12px 24px;border-radius:4px;background:linear-gradient(135deg,#56ab2f,#a8e063);color:#fff;}

.bm-button-gradient-purple{padding:12px 24px;border-radius:4px;background:linear-gradient(135deg,#8e2de2,#4a00e0);color:#fff;}

.bm-button-gradient-red{padding:12px 24px;border-radius:4px;background:linear-gradient(135deg,#eb1d44,#ff7b89);color:#fff;}

.bm-button-shadow:hover{
    box-shadow:0 4px 12px rgba(0,0,0,.35);
    transform:translateY(-2px);
}

/* Neon */
.bm-button-neon{
    padding:12px 24px;
    background:#111;
    color:#0ff;
    text-shadow:0 0 6px rgba(0,255,255,.7);
}
.bm-button-neon:hover{
    box-shadow:0 0 8px #0ff,0 0 20px #0ff inset;
}

/* Glass */
.bm-button-glass{
    padding:12px 24px;
    background:rgba(255,255,255,.15);
    backdrop-filter:blur(6px);
    border:1px solid rgba(255,255,255,.4);
    color:#fff;
}
.bm-button-glass:hover{background:rgba(255,255,255,.25);}
.bm-button-basic {
    padding: 12px 24px;
    border-radius: 4px;
}

.bm-button-minimal {
    padding: 10px 20px;
    background: transparent !important;
    border: 2px solid;
}

.bm-button-modern {
    padding: 15px 30px;
    border-radius: 50px;
}

/* Fill Animations Base */
[class*="bm-animation-fill-"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--e-button-hover-background, #000);
    z-index: 0;
    transition: clip-path var(--bm-animation-speed) ease;
}

/* Fill Left */
.bm-animation-fill-left::before {
    clip-path: inset(0 100% 0 0);
}

.bm-animation-fill-left:hover::before {
    clip-path: inset(0 0 0 0);
}

/* Fill Right */
.bm-animation-fill-right::before {
    clip-path: inset(0 0 0 100%);
}

.bm-animation-fill-right:hover::before {
    clip-path: inset(0 0 0 0);
}

/* Fill Top */
.bm-animation-fill-top::before {
    clip-path: inset(100% 0 0 0);
}

.bm-animation-fill-top:hover::before {
    clip-path: inset(0 0 0 0);
}

/* Fill Bottom */
.bm-animation-fill-bottom::before {
    clip-path: inset(0 0 100% 0);
}

.bm-animation-fill-bottom:hover::before {
    clip-path: inset(0 0 0 0);
}

/* Fill Center */
.bm-animation-fill-center::before {
    clip-path: circle(0% at 50% 50%);
}

.bm-animation-fill-center:hover::before {
    clip-path: circle(150% at 50% 50%);
}

/* Fill Diagonal */
.bm-animation-fill-diagonal::before {
    clip-path: polygon(0 0, 0 0, 0 0);
}

.bm-animation-fill-diagonal:hover::before {
    clip-path: polygon(-50% -50%, 150% 0, 0 150%);
}

/* Fill Circular */
.bm-animation-fill-circular::before {
    clip-path: circle(0% at 50% 50%);
}

.bm-animation-fill-circular:hover::before {
    clip-path: circle(100% at 50% 50%);
}

/* Position Animations */
.bm-position-bounce:hover{animation:bm-bounce var(--bm-position-speed) ease-in-out}
@keyframes bm-bounce{0%,20%,50%,80%,100%{transform:translateY(0)}40%{transform:translateY(-10px)}60%{transform:translateY(-5px)}}

.bm-position-shake:hover{animation:bm-shake var(--bm-position-speed) linear infinite}
@keyframes bm-shake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-4px)}40%,80%{transform:translateX(4px)}}

.bm-position-flip:hover{transform:perspective(400px) rotateY(180deg)}

.bm-position-swing:hover{transform-origin:top;animation:bm-swing var(--bm-position-speed) ease-in-out}
@keyframes bm-swing{20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-5deg)}100%{transform:rotate(0deg)}}
.bm-position-scale:hover{transform:scale(var(--bm-scale-factor,1.1));}

.bm-position-shrink:hover{transform:scale(calc(1/var(--bm-scale-factor,1.1)));}

.bm-position-slide-right:hover{transform:translateX(var(--bm-slide-distance,10px))}
.bm-position-slide-left:hover{transform:translateX(calc(var(--bm-slide-distance,10px)*-1))}
.bm-position-slide-up:hover{transform:translateY(calc(var(--bm-slide-distance,10px)*-1))}
.bm-position-slide-down:hover{transform:translateY(var(--bm-slide-distance,10px))}

/* legacy */
.bm-position-slide:hover {
    transform: translateX(10px);
}

.bm-position-rotate:hover {
    transform: rotate(5deg);
}

.bm-position-skew:hover {
    transform: skew(-10deg);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.bm-position-pulse:hover {
    animation: pulse var(--bm-position-speed) infinite;
}

/* Headline gradient text support */
.bm-headline .bm-gradient{
    display:inline-block;
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.bm-headline .bm-break{
    display:block;
    width:100%;
    height:var(--bm-line-gap, 0);
}

/* Headline wrapper reset */
.bm-headline {
    margin: 0 !important;
    line-height: 1;
}

/* Remove default Elementor widget spacing for BM Headline wrapper */
.elementor-widget-bm_headline {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure BM Headline adapts to text size (no forced min-height) */
.elementor-widget-bm_headline,
.elementor-widget-bm_headline .elementor-widget-container,
.bm-headline {
    min-height: 0 !important;
}

/* Remove any residual spacing on the individual headline parts */
.bm-headline-part {
    margin: 0;
    padding: 0;
    line-height: inherit;
} 