/**
 * Search Suggestions Component Styles
 * Shared styles for the intelligent search dropdown used in bunkamap and bunkaweb
 */

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: none;
    border-radius: 0 0 24px 24px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1003;
    margin-top: 4px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

#search-results.show {
    display: block;
    animation: slideDown 0.2s var(--ease-out-expo);
}

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

.search-result-item {
    min-height: var(--touch-target-min); /* 48px minimum */
    padding: 14px var(--space-3);
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background: #f5f5f5;
}

.search-result-item:active {
    background: #ebebeb;
}

.search-result-item:last-child {
    border-bottom: none;
    border-radius: 0 0 24px 24px;
}

.result-type {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 12px;
    font-size: 18px;
    flex-shrink: 0;
}

.result-type.place {
    color: var(--place-color, #D95D39);
}

.result-type.connection {
    color: var(--connection-color, #008080);
}

.result-name {
    flex: 1;
    font-size: var(--text-base);
    font-family: var(--body-font);
    color: var(--text-color);
    font-weight: 500;
}

.result-meta {
    font-size: var(--text-sm);
    color: var(--text-color-secondary);
    margin-left: var(--space-2);
}

.search-no-results {
    padding: var(--space-4);
    text-align: center;
    color: var(--text-color-secondary);
    font-size: var(--text-base);
}

/* Mobile optimizations */
@media screen and (max-width: 480px) {
    #search-results {
        max-height: 60vh; /* More room for results on mobile */
        border-radius: 0 0 20px 20px;
    }
    
    .search-result-item {
        min-height: 56px; /* Slightly larger on mobile */
        padding: 16px var(--space-2);
    }
}
