/**
 * Frontend CSS for Woo Demo Manager
 * 
 * @package Woo_Demo_Manager
 * @author  Meraldo Banks <https://botusist.com.br>
 * @created 2026-02-04
 * @updated 2026-02-04
 */

/* Main container */
.wdm-demo-buttons-wrapper {
    margin: 20px 0;
    clear: both;
}

.wdm-demo-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

/* Base button styles */
.wdm-demo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.4;
    text-align: center;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.wdm-demo-button:hover {
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* External icon */
.wdm-external-icon {
    font-size: 12px;
    margin-left: 6px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.wdm-demo-button:hover .wdm-external-icon {
    opacity: 1;
}

/* Button styles */
.wdm-button-default {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    border-color: #0073aa;
}

.wdm-button-default:hover {
    background: linear-gradient(135deg, #005a87 0%, #00456b 100%);
    color: #fff;
}

.wdm-button-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: #fff;
    border-color: #28a745;
}

.wdm-button-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    color: #fff;
}

.wdm-button-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
    border-color: #ffc107;
}

.wdm-button-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    color: #333;
}

.wdm-button-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    border-color: #dc3545;
}

.wdm-button-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    color: #fff;
}

.wdm-button-dark {
    background: linear-gradient(135deg, #343a40 0%, #23272b 100%);
    color: #fff;
    border-color: #343a40;
}

.wdm-button-dark:hover {
    background: linear-gradient(135deg, #23272b 0%, #1d2124 100%);
    color: #fff;
}

/* Loading state */
.wdm-demo-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

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

@keyframes wdm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .wdm-demo-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .wdm-demo-button {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
        min-width: auto;
    }
}

@media screen and (max-width: 480px) {
    .wdm-demo-buttons-wrapper {
        margin: 15px 0;
    }
    
    .wdm-demo-button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .wdm-external-icon {
        font-size: 11px;
        margin-left: 4px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wdm-demo-button {
        border-width: 3px;
    }
    
    .wdm-demo-button:focus {
        outline-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wdm-demo-button {
        transition: none;
    }
    
    .wdm-demo-button:hover {
        transform: none;
    }
    
    .wdm-external-icon {
        transition: none;
    }
    
    .wdm-demo-button.loading::after {
        animation: none;
    }
}

/* Print styles */
@media print {
    .wdm-demo-buttons-wrapper {
        display: none;
    }
}

/* RTL support */
.rtl .wdm-demo-button {
    direction: rtl;
}

.rtl .wdm-external-icon {
    margin-left: 0;
    margin-right: 6px;
}

/* Theme compatibility fixes */

/* Astra theme */
.woocommerce .wdm-demo-buttons-wrapper {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Storefront theme */
.storefront .wdm-demo-button {
    border-radius: 3px;
}

/* Hello Elementor */
.elementor-theme .wdm-demo-buttons-wrapper {
    margin: 25px 0;
}

/* GeneratePress */
.generatepress .wdm-demo-button {
    font-weight: 500;
}

/* Divi */
.et-db #et-boc .wdm-demo-buttons-wrapper {
    margin: 30px 0;
}

/* OceanWP */
.oceanwp .wdm-demo-button {
    border-radius: 4px;
}

/* Avada */
.avada .wdm-demo-button {
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
