/**
 * Mobile Button Widget Styles
 * Custom CSS for the Mobile Button Elementor widget
 */

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

.mobile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.4;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.mobile-button:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.mobile-button:active {
    transform: translateY(1px);
}

/* Button Text */
.mobile-button-text {
    flex-grow: 0;
    flex-shrink: 0;
    display: inline-block;
}

/* Button Icons */
.mobile-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-grow: 0;
    flex-shrink: 0;
    line-height: 1;
}

.mobile-button-icon i,
.mobile-button-icon svg {
    width: 1em;
    height: 1em;
    transition: inherit;
}

/* Icon positioning styles are handled by Elementor controls */
.mobile-button-icon-left {
    order: 1;
}

.mobile-button-text {
    order: 2;
}

.mobile-button-icon-right {
    order: 3;
}

/* Responsive visibility - base styles */
.mobile-button-wrapper.mobile-only {
    display: block;
}

/* Common mobile breakpoints */
@media (min-width: 321px) {
    .mobile-button-wrapper[data-mobile-breakpoint="320"].mobile-only {
        display: none !important;
    }
}

@media (min-width: 481px) {
    .mobile-button-wrapper[data-mobile-breakpoint="480"].mobile-only {
        display: none !important;
    }
}

@media (min-width: 641px) {
    .mobile-button-wrapper[data-mobile-breakpoint="640"].mobile-only {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-button-wrapper[data-mobile-breakpoint="768"].mobile-only {
        display: none !important;
    }
}

@media (min-width: 961px) {
    .mobile-button-wrapper[data-mobile-breakpoint="960"].mobile-only {
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .mobile-button-wrapper[data-mobile-breakpoint="1024"].mobile-only {
        display: none !important;
    }
}

/* Button width variants */
.mobile-button[data-width="full"] {
    display: block;
    width: 100%;
}

.mobile-button[data-width="auto"] {
    display: inline-block;
    width: auto;
}

/* Hover effects enhancement */
.mobile-button:hover {
    text-decoration: none !important;
}

/* Animation support */
.mobile-button.elementor-animation-grow:hover {
    transform: scale(1.05);
}

.mobile-button.elementor-animation-shrink:hover {
    transform: scale(0.95);
}

.mobile-button.elementor-animation-pulse:hover {
    animation: elementor-animation-pulse 1s;
}

.mobile-button.elementor-animation-bounce-in:hover {
    animation: elementor-animation-bounce-in 0.75s;
}

.mobile-button.elementor-animation-bounce-out:hover {
    animation: elementor-animation-bounce-out 0.75s;
}

.mobile-button.elementor-animation-fade-in:hover {
    animation: elementor-animation-fade-in 0.75s;
}

.mobile-button.elementor-animation-fade-in-up:hover {
    animation: elementor-animation-fade-in-up 0.75s;
}

.mobile-button.elementor-animation-fade-in-down:hover {
    animation: elementor-animation-fade-in-down 0.75s;
}

.mobile-button.elementor-animation-fade-in-left:hover {
    animation: elementor-animation-fade-in-left 0.75s;
}

.mobile-button.elementor-animation-fade-in-right:hover {
    animation: elementor-animation-fade-in-right 0.75s;
}

.mobile-button.elementor-animation-slide-in-up:hover {
    animation: elementor-animation-slide-in-up 0.75s;
}

.mobile-button.elementor-animation-slide-in-down:hover {
    animation: elementor-animation-slide-in-down 0.75s;
}

.mobile-button.elementor-animation-slide-in-left:hover {
    animation: elementor-animation-slide-in-left 0.75s;
}

.mobile-button.elementor-animation-slide-in-right:hover {
    animation: elementor-animation-slide-in-right 0.75s;
}

/* Loading state (optional future enhancement) */
.mobile-button.loading {
    pointer-events: none;
    opacity: 0.6;
}

.mobile-button.loading .mobile-button-text {
    opacity: 0;
}

.mobile-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: mobile-button-spin 1s linear infinite;
}

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

/* Touch device enhancements */
@media (hover: none) and (pointer: coarse) {
    .mobile-button {
        min-height: 44px; /* Minimum touch target size */
        min-width: 44px;
    }

    .mobile-button:hover {
        transform: none;
    }

    .mobile-button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mobile-button,
    .mobile-button *,
    .mobile-button::before,
    .mobile-button::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .mobile-button-wrapper.mobile-only {
        display: none !important;
    }
}

/* RTL support */
[dir="rtl"] .mobile-button-icon-left {
    order: 3;
}

[dir="rtl"] .mobile-button-icon-right {
    order: 1;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-button:focus {
        outline-color: #fff;
    }
}
