/* MA Modern Button Widget Styles */
.ma-button-wrapper {
    display: inline-block;
    width: 100%;
}

.ma-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
    outline: none;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    white-space: nowrap;
}

.ma-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Button Sizes */
.ma-button-size-xs {
    padding: 8px 16px;
    font-size: 12px;
    line-height: 1.4;
}

.ma-button-size-sm {
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1.4;
}

.ma-button-size-md {
    padding: 12px 24px;
    font-size: 16px;
    line-height: 1.5;
}

.ma-button-size-lg {
    padding: 16px 32px;
    font-size: 18px;
    line-height: 1.5;
}

.ma-button-size-xl {
    padding: 20px 40px;
    font-size: 20px;
    line-height: 1.6;
}

/* Icon Positioning */
.ma-button-icon-top,
.ma-button-icon-bottom {
    display: block;
}

.ma-button-icon-top + .ma-button-text,
.ma-button-icon-bottom + .ma-button-text {
    display: block;
}

/* Style 1: Solid Fill */
.ma-button-style1 {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.ma-button-style1:hover {
    background: linear-gradient(135deg, #005a87, #004066);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

/* Style 2: Gradient Glow */
.ma-button-style2 {
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ff6b35);
    background-size: 200% 200%;
    color: #ffffff;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    animation: gradientShift 3s ease infinite;
}

.ma-button-style2:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Style 3: Outline Modern */
.ma-button-style3 {
    background: transparent;
    color: #007cba;
    border: 2px solid #007cba;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.ma-button-style3::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 124, 186, 0.1), transparent);
    transition: left 0.5s ease;
}

.ma-button-style3:hover::before {
    left: 100%;
}

.ma-button-style3:hover {
    background: #007cba;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

/* Style 4: Neon Effect */
.ma-button-style4 {
    background: #1a1a1a;
    color: #00ffff;
    border: 2px solid #00ffff;
    border-radius: 6px;
    text-shadow: 0 0 10px #00ffff;
    box-shadow: 
        0 0 10px #00ffff,
        inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.ma-button-style4:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 
        0 0 20px #00ffff,
        0 0 40px #00ffff,
        inset 0 0 20px rgba(0, 255, 255, 0.2);
    text-shadow: 0 0 20px #00ffff;
}

/* Style 5: 3D Raised */
.ma-button-style5 {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: #ffffff;
    border-radius: 15px;
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.3),
        -8px -8px 16px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ma-button-style5:hover {
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.3),
        -4px -4px 8px rgba(255, 255, 255, 0.1);
    transform: translate(2px, 2px);
}

.ma-button-style5:active {
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3),
        -2px -2px 4px rgba(255, 255, 255, 0.1);
    transform: translate(4px, 4px);
}

/* Style 6: Animated Slide */
.ma-button-style6 {
    background: #ffffff;
    color: #333333;
    border: 2px solid #333333;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.ma-button-style6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #333333;
    transition: width 0.3s ease;
    z-index: -1;
}

.ma-button-style6:hover::before {
    width: 100%;
}

.ma-button-style6:hover {
    color: #ffffff;
}

/* Glow Effect */
.ma-button-glow {
    animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from { box-shadow: 0 0 20px rgba(0, 124, 186, 0.5); }
    to { box-shadow: 0 0 30px rgba(0, 124, 186, 0.8); }
}

/* Ripple Effect */
.ma-button-ripple {
    position: relative;
    overflow: hidden;
}

.ma-button-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ma-button-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ma-button-size-xl {
        padding: 16px 32px;
        font-size: 18px;
    }
    
    .ma-button-size-lg {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .ma-button-size-md {
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .ma-button-size-xl {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .ma-button-size-lg {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .ma-button-size-md {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .ma-button-size-sm {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .ma-button-size-xs {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Performance Optimizations */
.ma-button {
    will-change: transform, box-shadow;
    backface-visibility: hidden;
}

.ma-button::before {
    will-change: transform, opacity;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .ma-button,
    .ma-button::before,
    .ma-button::after {
        animation: none !important;
        transition: none !important;
    }
    
    .ma-button:hover {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ma-button {
        border: 2px solid;
    }
    
    .ma-button-style4 {
        background: #000000;
        color: #ffffff;
        border-color: #ffffff;
    }
}

/* Print Styles */
@media print {
    .ma-button {
        background: none !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .ma-button::before,
    .ma-button::after {
        display: none !important;
    }
}