/* Predictive Search Component Styles */
.predictive-search-container {
    position: relative;
}

.predictive-search-input {
    transition: all 0.3s ease;
    border: 2px solid transparent !important;
    background: #f8fafc !important;
}

.predictive-search-input:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

.predictive-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

.predictive-search-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.predictive-search-suggestion:last-child {
    border-bottom: none;
}

.predictive-search-suggestion:hover {
    background: #f8fafc;
    transform: translateX(2px);
}

.predictive-search-suggestion-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
}

.predictive-search-suggestion-address {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.3;
}

.predictive-search-suggestion-match {
    color: #3b82f6;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading state */
.predictive-search-loading {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.predictive-search-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* No results state */
.predictive-search-no-results {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    font-style: italic;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .predictive-search-suggestions {
        max-height: 250px;
        border-radius: 8px;
    }

    .predictive-search-suggestion {
        padding: 10px 12px;
    }

    .predictive-search-suggestion-name {
        font-size: 13px;
    }

    .predictive-search-suggestion-address {
        font-size: 11px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .predictive-search-input {
        background: #1f2937 !important;
        color: #f9fafb !important;
    }

    .predictive-search-input:focus {
        background: #111827 !important;
        border-color: #60a5fa !important;
    }

    .predictive-search-suggestions {
        background: #1f2937;
        border-color: #374151;
    }

    .predictive-search-suggestion:hover {
        background: #374151;
    }

    .predictive-search-suggestion-name {
        color: #f9fafb;
    }

    .predictive-search-suggestion-address {
        color: #9ca3af;
    }
}

/* Animation enhancements */
.predictive-search-suggestions {
    animation: slideDown 0.2s ease-out;
}

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

/* Focus ring for accessibility */
.predictive-search-input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .predictive-search-input {
        border-color: #000000 !important;
    }

    .predictive-search-suggestions {
        border-color: #000000;
    }

    .predictive-search-suggestion {
        border-bottom-color: #000000;
    }
}
