/* Mobile DApp Button Optimizations */

/* Enhanced mobile DApp button visibility */
.mobile-dapp-btn {
    /* Ensure high contrast for mobile visibility */
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #000 !important;
    border: 2px solid #FFD700 !important;
    
    /* Minimum touch target size for accessibility */
    min-width: 44px !important;
    min-height: 44px !important;
    
    /* Enhanced visual feedback */
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4) !important;
    
    /* Better positioning */
    position: relative !important;
    z-index: 1000 !important;
    
    /* Smooth transitions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    
    /* Prevent text selection */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    
    /* Ensure button is always visible */
    opacity: 1 !important;
    visibility: visible !important;
}

/* Mobile DApp button text styling */
.mobile-dapp-btn .btn-dapp-text {
    color: #000 !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    
    /* Ensure text is always visible */
    -webkit-text-fill-color: #000 !important;
    text-shadow: none !important;
}

/* Mobile DApp button icon styling */
.mobile-dapp-btn .btn-dapp-icon {
    color: #000 !important;
    font-size: 0.9rem !important;
    margin-left: 8px !important;
    
    /* Ensure icon is always visible */
    -webkit-text-fill-color: #000 !important;
}

/* Enhanced hover effects for mobile */
.mobile-dapp-btn:hover,
.mobile-dapp-btn:focus {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6) !important;
    background: linear-gradient(135deg, #FFE44D, #FFB700) !important;
    border-color: #FFE44D !important;
}

/* Active state for touch feedback */
.mobile-dapp-btn:active {
    transform: translateY(1px) scale(0.98) !important;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4) !important;
    background: linear-gradient(135deg, #E6C200, #E69500) !important;
}

/* Focus state for accessibility */
.mobile-dapp-btn:focus {
    outline: 3px solid rgba(255, 215, 0, 0.5) !important;
    outline-offset: 2px !important;
}

/* Tablet-specific adjustments */
@media (min-width: 768px) and (max-width: 992px) {
    .mobile-dapp-btn {
        min-width: 120px !important;
        min-height: 48px !important;
        padding: 0 20px !important;
        font-size: 1rem !important;
    }
    
    .mobile-dapp-btn .btn-dapp-text {
        font-size: 1rem !important;
    }
    
    .mobile-dapp-btn .btn-dapp-icon {
        font-size: 1rem !important;
        margin-left: 10px !important;
    }
}

/* Small mobile screens */
@media (max-width: 576px) {
    .mobile-dapp-btn {
        width: auto !important;
        min-width: 100px !important;
        height: 44px !important;
        padding: 0 16px !important;
        border-radius: 22px !important;
        
        /* Enhanced visibility on small screens */
        background: linear-gradient(135deg, #FFD700, #FFA500) !important;
        border: 2px solid #FFD700 !important;
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5) !important;
    }
    
    .mobile-dapp-btn .btn-dapp-text {
        font-size: 0.85rem !important;
        font-weight: 800 !important;
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
    
    .mobile-dapp-btn .btn-dapp-icon {
        font-size: 0.85rem !important;
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
    
    /* Enhanced touch feedback for small screens */
    .mobile-dapp-btn:hover,
    .mobile-dapp-btn:focus {
        transform: translateY(-2px) scale(1.03) !important;
        box-shadow: 0 6px 25px rgba(255, 215, 0, 0.7) !important;
        background: linear-gradient(135deg, #FFE44D, #FFB700) !important;
    }
    
    .mobile-dapp-btn:active {
        transform: translateY(1px) scale(0.97) !important;
        box-shadow: 0 2px 15px rgba(255, 215, 0, 0.5) !important;
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
    .mobile-dapp-btn {
        min-width: 90px !important;
        height: 42px !important;
        padding: 0 14px !important;
    }
    
    .mobile-dapp-btn .btn-dapp-text {
        font-size: 0.8rem !important;
    }
    
    .mobile-dapp-btn .btn-dapp-icon {
        font-size: 0.8rem !important;
        margin-left: 6px !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-dapp-btn {
        background: #FFD700 !important;
        color: #000 !important;
        border: 3px solid #000 !important;
        box-shadow: none !important;
    }
    
    .mobile-dapp-btn .btn-dapp-text,
    .mobile-dapp-btn .btn-dapp-icon {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mobile-dapp-btn {
        transition: none !important;
    }
    
    .mobile-dapp-btn:hover,
    .mobile-dapp-btn:focus {
        transform: none !important;
    }
    
    .mobile-dapp-btn:active {
        transform: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-dapp-btn {
        background: linear-gradient(135deg, #FFD700, #FFA500) !important;
        border-color: #FFD700 !important;
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.6) !important;
    }
}

/* Mobile menu DApp button specific styles */
.mobile-menu .btn-dapp {
    /* Full width in mobile menu */
    width: calc(100% - 40px) !important;
    max-width: 300px !important;
    margin: 20px auto 0 !important;
    
    /* Enhanced visibility in menu */
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #000 !important;
    border: 2px solid #FFD700 !important;
    
    /* Better spacing */
    padding: 14px 20px !important;
    min-height: 48px !important;
    
    /* Center content */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    
    /* Enhanced visual feedback */
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4) !important;
    transition: all 0.3s ease !important;
}

.mobile-menu .btn-dapp:hover,
.mobile-menu .btn-dapp:focus {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6) !important;
    background: linear-gradient(135deg, #FFE44D, #FFB700) !important;
}

.mobile-menu .btn-dapp .btn-dapp-text {
    color: #000 !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    -webkit-text-fill-color: #000 !important;
}

.mobile-menu .btn-dapp .btn-dapp-icon {
    color: #000 !important;
    font-size: 1rem !important;
    -webkit-text-fill-color: #000 !important;
}

/* Ensure button is always above other elements */
.mobile-menu-buttons {
    position: relative !important;
    z-index: 1001 !important;
}

.mobile-menu-buttons .mobile-dapp-btn {
    position: relative !important;
    z-index: 1002 !important;
}

/* Loading state for DApp button */
.mobile-dapp-btn.loading {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

.mobile-dapp-btn.loading .btn-dapp-text::after {
    content: '...' !important;
    animation: loading-dots 1.5s infinite !important;
}

@keyframes loading-dots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Success state for DApp button */
.mobile-dapp-btn.success {
    background: linear-gradient(135deg, #48c78e, #3db87a) !important;
    border-color: #48c78e !important;
    box-shadow: 0 4px 20px rgba(72, 199, 142, 0.4) !important;
}

.mobile-dapp-btn.success .btn-dapp-text {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.mobile-dapp-btn.success .btn-dapp-icon {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* Error state for DApp button */
.mobile-dapp-btn.error {
    background: linear-gradient(135deg, #f14668, #e73c5e) !important;
    border-color: #f14668 !important;
    box-shadow: 0 4px 20px rgba(241, 70, 104, 0.4) !important;
}

.mobile-dapp-btn.error .btn-dapp-text {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.mobile-dapp-btn.error .btn-dapp-icon {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}