/* Wrapper principal */
.search-convention-ajax-wrapper {
    position: relative;
    width: 100%;
    /* max-width: 600px; */
    margin: 0;
}

/* Formulaire de recherche */
.search-form-convention-ajax {
    display: flex;
    align-items: center;
    position: relative;
}

/* Champ de recherche */
input.search-field-ajax {
    border: none!important;
    outline: none;
    font-size: 16px;
    background: #fff;
    padding: 10px 20px!important;
    border-radius: 30px!important;
    background-image: url("/wp-content/uploads/2025/11/rechercher-sur-acoris.svg");
    background-position: top 14px right 18px;
    background-repeat: no-repeat;
}

.search-icon {
    font-size: 18px;
}

/* Loader */
.search-loader {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #F4B02C;
    border-top-color: #F4B02C;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Dropdown des résultats */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    /* border: 1px solid #ddd; */
    border-radius: 20px 8px 8px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

/* Header des résultats */
.results-header {
    padding: 12px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    font-size: 14px;
    color: #666;
}

/* Liste des résultats */
.results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Item de résultat */
.result-item {
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

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

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

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

.result-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    transition: color 0.2s ease;
}

.result-item:hover .result-title {
    color: #F4B02C;
}

.result-excerpt {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.result-date {
    font-size: 12px;
    color: #999;
}

/* Messages */
.loading-message,
.no-results,
.error-message {
    padding: 20px;
    text-align: center;
    color: #666;
}

.no-results a{color: #000; font-weight: 500!important; text-decoration: underline!important;}
.no-results a:hover{text-shadow:  #fff 1px 0 5px!important;}


.error-message {
    color: #d63638;
}

/* Scrollbar personnalisée */
.search-results-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .search-convention-ajax-wrapper {
        max-width: 100%;
    }
    
    .search-results-dropdown {
        max-height: 400px;
    }
}

/* Style pour l'IDCC */
.result-idcc {
    display: inline-block;
    background: #F4B02C;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 5px;
}