/**
 * Attribute Counter Module CSS
 * Styles pour l'affichage du compteur d'attributs
 */

.attribute-count-info {
    margin-top: 8px;
    margin-bottom: 4px;
}

.attribute-count-badge {
    display: inline-flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
}

.attribute-count-badge:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.attribute-count-badge .material-icons {
    font-size: 14px;
    margin-right: 4px;
    color: #6c757d;
}

/* Variantes de couleur selon le nombre d'options */
.attribute-count-badge[data-count="1"] {
    background-color: #e3f2fd;
    border-color: #bbdefb;
    color: #1976d2;
}

.attribute-count-badge[data-count="2"] {
    background-color: #e8f5e8;
    border-color: #c8e6c9;
    color: #388e3c;
}

.attribute-count-badge[data-count="3"],
.attribute-count-badge[data-count="4"],
.attribute-count-badge[data-count="5"] {
    background-color: #fff3e0;
    border-color: #ffcc02;
    color: #f57c00;
}

.attribute-count-badge[data-count="6"],
.attribute-count-badge[data-count="7"],
.attribute-count-badge[data-count="8"],
.attribute-count-badge[data-count="9"],
.attribute-count-badge[data-count="10"] {
    background-color: #fce4ec;
    border-color: #f8bbd9;
    color: #c2185b;
}

/* Responsive */
@media (max-width: 768px) {
    .attribute-count-badge {
        font-size: 11px;
        padding: 3px 6px;
    }

    .attribute-count-badge .material-icons {
        font-size: 12px;
        margin-right: 3px;
    }
}

/* Integration avec les thèmes PrestaShop populaires */
.product-miniature .attribute-count-info {
    margin-top: 6px;
}

.product-item .attribute-count-info {
    margin-top: 6px;
}

/* Pour les listes de produits en grille */
.products .product-miniature .attribute-count-info {
    text-align: center;
}

/* Pour les listes de produits en liste */
.product-list-view .attribute-count-info {
    margin-top: 4px;
}

/* Animation d'apparition */
.attribute-count-badge {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour le tooltip personnalisé */
.custom-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 9999;
    max-width: 300px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease-out forwards;
}

.custom-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

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

/* Amélioration du badge pour le tooltip */
.attribute-count-badge[data-toggle="tooltip"],
.attribute-count-badge[title] {
    cursor: help;
    position: relative;
}

.attribute-count-badge[data-toggle="tooltip"]:hover,
.attribute-count-badge[title]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Styles spécifiques pour les tooltips avec beaucoup de contenu */
.custom-tooltip.multi-line {
    white-space: normal;
    max-width: 250px;
    line-height: 1.4;
}

/* Responsive pour les tooltips */
@media (max-width: 768px) {
    .custom-tooltip {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 200px;
    }
}
