/*=====================================
// 1. STRUCTURE DU CHAMP DE RECHERCHE
// awesome-woocommerce-search-engine/assets/css/awse-frontend-style.css
// On gère uniquement le positionnement pour laisser les couleurs hériter du thème.
//=====================================*/

/*=====================================
// 1. STRUCTURE DU WRAPPER
// On gère uniquement le positionnement pour laisser les couleurs hériter du thème.
//=====================================*/
form.awse-search-form {
    position: relative;
    width: 100%;
    padding: 0px !important;
    margin-left: 0px !important;
    margin-right: 0px !important;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
}

.awse-search-bar {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/*=====================================
// 2. CHAMP DE SAISIE (HÉRITAGE)
// On force l'héritage des styles du thème parent pour le background et les bordures.
//=====================================*/
.awse-search-bar-input {
    width: 100%;
    height: 45px;
    background: transparent !important;
    color: inherit !important;
    border: inherit !important;
    /* Espace à gauche pour laisser place à l'icône SVG */
    padding-right: 45px !important; 
    box-sizing: border-box;
}

input.awse-search-bar-input::placeholder {
    color: #212121;
}
.dark input.awse-search-bar-input::placeholder {
    color: #404555;
}

/*=====================================
// 3. POSITIONNEMENT DE L'ICÔNE (SVG)
// L'icône est placée en absolu. Pointer-events: none évite de gêner le clic.
//=====================================*/
.awse-search-bar-icon {
    position: absolute;
    right: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: none !important; 
    border:none; 
    cursor:pointer;
}

.awse-search-bar-icon svg {
    width: 18px;
    height: 18px;
    stroke: #212121;
} 
.dark .awse-search-bar-icon svg {
    stroke: #404555;
} 

/*=====================================
// 4. PANNEAU DES RÉSULTATS (DROPDOWN)
// Apparaît sous le champ lors de la saisie.
//=====================================*/
.awse-search-results-panel-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999999999;
    display: none; /* Contrôlé par le JS */
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgb(0 0 0 / 15%);
    border: 1px solid #eee;
    background: #ffffff; 
}
.dark .awse-search-results-panel-wrapper {
    background: #111418;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.6);
    border: 0px solid #45455550;
}
 

/*=====================================
// 5. EACH ITEM DU RÉSULTATS DE RECHERCHE
// item = product ou vendeur du resultat des recherche
//=====================================*/
/*.awse-search-results-item-container:nth-child(odd) {
    background: #111418;
}
.awse-search-results-item-container:nth-child(even) {
    background: #13161a;
}*/



/*=====================================
// 5. STYLE DES VENDEURS DES RÉSULTATS DE RECHERCHE
// Structure alignée sur le template awse-search-results-item.php
//=====================================*/
.awse-search-results-vendor {
    display: flex;
    align-items: center;
    padding: 12px;
    text-decoration: none !important;
    color: #2d3748;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s ease;
}
.dark .awse-search-results-vendor {
    border-bottom: 1px solid #40455540;
}

.awse-search-results-vendor:last-child {
    border-bottom: none;
}

.awse-search-results-vendor:hover {
    background: #f7fafc;
}
.dark .awse-search-results-vendor:hover {
    background: #00000015 !important;
}

.awse-search-results-vendor-details {
    display: flex;
    flex-direction: column;
}

.awse-search-results-vendor-avatar-container {
    flex-shrink: 0;
    margin-right: 10px;
}
.awse-search-results-vendor-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* 1. Nom du Vendeur */
.awse-search-results-vendor-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;
    margin-top: -1px;
    color: #212121;
}
.dark .awse-search-results-vendor-name {
    color: #ffffff;
}

/* Profil Badge */
.awse-search-results-vendor-profile-badge {
    font-size: 10px;
    background: #0080ff30;
    color: #0080ff;
    padding: 1px 6px;
    border-radius: 10px;
    align-self: flex-start;
    margin-top: 4px;
}



/*=====================================
// 5. STYLE DES PRODUITS DES RÉSULTATS DE RECHERCHE
// Structure alignée sur le template awse-search-results-item.php
//=====================================*/

.awse-search-results-section-title {
    background: #f8f8f8;
    padding: 5px 15px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #a0aec0;
    letter-spacing: 1px;
}
.dark .awse-search-results-section-title {
    background: #21262e;
}

/* On enlève la bordure du haut pour le tout premier titre */
.awse-search-results-section-title:first-child {
    border-top: none;
}

.awse-search-results-product {
    display: flex;
    padding: 12px;
    text-decoration: none !important;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}
.dark .awse-search-results-product {
    border-bottom: 1px solid #40455540;
}

/*.awse-search-results-product:last-child {
    border-bottom: none;
}*/

.awse-search-results-product:hover {
    background: #f7fafc;
}
.dark .awse-search-results-product:hover {
    background: #00000015 !important;
}

.awse-search-results-product-image-container {
    flex-shrink: 0;
    margin-right: 10px;
}

.awse-search-results-product-image {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    /*background: #f1f1f1;*/
}

.awse-search-results-product-details {
    display: flex;
    flex-direction: column;
}

/* 1. Nom du Vendeur */
.awse-search-results-product-vendor {
    font-size: 12px;
    color: #0080ff;
    margin-top: -4px;
}

/* 2. Titre */
.awse-search-results-product-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;
    margin-top: -1px;
    color: #212121;
}
.dark .awse-search-results-product-title {
    color: #ffffff;
}

/* 3. Catégorie */
.awse-search-results-product-category {
    font-size: 12px;
    margin-top: -1px;
    color: #718096;
}

/* 4. Prix */
.awse-search-results-product-price {
    font-size: 12px;
    font-weight: 600;
    margin-top: -3px;
    color: #2dab38;
}


/*=====================================
// 6. LES TEXTES INDICATIFS
//=====================================*/
/* Style du message "Recherche en cours..." */
.awse-search-searching {
    padding: 20px;
    text-align: center;
    font-size: 14px;
}

/* Style du message "Aucun resultat trouvé" */
.awse-search-results-no-found {
    padding: 20px;
    text-align: center;
}

/* Style du message "Erreur reseau" */
.awse-search-error {
    padding: 20px;
    text-align: center;
}

/*=====================================
// 8. SEARCH PANEL FOOTER
// Style de "Voir tous les résultats"
//=====================================*/
/* Style du Footer "Voir tous les résultats" */
.awse-search-results-footer {
    background: #ffffff;
    padding: 12px;
    text-align: center;
    border-top: 2px solid #edf2f7;
    position: sticky;
    bottom: 0;
}
.dark .awse-search-results-footer {
    background: #171b20;
    border-top: 2px solid #40455540;
}

.awse-search-results-view-all-link {
    text-decoration: none !important;
    color: #0060ff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.awse-search-results-view-all-link:hover {
    color: #0080ff;
}



