/**
 * Responsive Overrides for Tablets and Desktops
 * Mobile-first approach - these styles enhance the mobile base
 */

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
    .app-title {
        font-size: 2.5rem;
    }

    .app-subtitle {
        font-size: 1.2rem;
    }

    .container {
        padding: var(--spacing-xl) var(--spacing-lg);
    }

    /* Filters in horizontal layout */
    .filters {
        padding: var(--spacing-xl);
    }

    .filter-group {
        margin-bottom: var(--spacing-lg);
    }

    /* Results Grid - 2 columns */
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    /* Restaurant Card Image */
    .restaurant-image {
        height: 220px;
    }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
    .app-title {
        font-size: 3rem;
    }

    .container {
        padding: var(--spacing-xl);
    }

    /* Filters in Grid Layout */
    .filters {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: var(--spacing-lg);
        align-items: end;
    }

    .filter-group {
        margin-bottom: 0;
    }

    .filter-group:last-of-type {
        grid-column: 1 / -1;
    }

    #search-btn {
        grid-column: 1 / -1;
        max-width: 300px;
        margin: 0 auto;
        margin-top: var(--spacing-md);
    }

    /* Results Grid - 3 columns */
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }

    /* Restaurant Card */
    .restaurant-image {
        height: 240px;
    }

    .restaurant-info {
        padding: var(--spacing-lg);
    }

    .restaurant-name {
        font-size: 1.3rem;
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .container {
        max-width: 1400px;
    }

    /* Keep 3 columns but with more breathing room */
    .results-grid {
        gap: var(--spacing-xl);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Ensure all interactive elements are touch-friendly */
    .btn-primary,
    .btn-secondary,
    .filter-select,
    .sort-select {
        min-height: 48px;
    }

    .price-option {
        min-height: 48px;
        min-width: 70px;
    }

    /* Remove hover effects on touch devices */
    .restaurant-card:hover {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
    }
}

/* High Resolution Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays if needed */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .spinner {
        animation: none;
        border-top-color: var(--primary-color);
    }
}

/* Print Styles */
@media print {
    .header,
    .filters,
    .footer {
        display: none;
    }

    .restaurant-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
        margin-bottom: var(--spacing-md);
    }

    .results-grid {
        display: block;
    }
}
