/**
 * MX Button Widget Styles
 */

.mx-button-wrapper {
    display: inline-block;
}

.mx-button-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

/* Explicitly keep the same color on hover unless overridden by Elementor settings */
.mx-button-link:hover {
    color: inherit;
}

.mx-button-text {
    position: relative;
}

/* Create underline effect only for the text on hover */
.mx-button-text::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.mx-button-link:hover .mx-button-text::after {
    width: 100%;
}

.mx-button-arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
    display: inline-block;
    transform: translateY(0); /* Ensure baseline alignment */
}

/* Move arrow to the right on hover */
.mx-button-link:hover .mx-button-arrow {
    transform: translateX(5px) translateY(0);
}
