/**
 * File: css/ajax-search.css
 * Ajax Search Widget Styles
 */

/* Main Wrapper */
.ajax-search-wrapper {
    padding: 20px;
    background: #2e4b9e;
    border-radius: 4px;
    position: relative;
    width: 100%;
}
.elementor-105 .elementor-element.elementor-element-e6025d4 .ajax-search-input{
    border:0;
}
button.ajax-search-button{
    padding:6px !important;
    line-height:0;
    border:0;
}

/* Search Container */
.ajax-search-container {
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 4px;
}

/* Search Input */
.ajax-search-input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: #333;
}

.ajax-search-input::placeholder {
    color: #999;
}

.ajax-search-input:focus {
    outline: none;
}

/* Search Button */
.ajax-search-button {
    background: #1e3a8a;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    border-radius: 4px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 60px;
}

.ajax-search-button:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.ajax-search-button svg {
    width: 24px;
    height: 24px;
}

/* Results Container */
.ajax-search-results {
    position: absolute;
    left: 20px;
    right: 20px;
    top: calc(100% + 10px);
    max-width: calc(1200px - 40px);
    margin: 0 auto;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
    z-index: 1000;
}

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

/* Results List */
.search-results-list {
    padding: 10px 0;
}

/* Individual Result Item */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px dotted #e5e5e5;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
}

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

/* Product Image */
.search-result-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-right: 20px;
    background: #f9f9f9;
    padding: 5px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Content Area */
.search-result-content {
    flex: 1;
    min-width: 0;
}

/* Product Title */
.search-result-title {
    font-size: 16px;
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Price Container */
.search-result-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Current/Sale Price */
.current-price {
    font-size: 18px;
    font-weight: bold;
    color: #000;
}

/* Original Price (when on sale) */
.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

/* Loading State */
.search-loading {
    padding: 30px 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
}

.search-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* No Results State */
.no-results {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
}

/* Scrollbar Styling */
.ajax-search-results::-webkit-scrollbar {
    width: 8px;
}

.ajax-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ajax-search-results::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ajax-search-results::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ajax-search-wrapper {
        padding: 15px;
    }
    
    .ajax-search-results {
        left: 15px;
        right: 15px;
        max-width: calc(100% - 30px);
    }
    
    .ajax-search-container {
        gap: 5px;
        padding: 3px;
    }
    
    .ajax-search-input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .ajax-search-button {
        padding: 10px 20px;
        min-width: 50px;
    }
    
    .ajax-search-button svg {
        width: 20px;
        height: 20px;
    }
    
    .search-result-image {
        width: 60px;
        height: 60px;
        margin-right: 15px;
    }
    
    .search-result-title {
        font-size: 14px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .original-price {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ajax-search-wrapper {
        padding: 10px;
    }
    
    .ajax-search-results {
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }
    
    .search-result-item {
        padding: 12px 15px;
    }
    
    .search-result-image {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
}