/**
 * Business Finder Widget Styles
 */

/* Helper text above input */
.bf-helper {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-size: 13px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #f0f4ff;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.bf-helper svg {
    flex-shrink: 0;
    color: #667eea;
}

/* Dropdown container */
.bf-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
}

/* Make parent form-group position relative */
.form-group {
    position: relative;
}

/* Individual business item */
.bf-item {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

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

.bf-item:hover {
    background: #f8fafc;
}

.bf-item:active {
    background: #f0f4ff;
}

.bf-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    font-size: 15px;
}

.bf-address {
    color: #718096;
    font-size: 13px;
    margin-bottom: 6px;
}

.bf-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4a5568;
}

.bf-stars {
    color: #f59e0b;
    font-size: 14px;
}

.bf-reviews {
    color: #a0aec0;
    font-size: 12px;
}

/* Loading state */
.bf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    color: #718096;
    font-size: 14px;
}

.bf-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: bf-spin 0.8s linear infinite;
}

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

/* Error state */
.bf-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    color: #c53030;
    font-size: 14px;
    background: #fed7d7;
    border-radius: 8px;
    margin: 8px;
}

.bf-error svg {
    flex-shrink: 0;
}

/* Message state */
.bf-message {
    padding: 15px;
    color: #718096;
    font-size: 14px;
    text-align: center;
}

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

.bf-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.bf-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .bf-dropdown {
        max-height: 300px;
    }
    
    .bf-item {
        padding: 12px;
    }
    
    .bf-name {
        font-size: 14px;
    }
    
    .bf-address {
        font-size: 12px;
    }
    
    .bf-helper {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Animation for dropdown appearance */
@keyframes bf-slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bf-dropdown[style*="display: block"] {
    animation: bf-slideDown 0.2s ease-out;
}
