/* Typesense Search Plugin Styles */
.typesense-search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.typesense-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.typesense-search-input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.typesense-search-input:focus {
    border-color: #007cba;
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.2);
}

.typesense-search-icon {
    position: absolute;
    right: 16px;
    color: #666;
    pointer-events: none;
}

.typesense-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff !important;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.typesense-search-results.show {
    display: block;
}

.typesense-search-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    background: #ffffff !important;
}

.typesense-search-item:hover {
    background-color: #f8f9fa !important;
}

.typesense-search-item:last-child {
    border-bottom: none;
}

.typesense-search-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

.typesense-search-no-image {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 20px;
}

.typesense-search-item-content {
    flex: 1;
    min-width: 0;
}

.typesense-search-item-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.typesense-search-item-description {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.typesense-search-item-price {
    font-weight: 600;
    color: #007cba;
    font-size: 14px;
    margin-left: 8px;
    flex-shrink: 0;
}

.typesense-search-loading {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.typesense-search-no-results {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.typesense-search-highlight {
    background-color: #fff3cd;
    font-weight: 600;
}

/* Responsive styles */
@media (max-width: 480px) {
    .typesense-search-container {
        max-width: 100%;
    }
    
    .typesense-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .typesense-search-item {
        padding: 10px 12px;
    }
    
    .typesense-search-item-image {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .typesense-search-item-title {
        font-size: 13px;
    }
    
    .typesense-search-item-description {
        font-size: 11px;
    }
    
    .typesense-search-item-price {
        font-size: 13px;
    }
}

div#brxe-967264 {
    z-index: 999;
}

/* Animation for results appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typesense-search-results.show {
    animation: fadeInUp 0.2s ease-out;
}

/* Custom scrollbar for results */
.typesense-search-results::-webkit-scrollbar {
    width: 6px;
}

.typesense-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.typesense-search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.typesense-search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
