/* ==========================================================================
   IKONY HEADERA Z WŁASNYCH PLIKÓW SVG
   ========================================================================== */

@media (min-width: 1200px) {

    /* Ukrycie oryginalnych ikon */
    #header #_desktop_ps_searchbar .ps-searchbar__magnifier,
    #header #_desktop_user_info .material-icons,
    #header #_desktop_ps_customersignin .material-icons,
    #header #_desktop_user_info .header-block__icon,
    #header #_desktop_ps_customersignin .header-block__icon,
    #header #_desktop_ps_shoppingcart .material-icons,
    #header #_desktop_ps_shoppingcart .header-block__icon {
        font-size: 0;
        line-height: 0;
        color: transparent;
    }

    /* Wyśrodkowanie zawartości kółek */
    #header #_desktop_ps_searchbar .ps-searchbar__magnifier,
    #header #_desktop_user_info .header-block__action-btn,
    #header #_desktop_ps_customersignin .header-block__action-btn,
    #header #_desktop_ps_shoppingcart .header-block__action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Wspólne ustawienia SVG */
    #header #_desktop_ps_searchbar .ps-searchbar__magnifier::before,
    #header #_desktop_user_info .material-icons::before,
    #header #_desktop_ps_customersignin .material-icons::before,
    #header #_desktop_user_info .header-block__icon::before,
    #header #_desktop_ps_customersignin .header-block__icon::before,
    #header #_desktop_ps_shoppingcart .material-icons::before,
    #header #_desktop_ps_shoppingcart .header-block__icon::before {
        content: "";
        display: block;
        flex: 0 0 auto;

        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }

    /* =========================
       LUPA
       ========================= */

    #header #_desktop_ps_searchbar .ps-searchbar__magnifier::before {
        width: 22px;
        height: 22px;

        background-image:
            url('/themes/hummingbird/assets/img-dist/magnifying-glass.svg');
    }

    /* =========================
       UŻYTKOWNIK
       ========================= */

    #header #_desktop_user_info .material-icons::before,
    #header #_desktop_ps_customersignin .material-icons::before,
    #header #_desktop_user_info .header-block__icon::before,
    #header #_desktop_ps_customersignin .header-block__icon::before {
        width: 22px;
        height: 22px;

        background-image:
            url('/themes/hummingbird/assets/img-dist/streamline-flex_user-full-body.svg');

        transform: translate(-11px,-11px);
    }

    
}

@media (min-width: 1200px) {

    /* Hover wspólny dla ikon */
    #header #_desktop_ps_searchbar .ps-searchbar__magnifier:hover,
    #header #_desktop_user_info .header-block__action-btn:hover,
    #header #_desktop_ps_customersignin .header-block__action-btn:hover,
    #header #_desktop_ps_shoppingcart .header-block__action-btn:hover {
        background: #0b69f6;
        border-color: #0b69f6;
    }

    /* SVG na biało podczas hover */
    #header #_desktop_ps_searchbar .ps-searchbar__magnifier:hover::before,
    #header #_desktop_user_info .header-block__action-btn:hover .material-icons::before,
    #header #_desktop_ps_customersignin .header-block__action-btn:hover .material-icons::before,
    #header #_desktop_user_info .header-block__action-btn:hover .header-block__icon::before,
    #header #_desktop_ps_customersignin .header-block__action-btn:hover .header-block__icon::before,
    #header #_desktop_ps_shoppingcart .header-block__action-btn:hover .material-icons::before,
    #header #_desktop_ps_shoppingcart .header-block__action-btn:hover .header-block__icon::before {
        filter: brightness(0) invert(1);
    }

    /* Płynna animacja */
    #header #_desktop_user_info .header-block__action-btn,
    #header #_desktop_ps_customersignin .header-block__action-btn,
    #header #_desktop_ps_shoppingcart .header-block__action-btn {
        transition:
            background-color .2s ease,
            border-color .2s ease,
            transform .2s ease;
    }

    #header #_desktop_ps_searchbar .ps-searchbar__magnifier::before,
    #header #_desktop_user_info .material-icons::before,
    #header #_desktop_ps_customersignin .material-icons::before,
    #header #_desktop_user_info .header-block__icon::before,
    #header #_desktop_ps_customersignin .header-block__icon::before,
    #header #_desktop_ps_shoppingcart .material-icons::before,
    #header #_desktop_ps_shoppingcart .header-block__icon::before {
        transition: filter .2s ease;
    }
}



/* Obramowanie wszystkich ikon jak przy koszyku */
    #header #_desktop_ps_searchbar .ps-searchbar__magnifier,
    #header #_desktop_user_info .header-block__action-btn,
    #header #_desktop_ps_customersignin .header-block__action-btn {
        border: 1px solid #64A1F4;
    }

/* ==========================================================================
   KOSZYK
   ========================================================================== */

@media (min-width: 1200px) {

    #header #_desktop_ps_shoppingcart {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        margin-left: 10px;
        overflow: visible;
    }

    #header #_desktop_ps_shoppingcart .ps-shoppingcart {
        width: 46px;
        height: 46px;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    /* Właściwe kółko koszyka */
    #header #_desktop_ps_shoppingcart .cart-preview {
        position: relative;

        display: flex;
        align-items: center;
        justify-content: center;

        width: 46px;
        height: 46px;
        margin: 0;
        padding: 0;

        border: 1px solid #64A1F4;
        border-radius: 50%;
        background: #fff;

        cursor: pointer;
        overflow: visible;

        transition:
            background-color .25s ease,
            border-color .25s ease;
    }

    

    /* Hover */
    #header #_desktop_ps_shoppingcart .cart-preview:hover {
        background: #0B69F6;
        border-color: #0B69F6;
    }

    #header #_desktop_ps_shoppingcart .cart-preview:hover::before {
        filter: brightness(0) invert(1);
    }

    /* Licznik */
    #header #_desktop_ps_shoppingcart .header-block__badge,
    #header #_desktop_ps_shoppingcart .cart-products-count {
        position: absolute;
        top: -6px;
        right: -6px;
        z-index: 5;

        display: flex;
        align-items: center;
        justify-content: center;

        width: 19px;

        padding: 0;
        margin: 0;

        font-size: 11px;
        font-weight: 700;
        line-height: 1;

        color: #fff;
        background: #0B69F6;

        border: 2px solid #fff;
        border-radius: 50%;

        transition: background-color .25s ease;
    }

    #header #_desktop_ps_shoppingcart .cart-preview:hover .header-block__badge,
    #header #_desktop_ps_shoppingcart .cart-preview:hover .cart-products-count {
        background: #64A1F4;
    }
}

/* ==========================================================================
   KOSZYK — POPRAWNE WYŚWIETLANIE WŁASNEGO SVG
   ========================================================================== */

@media (min-width: 1200px) {

    #header #_desktop_ps_shoppingcart {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        flex: 0 0 46px !important;

        width: 46px !important;
        min-width: 46px !important;
        height: 80px !important;

        margin-left: 10px !important;
        padding: 0 !important;

        overflow: visible !important;
    }

    #header #_desktop_ps_shoppingcart .ps-shoppingcart {
        position: relative !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 46px !important;
        height: 46px !important;

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

        overflow: visible !important;
    }

    /* Zewnętrzne kółko */
    #header #_desktop_ps_shoppingcart .cart-preview {
        position: relative !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 46px !important;
        min-width: 46px !important;
        height: 46px !important;
        min-height: 46px !important;

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

        color: #0b69f6 !important;
        background: #fff !important;

        border: 1px solid #64a1f4 !important;
        border-radius: 50% !important;

        box-shadow: 0 2px 6px rgba(45, 107, 177, .08) !important;

        overflow: visible !important;
    }

    /*
     * Usunięcie starego pseudo-elementu.
     * Nie może być osobnym elementem flex obok linku.
     */
    #header #_desktop_ps_shoppingcart .cart-preview::before,
    #header #_desktop_ps_shoppingcart .cart-preview::after {
        content: none !important;
        display: none !important;
    }

    /* Link wypełnia kółko */
    #header #_desktop_ps_shoppingcart .header-block__action-btn {
        position: relative !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer;

        width: 100% !important;
        min-width: 0 !important;
        height: 100% !important;

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

        color: #0b69f6 !important;
        background: transparent !important;

        border: 0 !important;
        border-radius: 50% !important;

        box-shadow: none !important;
        transform: none !important;
    }

    /*
     * Ikona jest teraz wewnątrz linku,
     * więc nie konkuruje z nim o szerokość.
     */
    #header #_desktop_ps_shoppingcart
    .header-block__action-btn::before {
        content: "" !important;

        display: block !important;
        flex: 0 0 22px !important;

        width: 22px !important;
        height: 22px !important;
        
        margin: 0 !important;
        padding: 0 !important;

        background-image:
            url('/themes/hummingbird/assets/img-dist/streamline-flex_shopping-cart-2.svg') !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;

        border: 0 !important;
        transform: none !important;

        transition: filter .2s ease;
    }

    /* Ukrycie oryginalnej ikony i tekstu */
    #header #_desktop_ps_shoppingcart .material-icons,
    #header #_desktop_ps_shoppingcart .header-block__icon,
    #header #_desktop_ps_shoppingcart .header-block__title,
    #header #_desktop_ps_shoppingcart .cart-label,
    #header #_desktop_ps_shoppingcart .cart-title {
        display: none !important;
    }

    /* Hover */
    #header #_desktop_ps_shoppingcart .cart-preview:hover {
        background: #0b69f6 !important;
        border-color: #0b69f6 !important;
    }

    #header #_desktop_ps_shoppingcart
    .cart-preview:hover
    .header-block__action-btn::before {
        filter: brightness(0) invert(1);
    }

    /* Licznik */
    #header #_desktop_ps_shoppingcart .header-block__badge,
    #header #_desktop_ps_shoppingcart .cart-products-count {
        position: absolute !important;

        top: -6px !important;
        right: -6px !important;
        z-index: 10 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        min-width: 20px !important;
        height: 20px !important;

        margin: 0 !important;
        padding: 0 4px !important;

        color: #fff !important;
        background: #0b69f6 !important;

        border: 2px solid #fff !important;
        border-radius: 999px !important;

        font-size: 11px !important;
        font-weight: 700 !important;
        line-height: 16px !important;

        box-sizing: border-box;
    }
}


/* ==========================================================================
   HEADER — UKRYCIE NAPISU „KOSZYK”, LICZNIK ZOSTAJE
   ========================================================================== */

@media (min-width: 1200px) {

    #header #_desktop_ps_shoppingcart
    .header-block__action-btn > span:not(.header-block__badge):not(.cart-products-count) {
        display: none !important;
    }

    #header #_desktop_ps_shoppingcart
    .header-block__title,
    #header #_desktop_ps_shoppingcart
    .cart-label,
    #header #_desktop_ps_shoppingcart
    .cart-title,
    #header #_desktop_ps_shoppingcart
    .d-none.d-md-flex {
        display: none !important;
    }

    #header #_desktop_ps_shoppingcart
    .header-block__action-btn {
        gap: 0 !important;
        font-size: 0 !important;
    }

    /* Przywrócenie rozmiaru tekstu licznika */
    #header #_desktop_ps_shoppingcart
    .header-block__badge,
    #header #_desktop_ps_shoppingcart
    .cart-products-count {
        font-size: 11px !important;
        line-height: 1 !important;
    }
}