/* Mobile-First Responsive Styles */
/* =============================== */

/* Mobile (default): 320px - 767px */
/* Tablet: 768px - 1023px */
/* Desktop: 1024px+ */

/* Base mobile styles already defined in main.css */

/* Tablet optimizations */
@media (min-width: 768px) {
    .container {
        padding: var(--space-lg);
    }

    .header {
        padding: var(--space-2xl) 0;
    }

    .step {
        padding: var(--space-2xl);
    }

    /* Two-column layout for restaurant cards */
    .restaurant-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    /* Share box */
    .share-box {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Poll status */
    .poll-status {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: var(--space-xl);
    }
}

/* Desktop optimizations */
@media (min-width: 1024px) {
    .header h1 {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    /* Side-by-side layout for map and list */
    .step-selection-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .map-container {
        height: 600px;
    }

    /* Restaurant cards in single column on desktop for voting page */
    .poll-page .restaurant-cards {
        grid-template-columns: 1fr;
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Touch-friendly tap targets */
@media (hover: none) {

    /* Mobile devices */
    button,
    .btn-primary,
    .btn-secondary,
    .restaurant-card.voting {
        min-height: 48px;
        /* WCAG AAA touch target size */
    }

    .autocomplete-item {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* Prevent iOS auto-zoom on input focus */
@supports (-webkit-touch-callout: none) {

    input[type="text"],
    input {
        font-size: 16px;
        /* Minimum 16px to prevent zoom */
    }
}

/* Print styles */
@media print {

    .header,
    .footer,
    .btn-primary,
    .btn-secondary,
    button {
        display: none !important;
    }

    .map-container {
        break-inside: avoid;
    }

    .restaurant-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Commented out for MVP, can be enabled later
    :root {
        --gray-50: #111827;
        --gray-100: #1f2937;
        --gray-900: #f9fafb;
    }
    */
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #0000ff;
        --success: #008000;
        --error: #ff0000;
        --warning: #ff8800;
    }

    .restaurant-card {
        border-width: 3px;
    }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
    .map-container {
        height: 300px;
    }

    .header {
        padding: var(--space-md) 0;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    :root {
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
        --text-xl: 1.125rem;
    }

    .container {
        padding: var(--space-sm);
    }

    .step {
        padding: var(--space-md);
    }

    .restaurant-number {
        width: 28px;
        height: 28px;
        font-size: var(--text-sm);
    }
}