/**
 * IWF Omni Search Styles
 */

/* Search Container */
.iwf-omni-search-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 0;
    position: relative;
}

/* Search Form */
.iwf-omni-search-form {
    position: relative;
    margin-bottom: 30px;
}

.iwf-search-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.iwf-search-input-wrapper:focus-within {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
}

/* Search Input */
.iwf-search-input {
    flex: 1;
    padding: 15px 25px;
    font-size: 16px;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
}

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

/* Search Button */
.iwf-search-button {
    padding: 15px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.iwf-search-button:hover {
    background: #005a87;
}

/* Loader */
.iwf-search-loader {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.iwf-search-loader span {
    display: inline-block;
    padding: 10px 20px;
    background: #f5f5f5;
    border-radius: 20px;
}

/* Search Results Container */
.iwf-search-results {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.iwf-search-results:empty {
    display: none;
}

/* Results Wrapper */
.iwf-results-wrapper {
    padding: 20px;
}

/* Result Sections */
.iwf-result-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.iwf-result-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Section Titles */
.iwf-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #0073aa;
    display: inline-block;
}

/* Result List */
.iwf-result-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Result Items */
.iwf-result-item {
    margin: 0 0 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.iwf-result-item:hover {
    background: #f0f0f0;
    border-left-color: #0073aa;
    transform: translateX(5px);
}

.iwf-result-item:last-child {
    margin-bottom: 0;
}

.iwf-result-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Result Title */
.iwf-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #0073aa;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.iwf-result-item:hover .iwf-result-title {
    color: #005a87;
}

/* Result Description */
.iwf-result-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

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

/* Error Message */
.iwf-error {
    padding: 20px;
    background: #fee;
    color: #c00;
    text-align: center;
    border-radius: 6px;
    margin: 20px 0;
}

/* Search Term Highlighting */
mark {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .iwf-search-input-wrapper {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .iwf-search-input {
        width: 100%;
        padding: 12px 20px;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .iwf-search-button {
        width: 100%;
        padding: 12px 20px;
        border-radius: 0;
    }
    
    .iwf-section-title {
        font-size: 16px;
    }
    
    .iwf-result-title {
        font-size: 15px;
    }
    
    .iwf-result-description {
        font-size: 13px;
    }
    
    .iwf-result-item {
        padding: 12px;
    }
    
    .iwf-result-item:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .iwf-omni-search-container {
        margin: 10px auto;
    }
    
    .iwf-results-wrapper {
        padding: 15px;
    }
    
    .iwf-result-section {
        margin-bottom: 20px;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .iwf-search-input-wrapper {
        background: #2c2c2c;
        border-color: #444;
    }
    
    .iwf-search-input {
        color: #fff;
    }
    
    .iwf-search-input::placeholder {
        color: #999;
    }
    
    .iwf-search-results {
        background: #2c2c2c;
    }
    
    .iwf-section-title {
        color: #fff;
    }
    
    .iwf-result-item {
        background: #333;
    }
    
    .iwf-result-item:hover {
        background: #3a3a3a;
    }
    
    .iwf-result-description {
        color: #bbb;
    }
    
    .iwf-no-results {
        color: #bbb;
    }
}

/* Loading Spinner Animation */
.iwf-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 115, 170, 0.3);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}