/* ITICore - last_visited_clients.css */

/* Point d'ancrage pour le dropdown relatif au LI natif */
#mainmenutd_iticore_recent {
    position: relative; /* Indispensable pour le positionnement du dropdown */
    display: inline-block; /* Pour garder l'alignement horizontal si flexbox n'est pas actif */
}

/* On force la visibilité du dropdown au survol de l'item de menu */
#mainmenutd_iticore_recent:hover .iticore-recent-dropdown {
    display: block !important;
}

/* Le dropdown menu - Design Premium */
.iticore-recent-dropdown {
    display: none;
    position: absolute;
    top: 100%; /* Juste en dessous de la barre de menu */
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    max-width: 300px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0 0 6px 6px;
    z-index: 20000;
    padding: 0;
    margin: 0;
}

/* Header du dropdown */
.iticore-recent-dropdown .dropdown-header {
    padding: 10px 15px;
    background-color: #f8f9fa;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6c757d;
    border-bottom: 1px solid #eee;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Titre à gauche, Poubelle à droite */
}

/* Petit bouton poubelle compact dans le header */
#iticore-clear-history {
    background: none;
    border: none;
    padding: 4px;
    margin: 0;
    font-size: 14px;
    color: #cbd3da;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    line-height: 1;
}

#iticore-clear-history:hover {
    color: #dc3545;
    background: none;
    transform: scale(1.2);
}

/* Liste des éléments */
.iticore-recent-dropdown ul {
    list-style: none;
    padding: 5px 0;
    margin: 0;
    max-height: 350px;
    overflow-y: auto;
}

.iticore-recent-dropdown ul li {
    padding: 0;
}

.iticore-recent-dropdown ul li a {
    display: block;
    padding: 10px 15px;
    color: #333 !important;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s;
    text-align: left !important;
}

.iticore-recent-dropdown ul li a:hover {
    background-color: #f1f3f5;
    color: #007bff !important;
}

/* Dark Mode support */
body.darkmode .iticore-recent-dropdown {
    background: #2b2b2b;
    border-color: #444;
}
body.darkmode .iticore-recent-dropdown .dropdown-header {
    background: #3a3a3a;
    color: #aaa;
    border-bottom-color: #444;
}
body.darkmode #iticore-clear-history {
    color: #555;
}
body.darkmode #iticore-clear-history:hover {
    color: #ff6b6b;
}

body.darkmode .iticore-recent-dropdown ul li a {
    color: #ddd !important;
}
body.darkmode .iticore-recent-dropdown ul li a:hover {
    background: #404040;
}

/* Cas où le menu est vide */
.no-recent {
    padding: 15px;
    font-size: 11px;
    color: #999;
    text-align: center;
    font-style: italic;
}
