/**
 * A4W Tag Product - Frontend Styles
 */

.a4w-product-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.a4w-flag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.a4w-flag.a4w-flag-rounded {
    border-radius: 20px;
}

.a4w-flag:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Variantes de taille */
.a4w-flag.flag-small {
    padding: 4px 8px;
    font-size: 12px; /* plancher de lisibilité : jamais sous 12 px (2.3.3) */
}

.a4w-flag.flag-large {
    padding: 8px 16px;
    font-size: 14px;
}

/* Pour la page produit */
.product-flags .a4w-product-flags {
    margin: 0;
}

/* Pour les listes de produits */
.product-miniature .a4w-product-flags {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    max-width: calc(100% - 20px);
}

/* Responsive */
@media (max-width: 768px) {
    .a4w-product-flags {
        gap: 6px;
    }

    .a4w-flag {
        padding: 5px 10px;
        font-size: 12px; /* plancher de lisibilité : jamais sous 12 px (2.3.3) */
    }
}

/* Image dans les flags (mode image + texte : vignette inline compacte, recadrage cover) */
.a4w-flag-img { max-height: 24px; max-width: 56px; object-fit: cover; vertical-align: middle; display: inline-block; }
.a4w-flag-label { display: inline-block; }

/* Mode image seule : la vignette remplit un carré 56×56 (recadrage cover) et fait office de badge. */
.a4w-flag-image { background: transparent !important; padding: 0 !important; }
.a4w-flag-image .a4w-flag-img { width: 56px; height: 56px; max-width: none; max-height: none; object-fit: cover; }

/* Overlay (fallback sans conteneur natif) */
.a4w-product-flags.a4w-overlay { position: absolute; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; z-index: 2; pointer-events: none; }
.a4w-product-flags.a4w-corner-tl { top: 8px; left: 8px; }
.a4w-product-flags.a4w-corner-tr { top: 8px; right: 8px; align-items: flex-end; }
.a4w-product-flags.a4w-corner-bl { bottom: 8px; left: 8px; }
.a4w-product-flags.a4w-corner-br { bottom: 8px; right: 8px; align-items: flex-end; }
.a4w-product-flags.a4w-overlay .a4w-flag { pointer-events: auto; }
