/**
 * OTT Business Search Component Styles
 * 
 * Reusable styles for autocomplete dropdowns
 * Mobile-optimized with 56px tap targets
 */

/* Dropdown container */
.ott-business-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: -1px;
}

/* Business item */
.ott-business-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f7fafc;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ott-business-item:hover {
    background: #f7fafc;
}

.ott-business-item:last-child {
    border-bottom: none;
}

.ott-business-item:active {
    background: #edf2f7;
}

/* Business name */
.ott-business-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    line-height: 1.4;
}

/* Business location */
.ott-business-location {
    font-size: 0.875rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ott-business-location svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Message states */
.ott-dropdown-message,
.ott-dropdown-loading,
.ott-dropdown-error {
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.ott-dropdown-message p,
.ott-dropdown-loading p {
    margin: 0;
    color: #718096;
    font-size: 0.95rem;
}

.ott-dropdown-error p {
    margin: 0;
    color: #e53e3e;
    font-size: 0.95rem;
}

.ott-dropdown-loading {
    background: linear-gradient(90deg, #f7fafc 0%, #edf2f7 50%, #f7fafc 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Scrollbar styling */
.ott-business-dropdown::-webkit-scrollbar {
    width: 8px;
}

.ott-business-dropdown::-webkit-scrollbar-track {
    background: #f7fafc;
}

.ott-business-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.ott-business-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Input wrapper for positioning */
.ott-search-wrapper {
    position: relative;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .ott-business-dropdown {
        max-height: 280px;
        font-size: 1rem;
    }
    
    .ott-business-item {
        padding: 1.125rem 1rem;
        min-height: 60px;
    }
    
    .ott-business-name {
        font-size: 1rem;
    }
    
    .ott-business-location {
        font-size: 0.9rem;
    }
    
    .ott-dropdown-message,
    .ott-dropdown-loading,
    .ott-dropdown-error {
        padding: 1.5rem 1rem;
        font-size: 1rem;
    }
}

/* Focus/accessibility */
.ott-business-item:focus {
    outline: 2px solid #6b46c1;
    outline-offset: -2px;
    background: #f7fafc;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ott-business-dropdown {
        border: 3px solid #000;
    }
    
    .ott-business-item {
        border-bottom: 2px solid #000;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .ott-business-item,
    .ott-dropdown-loading {
        transition: none;
        animation: none;
    }
}
