/**
 * LASA Search Frontend Styles
 * 
 * Responsive, mobile-first styling for search interface
 */

/* Search Overlay Styles */
.lasa-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    animation: fadeIn 0.3s ease;
}

.lasa-search-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
}

.lasa-search-overlay-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 95vw;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@media (min-width: 1200px) {
    .lasa-search-overlay-content {
        max-width: 90vw;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.lasa-search-overlay-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lasa-search-overlay-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 16px;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    min-width: 52px;
}

.lasa-search-overlay-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Header search input group in overlay */
.lasa-search-input-group.overlay-header {
    flex: 1;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    max-width: none;
    margin-bottom: 0px !important;
}

.lasa-search-input-group.overlay-header .lasa-search-input {
    font-size: 16px;
    padding: 16px 20px;
    margin-bottom: 0px !important;
    height: auto;
}

.lasa-search-input-group.overlay-header .lasa-search-location-btn {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    min-width: 52px;
}

/* Header filter toggle button */
.lasa-search-toggle-filters-header {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    min-width: 52px;
}

.lasa-search-toggle-filters-header:hover {
    background: #e8f5e8;
    border-color: #2E7D32;
    color: #2E7D32;
}

.lasa-search-toggle-filters-header .dashicons {
    font-size: 20px;
    width: 16px;
    height: 16px;
    margin: auto;
}

.lasa-search-overlay-body {
    padding: 24px;
}

@media (min-width: 768px) {
    .lasa-search-overlay-body {
        padding: 32px;
    }
}

@media (min-width: 1200px) {
    .lasa-search-overlay-body {
        padding: 40px;
    }
}

/* Search Button Styles */
.lasa-search-button-container {
    display: flex;
    justify-content: center;
}

.lasa-search-open-btn {
    display: flex;
    align-items: center;
    gap: 5px;
	background: none;
	border: none;
    color: #404040;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
	text-transform: uppercase;
	font-weight: bold;
}

.lasa-search-open-btn:hover {
	color: #000000;
}

.lasa-search-open-btn:active {
    transform: translateY(0);
}

.lasa-search-open-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Search Form Styles */
.lasa-search-form {
    margin: 20px 0;
    max-width: 100%;
}

.lasa-search-form.overlay-mode {
    margin: 0;
}

/* Popular Searches Section */
.lasa-search-popular {
    margin: 32px 0;
    padding: 0;
}

.lasa-search-popular h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.lasa-search-popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

@media (min-width: 768px) {
    .lasa-search-popular-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1200px) {
    .lasa-search-popular-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
    }
}

.lasa-search-popular-item {
    background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.lasa-search-popular-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.3);
    background: linear-gradient(135deg, #1B5E20 0%, #388E3C 100%);
}

.lasa-search-popular-item:active {
    transform: translateY(0);
}

.lasa-search-popular-item .dashicons {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.lasa-search-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.lasa-search-empty-state h3 {
    color: #333;
    margin-bottom: 16px;
    font-size: 24px;
}

.lasa-search-input-group {
    display: flex;
    position: relative;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lasa-search-form.overlay-mode .lasa-search-input-group {
    border-radius: 16px;
    border: 3px solid #e0e0e0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.lasa-search-input-group:focus-within {
    border-color: #2E7D32;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.lasa-search-form.overlay-mode .lasa-search-input-group:focus-within {
    border-color: #2E7D32;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.25);
}

.lasa-search-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 1.4;
    background: transparent;
}

.lasa-search-form.overlay-mode .lasa-search-input {
    font-size: 16px;
    padding: 16px 20px;
}

.lasa-search-input::placeholder {
    color: #757575;
}

.lasa-search-location-btn {
    padding: 16px;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-left: 1px solid #e0e0e0;
}

.lasa-search-location-btn:hover {
    background: #e8f5e8;
    color: #2E7D32;
}

.lasa-search-location-btn.active {
    background: #2E7D32;
    color: white;
}

.lasa-search-submit {
    padding: 16px 24px;
    border: none;
    background: #2E7D32;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 100px;
}

.lasa-search-submit:hover {
    background: #1B5E20;
}

.lasa-search-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Compact Filters - Always Visible */
.lasa-search-filters-compact {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lasa-search-filters-compact .lasa-search-type-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.lasa-search-filters-compact .lasa-search-type-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    color: #666;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}

.lasa-search-filters-compact .lasa-search-type-btn:hover {
    border-color: #2E7D32;
    color: #2E7D32;
    background: #f0f8f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}

.lasa-search-filters-compact .lasa-search-type-btn.active {
    background: #2E7D32;
    color: white;
    border-color: #2E7D32;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.lasa-search-filters-compact .lasa-search-type-btn.active:hover {
    background: #1B5E20;
    border-color: #1B5E20;
}

/* Responsive adjustments for compact filters */
@media (max-width: 640px) {
    .lasa-search-filters-compact .lasa-search-type-btn {
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
    }
}

/* Old Filters (keeping for backward compatibility if needed) */
.lasa-search-filters {
    margin-top: 16px;
    padding: 16px 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    animation: slideDown 0.3s ease;
}

/* New filter bar layout */
.lasa-search-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .lasa-search-filter-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }
}

.lasa-search-content-types {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lasa-search-filter-label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    font-size: 14px;
}

.lasa-search-type-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.lasa-search-type-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.lasa-search-type-btn:hover {
    border-color: #2E7D32;
    color: #2E7D32;
    background: #f8fff8;
}

.lasa-search-type-btn.active {
    background: #2E7D32;
    color: white;
    border-color: #2E7D32;
    position: relative;
}

/* Visual indicator for active multi-selections */
.lasa-search-type-btn.active:not([data-type="all"])::after {
    content: "✓";
    font-size: 10px;
    position: absolute;
    top: -2px;
    right: -2px;
    background: white;
    color: #2E7D32;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.lasa-search-location-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lasa-search-location-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lasa-search-location-inputs input[type="text"] {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 150px;
    font-size: 14px;
}

.lasa-search-location-inputs select {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lasa-search-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.lasa-search-filter-row:last-child {
    margin-bottom: 0;
}

.lasa-search-filter-row label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.lasa-search-filter-row select,
.lasa-search-filter-row input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.lasa-search-toggle-filters {
    margin-top: 12px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.lasa-search-toggle-filters:hover {
    background: #f5f5f5;
    border-color: #2E7D32;
}

/* Live Search Indicator */
.lasa-search-live-indicator {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    color: #2E7D32;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lasa-search-live-indicator.active {
    opacity: 1;
}

.lasa-search-live-indicator .spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2E7D32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 6px;
}

/* Results Container */
.lasa-search-results-container {
    margin: 30px 0;
}

.lasa-search-results-container.overlay-mode {
    margin: 20px 0 0;
}

@media (min-width: 768px) {
    .lasa-search-results-container.overlay-mode {
        margin: 24px 0 0;
    }
}

@media (min-width: 1200px) {
    .lasa-search-results-container.overlay-mode {
        margin: 32px 0 0;
    }
}

.lasa-search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

@media (min-width: 768px) {
    .lasa-search-results-header {
        margin-bottom: 28px;
        padding-bottom: 24px;
    }
}

@media (min-width: 1200px) {
    .lasa-search-results-header {
        margin-bottom: 32px;
        padding-bottom: 28px;
    }
}

.lasa-search-results-info {
    font-size: 16px;
    color: #666;
}

.lasa-search-results-info strong {
    color: #333;
    font-weight: 600;
}

.lasa-search-sort-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lasa-search-sort-controls label {
    font-weight: 600;
    color: #333;
}

.lasa-search-sort-controls select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Search Results */
.lasa-search-results {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

/* Desktop card layout */
@media (min-width: 768px) {
    .lasa-search-results {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .lasa-search-results {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 24px;
    }
}

@media (min-width: 1400px) {
    .lasa-search-results {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 28px;
    }
}

@media (min-width: 1800px) {
    .lasa-search-results {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 32px;
    }
}

.lasa-search-result {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.lasa-search-result:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #2E7D32;
    transform: translateY(-3px);
}

@media (min-width: 768px) {
    .lasa-search-result {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .lasa-search-result:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        transform: translateY(-4px);
    }
}

.lasa-search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.lasa-search-result-title {
    margin: 0;
    flex: 1;
}

.lasa-search-result-title a {
    color: #1976D2;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.lasa-search-result-title a:hover {
    color: #0D47A1;
    text-decoration: underline;
}

.lasa-search-result-type {
    background: #e3f2fd;
    color: #1976D2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 16px;
    white-space: nowrap;
}

/* Content type specific colors */
.lasa-search-result[data-type="member_groups"] .lasa-search-result-type {
    background: #e8f5e8;
    color: #2E7D32;
}

.lasa-search-result[data-type="events"] .lasa-search-result-type {
    background: #e3f2fd;
    color: #1976D2;
}

.lasa-search-result[data-type="lasa_people"] .lasa-search-result-type {
    background: #f3e5f5;
    color: #7B1FA2;
}

.lasa-search-result[data-type="documents"] .lasa-search-result-type {
    background: #fff3e0;
    color: #F57C00;
}

.lasa-search-result[data-type="publications"] .lasa-search-result-type {
    background: #fff3e0;
    color: #F57C00;
}

.lasa-search-result[data-type="articles"] .lasa-search-result-type {
    background: #e8f5e9;
    color: #4CAF50;
}

.lasa-search-result[data-type="post"] .lasa-search-result-type {
    background: #e8f5e9;
    color: #4CAF50;
}

.lasa-search-result[data-type="page"] .lasa-search-result-type {
    background: #e0f2f1;
    color: #00BCD4;
}

.lasa-search-result-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lasa-search-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    margin-top: auto;
}

.lasa-search-result-location,
.lasa-search-result-contact,
.lasa-search-members,
.lasa-search-event-dates,
.lasa-search-file-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
}

.lasa-search-result-location .dashicons,
.lasa-search-result-contact .dashicons,
.lasa-search-members .dashicons,
.lasa-search-event-dates .dashicons,
.lasa-search-file-info .dashicons {
    color: #2E7D32;
    font-size: 16px;
}

.lasa-search-distance {
    color: #999;
    font-style: italic;
}

.lasa-search-contact-address {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    margin-bottom: 8px;
}

.lasa-search-contact-email {
    text-decoration: none;
    color: #1976D2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lasa-search-contact-email:hover {
    text-decoration: underline;
}

.lasa-search-org-type {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

/* Loading States */
.lasa-search-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.lasa-search-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2E7D32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
.lasa-search-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.lasa-search-no-results h3 {
    color: #333;
    margin-bottom: 16px;
}

.lasa-search-suggestions {
    margin-top: 20px;
}

.lasa-search-suggestions h4 {
    color: #333;
    margin-bottom: 12px;
}

.lasa-search-suggestions ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.lasa-search-suggestions li {
    background: #f5f5f5;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lasa-search-suggestions li:hover {
    background: #2E7D32;
    color: white;
    border-color: #2E7D32;
}

/* Pagination */
.lasa-search-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.lasa-search-pagination a,
.lasa-search-pagination span {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.lasa-search-pagination a:hover {
    background: #2E7D32;
    color: white;
    border-color: #2E7D32;
}

.lasa-search-pagination .current {
    background: #2E7D32;
    color: white;
    border-color: #2E7D32;
}

/* Autocomplete */
.lasa-search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.lasa-search-autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.lasa-search-autocomplete-item:hover,
.lasa-search-autocomplete-item.active {
    background: #f5f5f5;
}

.lasa-search-autocomplete-item:last-child {
    border-bottom: none;
}

.lasa-search-autocomplete-type {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .lasa-search-overlay {
        padding: 20px 10px;
    }
    
    .lasa-search-overlay-content {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .lasa-search-overlay-header {
        padding: 16px;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .lasa-search-input-group.overlay-header {
        order: 1;
    }
    
    .lasa-search-toggle-filters-header {
        order: 2;
        align-self: flex-start;
    }
    
    .lasa-search-overlay-close {
        order: 3;
        align-self: flex-end;
        position: absolute;
        top: 16px;
        right: 16px;
    }
    
    .lasa-search-overlay-body {
        padding: 20px;
    }
    
    .lasa-search-input-group {
        flex-direction: column;
    }
    
    .lasa-search-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .lasa-search-location-btn,
    .lasa-search-submit {
        padding: 14px 20px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }
    
    .lasa-search-live-indicator {
        right: 20px;
        font-size: 11px;
    }
    
    .lasa-search-result {
        padding: 20px;
    }
    
    .lasa-search-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .lasa-search-result-type {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .lasa-search-filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .lasa-search-filter-row label {
        min-width: auto;
    }
    
    .lasa-search-filter-row select,
    .lasa-search-filter-row input[type="text"] {
        width: 100%;
        min-width: auto;
    }
    
    .lasa-search-content-types,
    .lasa-search-location-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .lasa-search-type-buttons {
        justify-content: flex-start;
    }
    
    .lasa-search-location-inputs {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .lasa-search-location-inputs input[type="text"],
    .lasa-search-location-inputs select {
        width: 100%;
        min-width: auto;
    }
    
    .lasa-search-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .lasa-search-result-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .lasa-search-overlay {
        padding: 10px 5px;
    }
    
    .lasa-search-overlay-content {
        border-radius: 8px;
        max-height: 98vh;
    }
    
    .lasa-search-overlay-header {
        padding: 12px;
    }
    
    .lasa-search-overlay-close {
        top: 12px;
        right: 12px;
        font-size: 20px;
        padding: 6px;
    }
    
    .lasa-search-input-group.overlay-header .lasa-search-input {
        font-size: 16px;
        padding: 12px 16px;
    }
    
    .lasa-search-toggle-filters-header {
        padding: 12px;
    }
    
    .lasa-search-overlay-body {
        padding: 16px;
    }
    
    .lasa-search-form {
        margin: 16px 0;
    }
    
    .lasa-search-input {
        font-size: 16px;
        padding: 12px 40px 12px 16px;
    }
    
    .lasa-search-live-indicator {
        right: 16px;
        font-size: 10px;
    }
    
    .lasa-search-result {
        padding: 16px;
        margin: 16px 0;
    }
    
    .lasa-search-result-title a {
        font-size: 18px;
    }
    
    .lasa-search-pagination a,
    .lasa-search-pagination span {
        padding: 8px 12px;
        min-width: 40px;
    }
    
    /* Touch-friendly improvements */
    .lasa-search-submit,
    .lasa-search-location-btn,
    .lasa-search-toggle-filters,
    .lasa-search-open-btn {
        min-height: 24px;
        min-width: 24px;
    }
    
    .lasa-search-open-btn {
        font-size: 0.85rem;
    }
    
    .lasa-search-autocomplete-item {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .lasa-search-result:hover {
        transform: none; /* Disable hover transform on touch devices */
    }
}

/* Print Styles */
@media print {
    .lasa-search-form,
    .lasa-search-pagination,
    .lasa-search-location-btn {
        display: none;
    }
    
    .lasa-search-result {
        border: 1px solid #000;
        margin-bottom: 20px;
        break-inside: avoid;
    }
    
    .lasa-search-result-title a {
        color: #000;
        text-decoration: none;
    }
    
    .lasa-search-result-title a:after {
        content: " (" attr(href) ")";
        font-size: 12px;
        color: #666;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .lasa-search-input-group {
        border: 3px solid #000;
    }
    
    .lasa-search-result {
        border: 2px solid #000;
    }
    
    .lasa-search-result-title a {
        color: #0000EE;
    }
    
    .lasa-search-submit {
        background: #000;
        border: 2px solid #000;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .lasa-search-result:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .lasa-search-submit:hover,
    .lasa-search-location-btn:hover,
    .lasa-search-toggle-filters:hover,
    .lasa-search-open-btn:hover {
        background-color: initial;
    }
    
    .lasa-search-submit:active,
    .lasa-search-location-btn:active,
    .lasa-search-toggle-filters:active,
    .lasa-search-open-btn:active {
        transform: scale(0.98);
    }
    
    /* Increase touch targets */
    .lasa-search-autocomplete-item,
    .lasa-search-pagination a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .lasa-search-result,
    .lasa-search-input-group,
    .lasa-search-submit,
    .lasa-search-location-btn,
    .lasa-search-toggle-filters,
    .lasa-search-autocomplete-item,
    .lasa-search-overlay,
    .lasa-search-overlay-content {
        transition: none;
        animation: none;
    }
    
    .lasa-search-filters {
        animation: none;
    }
    
    .spinner {
        animation: none;
    }
    
    .lasa-search-result:hover {
        transform: none;
    }
    
    .lasa-search-overlay.active {
        animation: none;
    }
}