/* VR Store - Universal Button Enhancement System */
/* Modern VR-themed button design with consistent interactions */

/* Base Button Reset and Foundation */
.btn,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    /* Reset */
    margin: 0;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    
    /* Foundation */
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs, 0.5rem);
    
    /* Typography */
    font-size: var(--font-size-base, 1rem);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    
    /* Spacing */
    padding: var(--spacing-sm, 0.75rem) var(--spacing-lg, 1.5rem);
    min-height: 44px;
    min-width: 44px;
    
    /* Visual */
    border-radius: var(--radius-md, 0.5rem);
    box-sizing: border-box;
    overflow: hidden;
    
    /* Interaction */
    touch-action: manipulation;
    user-select: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0); /* Hardware acceleration */
}

/* Button Hover Shimmer Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.btn:hover::before {
    left: 100%;
}

/* Primary Button - Main CTA */
.btn-primary,
.btn.btn-primary {
    background: linear-gradient(135deg, 
        var(--primary-purple, #8B5CF6) 0%, 
        var(--neon-cyan, #00FFFF) 100%
    );
    color: var(--text-primary, #FFFFFF);
    border: 2px solid transparent;
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.3),
        0 0 20px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, 
        var(--neon-purple, #A855F7) 0%, 
        var(--neon-pink, #EC4899) 100%
    );
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(139, 92, 246, 0.4),
        0 0 30px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Secondary Button - Supporting Actions */
.btn-secondary,
.btn.btn-secondary {
    background: linear-gradient(135deg, 
        var(--dark-surface, #1A1A2E) 0%, 
        var(--dark-card, #16213E) 100%
    );
    color: var(--text-primary, #FFFFFF);
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, 
        var(--primary-purple, #8B5CF6) 0%, 
        var(--dark-card, #16213E) 100%
    );
    border-color: var(--neon-cyan, #00FFFF);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.3),
        0 0 20px rgba(0, 255, 255, 0.2);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Outline Button - Subtle Actions */
.btn-outline,
.btn-outline-primary,
.btn.btn-outline-primary {
    background: transparent;
    color: var(--primary-purple, #8B5CF6);
    border: 2px solid var(--primary-purple, #8B5CF6);
    box-shadow: inset 0 0 0 0 var(--primary-purple, #8B5CF6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover,
.btn-outline-primary:hover {
    background: linear-gradient(135deg, 
        var(--primary-purple, #8B5CF6) 0%, 
        var(--neon-cyan, #00FFFF) 100%
    );
    color: var(--text-primary, #FFFFFF);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.4),
        0 0 20px rgba(0, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.btn-outline:active,
.btn-outline-primary:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Success Button - Positive Actions */
.btn-success,
.btn.btn-success {
    background: linear-gradient(135deg, 
        var(--success-color, #10B981) 0%, 
        var(--neon-cyan, #00FFFF) 100%
    );
    color: var(--text-primary, #FFFFFF);
    border: 2px solid transparent;
    box-shadow: 
        0 4px 15px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.4),
        0 0 20px rgba(0, 255, 255, 0.2);
}

.btn-success:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Warning Button - Caution Actions */
.btn-warning,
.btn.btn-warning {
    background: linear-gradient(135deg, 
        var(--warning-color, #F59E0B) 0%, 
        var(--accent-pink, #EC4899) 100%
    );
    color: var(--text-primary, #FFFFFF);
    border: 2px solid transparent;
    box-shadow: 
        0 4px 15px rgba(245, 158, 11, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(245, 158, 11, 0.4),
        0 0 20px rgba(236, 72, 153, 0.2);
}

.btn-warning:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Danger Button - Destructive Actions */
.btn-danger,
.btn.btn-danger {
    background: linear-gradient(135deg, 
        var(--danger-color, #EF4444) 0%, 
        var(--accent-pink, #EC4899) 100%
    );
    color: var(--text-primary, #FFFFFF);
    border: 2px solid transparent;
    box-shadow: 
        0 4px 15px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(239, 68, 68, 0.4),
        0 0 20px rgba(236, 72, 153, 0.2);
}

.btn-danger:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Button - Minimal Actions */
.btn-light,
.btn.btn-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #A1A1AA);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary, #FFFFFF);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.btn-light:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Sizes */
.btn-sm {
    padding: var(--spacing-xs, 0.5rem) var(--spacing-md, 1rem);
    font-size: var(--font-size-sm, 0.875rem);
    min-height: 36px;
    min-width: 36px;
}

.btn-lg {
    padding: var(--spacing-md, 1rem) var(--spacing-xl, 2rem);
    font-size: var(--font-size-lg, 1.125rem);
    min-height: 52px;
    min-width: 52px;
}

.btn-xl {
    padding: var(--spacing-lg, 1.5rem) var(--spacing-xxl, 3rem);
    font-size: var(--font-size-xl, 1.25rem);
    min-height: 60px;
    min-width: 60px;
}

/* Button Shapes */
.btn-rounded {
    border-radius: 50px;
}

.btn-square {
    border-radius: var(--radius-sm, 0.25rem);
}

.btn-circle {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
}

/* Button States */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.btn:focus-visible {
    outline: 2px solid var(--neon-cyan, #00FFFF);
    outline-offset: 2px;
}

/* Loading State */
.btn.loading {
    color: transparent;
    pointer-events: none;
}

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

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

/* Button Groups */
.btn-group {
    display: flex;
    gap: var(--spacing-xs, 0.5rem);
}

.btn-group.vertical {
    flex-direction: column;
}

.btn-group .btn {
    flex: 1;
}

/* Icon Buttons */
.btn-icon {
    padding: var(--spacing-sm, 0.75rem);
    width: 44px;
    height: 44px;
}

.btn-icon.btn-sm {
    width: 36px;
    height: 36px;
    padding: var(--spacing-xs, 0.5rem);
}

.btn-icon.btn-lg {
    width: 52px;
    height: 52px;
    padding: var(--spacing-md, 1rem);
}

/* Floating Action Button */
.btn-fab {
    position: fixed;
    bottom: var(--spacing-lg, 1.5rem);
    right: var(--spacing-lg, 1.5rem);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    z-index: 1000;
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.4),
        0 0 20px rgba(139, 92, 246, 0.2);
}

.btn-fab:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 
        0 12px 40px rgba(139, 92, 246, 0.5),
        0 0 30px rgba(139, 92, 246, 0.3);
}

/* Modern Admin Button Styles */
.btn-modern {
    border-radius: var(--radius-lg, 0.75rem);
    font-weight: 500;
    letter-spacing: 0.025em;
    backdrop-filter: blur(10px);
}

/* Search Button */
.search-btn {
    background: linear-gradient(135deg, 
        var(--primary-purple, #8B5CF6) 0%, 
        var(--neon-cyan, #00FFFF) 100%
    );
    color: var(--text-primary, #FFFFFF);
    border: none;
    padding: var(--spacing-sm, 0.75rem) var(--spacing-md, 1rem);
    border-radius: 0 var(--radius-md, 0.5rem) var(--radius-md, 0.5rem) 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-btn:hover {
    background: linear-gradient(135deg, 
        var(--neon-purple, #A855F7) 0%, 
        var(--neon-pink, #EC4899) 100%
    );
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    background: var(--bg-card, rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md, 0.5rem);
    padding: var(--spacing-sm, 0.75rem);
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle:hover {
    background: var(--primary-purple, #8B5CF6);
    border-color: var(--neon-cyan, #00FFFF);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text-primary, #FFFFFF);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .btn {
        min-height: 48px;
        min-width: 48px;
        font-size: var(--font-size-base, 1rem);
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        box-shadow: inherit;
    }
    
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .btn::before {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
        border-style: solid;
    }
    
    .btn-primary {
        border-color: var(--text-primary, #FFFFFF);
    }
    
    .btn-secondary {
        border-color: var(--text-secondary, #A1A1AA);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .btn::before {
        transition: none;
        animation: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .btn {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .btn::before {
        display: none;
    }
}