/* Mobile Search Fixes for iOS Safari */

/* Prevent iOS zoom on input focus */
@media (max-width: 768px) {
    input[type="text"],
    input[type="search"] {
        font-size: 16px !important; /* Prevents iOS zoom */
    }
}

/* Better touch targets for category buttons */
.touch-manipulation {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* Fix for iOS Safari button states */
.category-toggle {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Ensure proper button styling on iOS */
.category-toggle[aria-pressed="true"] {
    background-color: #2563eb !important; /* Blue primary color */
    color: white !important;
}

.category-toggle[aria-pressed="false"] {
    background-color: #e5e7eb !important;
    color: #374151 !important;
}

/* Smooth scrolling for dropdown on iOS */
.overflow-y-auto {
    -webkit-overflow-scrolling: touch;
}

/* Remove this problematic rule that was breaking iOS Safari */

/* Better touch feedback */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .category-toggle:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
    
    a:active,
    button:active {
        opacity: 0.8;
    }
}

/* Fix for iOS Safari form submission */
form {
    -webkit-appearance: none;
}

/* Ensure search input is properly styled on iOS */
input[name="search"] {
    -webkit-appearance: none;
    -webkit-border-radius: 8px;
    border-radius: 8px;
}

/* Prevent double-tap zoom on buttons */
button {
    touch-action: manipulation;
}

/* Fix for iOS Safari clickability issues */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Ensure all interactive elements are clickable on iOS */
a, button, input, select, textarea, [role="button"] {
    cursor: pointer;
    -webkit-touch-callout: default;
}