/**
 * Ajax Search Styles
 */

/* Search Wrapper & Button */
.nfds-search-wrapper {
    position: relative;
    display: inline-block;
}

/* Search Button & Icon Styles werden durch nfds-button-reset.css definiert */

/* Search Box */
.nfds-search-box {
    position: fixed;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    max-width: 90vw;
    animation: searchBoxFadeIn 0.3s ease;
}

/* Transparenter Hintergrund wenn gewünscht */
.nfds-search-box.transparent-bg {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.nfds-search-box.transparent-bg .nfds-search-box-inner {
    background: transparent !important;
    border: none !important;
}

.nfds-search-box.transparent-bg .nfds-search-results {
    background: #ffffff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

@keyframes searchBoxFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.nfds-search-box-inner {
    display: block;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    z-index: 1;
}

.nfds-search-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 15px 20px;
    background: transparent;
    height: 50px;
    display: block;
}

/* Close button wurde entfernt */

/* Search Results */
.nfds-search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.nfds-search-result-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.nfds-search-result-item:hover {
    background-color: #f8f8f8;
}

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

.nfds-search-result-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}

.nfds-search-result-content {
    flex: 1;
}

.nfds-search-result-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.nfds-search-result-type {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nfds-search-result-price {
    font-weight: 600;
    color: var(--wcc-primary-color, #007cba);
}

/* No Results */
.nfds-search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.nfds-search-suggestion {
    padding: 20px;
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
}

.nfds-search-suggestion-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.nfds-search-suggestion-link {
    color: var(--wcc-primary-color, #007cba);
    text-decoration: none;
    font-weight: 600;
}

.nfds-search-suggestion-link:hover {
    text-decoration: underline;
}

/* Loading State */
.nfds-search-loading {
    padding: 40px;
    text-align: center;
}

.nfds-search-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--wcc-primary-color, #007cba);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Kein Overlay mehr - wurde entfernt */

/* Disabled Notice (für Elementor Editor) */
.nfds-search-disabled-notice {
    padding: 20px;
    background: #f0f0f0;
    text-align: center;
    color: #666;
    border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nfds-search-box {
        width: 95vw;
        max-width: 95vw;
    }
    
    .nfds-search-box-inner {
        padding: 15px;
    }
    
    .nfds-search-input {
        font-size: 16px;
    }
    
    .nfds-search-results {
        max-height: 300px;
    }
}