/* ==================================================
   Plastic Wargaming – kompaktní příznaky na obrázku
   - malé barevné čtverečky
   - po najetí myší se rozbalí text
   ================================================== */


/* Kontejner příznaků zpět přes obrázek */
.products .product .image,
.products-block .product .image {
    position: relative !important;
}

.products .product .image .flags,
.products-block .product .image .flags,
.products .product .image .flags-default,
.products-block .product .image .flags-default {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    bottom: auto !important;

    z-index: 5 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;

    width: auto !important;
    max-width: calc(100% - 20px) !important;
    padding: 0 !important;
    margin: 0 !important;

    pointer-events: auto !important;
}


/* Základní stav – malý barevný čtvereček */
.products .product .image .flag,
.products-block .product .image .flag {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;

    padding: 0 !important;
    margin: 0 !important;

    overflow: hidden !important;
    white-space: nowrap !important;

    font-size: 0 !important;
    line-height: 1 !important;

    border-radius: 4px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.18) !important;

    transition:
        max-width .18s ease,
        width .18s ease,
        padding .18s ease,
        font-size .18s ease,
        border-radius .18s ease !important;
}


/* Hover / focus – rozbalení na text */
.products .product .image .flag:hover,
.products .product .image .flag:focus,
.products-block .product .image .flag:hover,
.products-block .product .image .flag:focus,
.products .product .image .flags:hover .flag,
.products-block .product .image .flags:hover .flag {
    width: auto !important;
    max-width: 180px !important;
    height: auto !important;
    min-height: 22px !important;

    padding: 4px 8px !important;

    font-size: 11px !important;
    line-height: 1.2 !important;

    border-radius: 5px !important;
}


/* Když je více příznaků, při hoveru kontejneru se rozbalí všechny */
.products .product .image .flags:hover,
.products-block .product .image .flags:hover,
.products .product .image .flags-default:hover,
.products-block .product .image .flags-default:hover {
    z-index: 20 !important;
}


/* Mobil – bez hoveru necháme malé čtverečky, aby nezakrývaly obrázek */
@media (max-width: 767px) {
    .products .product .image .flags,
    .products-block .product .image .flags,
    .products .product .image .flags-default,
    .products-block .product .image .flags-default {
        top: 8px !important;
        left: 8px !important;
        gap: 4px !important;
    }

    .products .product .image .flag,
    .products-block .product .image .flag {
        width: 12px !important;
        height: 12px !important;
        min-width: 12px !important;
        max-width: 12px !important;
        border-radius: 3px !important;
        font-size: 0 !important;
        padding: 0 !important;
    }
}