/* Mobile Optimizations for Comparator Table */

@media (max-width: 768px) {
    /* Smaller font sizes for mobile */
    #compareTableHead th,
    #compareTableBody td {
        font-size: 0.75rem !important;
        padding: 0.5rem !important;
    }
    
    /* Reduce column widths */
    #compareTable {
        font-size: 0.75rem;
    }
    
    /* Make table scrollable horizontally */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Compact buttons */
    .view-details-btn {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
        white-space: nowrap;
    }
    
    /* Filter badges */
    .filter-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Responsive grid for filters */
    #filterSection {
        grid-template-columns: 1fr !important;
    }
    
    /* Compact select and input */
    select, input[type="text"], input[type="number"] {
        font-size: 0.85rem;
        padding: 0.6rem !important;
    }
}

@media (max-width: 640px) {
    /* Even smaller for very small screens */
    #compareTableHead th,
    #compareTableBody td {
        font-size: 0.65rem !important;
        padding: 0.4rem !important;
    }
    
    .view-details-btn {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.6rem !important;
    }
}

/* Filter badge styles */
.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #00F0FF;
}

.filter-badge button {
    margin-left: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.filter-badge button:hover {
    color: #fff;
}

/* Ensure table is scrollable */
.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Sticky header for table */
#compareTable thead th {
    position: sticky;
    top: 0;
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* Better spacing for explorer filters */
#explorerResultsCount {
    font-weight: 600;
    color: #00F0FF;
}

/* Neon Dot Indicators */
.neon-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s ease-in-out infinite;
}

.neon-dot.cyan {
    background: #00F0FF;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}

.neon-dot.green {
    background: #39FF14;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.8);
}

.neon-dot.pink {
    background: #FF006E;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.8);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Card Details Panel */
#cardDetails {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Touch improvements for mobile */
@media (max-width: 768px) {
    /* Larger touch targets */
    .nav-link,
    .mobile-nav-link,
    button {
        min-height: 44px;
        min-width: 44px;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 240, 255, 0.2);
    }
    
    /* Remove hover states on touch devices */
    .nav-link:active,
    .mobile-nav-link:active,
    button:active {
        background-color: rgba(255, 255, 255, 0.1) !important;
        transform: scale(0.98);
    }
    
    /* Ensure mobile menu is properly sized */
    #mobileMenu {
        width: 100%;
        z-index: 1000;
    }
    
    /* CTA button on mobile */
    #ctaExplorer {
        width: 100%;
        max-width: 320px;
    }
}

/* Prevent double-tap zoom on buttons */
button,
.nav-link,
.mobile-nav-link {
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* Active state feedback */
button:active,
.nav-link:active,
.mobile-nav-link:active {
    opacity: 0.8;
}
