/*
** Progetti Astratti
** www.progettiastratti.com
**
** Theme: Struttura
** Version: 5.0.0
*/

/* Polylang - select e dropdown ereditano completamente il font del tema */
.pll-switcher-select,
.pll-flags-dropdown,
.pll-flags-dropdown li a,
.pll-flags-dropdown .current {
    font-family: inherit !important;   /* eredita font principale */
    font-size: inherit !important;     /* eredita dimensione */
    font-weight: 900;
    font-style: inherit !important;    /* eredita corsivo se presente */
    line-height: inherit !important;   /* coerente con il tema */
    color: inherit !important;         /* colore del testo */
    text-decoration: none !important;  /* rimuove sottolineature */
}

.pll-switcher-select {
    -webkit-appearance: none;
    -moz-appearance: none; 
    appearance: none;         
    border: none;
    background: transparent;
    width: auto;
    height: auto;
    padding: 5px 10px;
}
.pll-switcher-select::-moz-focus-inner {
    border: 0;
}

/* Polylang - Dropdown principale */
.pll-flags-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.pll-flags-dropdown .current {
    width: 20px;
    height: 20px;
}

.pll-flags-dropdown ul {
    list-style: none;
    padding: 5px 0;
    margin: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: transparent;
    border: none;
    display: none;
    z-index: 999;
    min-width: 40px;
}

.pll-flags-dropdown li {
    padding: 12px 0;
    width: 20px;
    text-align: center;
}

.pll-flags-dropdown li a {
    display: block;
    width: 20px;
    height: 20px;
}

.pll-flags-dropdown li a img,
.pll-flags-dropdown .current img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 10px;
}


.el-content .el-link img[alt="English"],
.el-content .el-link img[alt="Italiano"] {
    width: 20px !important;
    height: 20px !important;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255,255,255,.4);
    transition: transform .2s ease;
}

.el-content .el-link:hover img {
    transform: scale(1.08);
}

.lang-item > a {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color .2s ease;
}

.lang-item > a > img {
    width: 20px !important;
    height: 20px !important;
    object-fit: cover;
    border-radius: 50%;
}

.lang-item > a:hover {
    background: none;
}

/* =========================================
   POLYLANG — Niente nav line sulle bandiere
   ========================================= */

/* Menu Polylang */
.uk-navbar-nav > .lang-item > a::before,
.uk-navbar-nav > .lang-item > a::after {
    display: none !important;
    content: none !important;
}

/* Eventuali bandiere inserite come elemento YOOtheme */
.uk-navbar a:has(img[alt="English"])::after,
.uk-navbar a:has(img[alt="Italiano"])::after {
    display: none !important;
    content: none !important;
}

/* ==========================================================
   BOSIFIL — POLYLANG LANGUAGE ICON
   Desktop + Mobile / YOOtheme
   Nessuna classe custom necessaria
   ========================================================== */


/* ----------------------------------------------------------
   1. RIMUOVE I PALLINI DELLA LISTA POLYLANG
   ---------------------------------------------------------- */

li:has(> a[lang="en-GB"]),
li:has(> a[lang="it-IT"]) {
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

li:has(> a[lang="en-GB"])::marker,
li:has(> a[lang="it-IT"])::marker {
    content: "" !important;
    font-size: 0 !important;
}


/* ----------------------------------------------------------
   2. NASCONDE LA VECCHIA BANDIERINA PNG BASE64
   ---------------------------------------------------------- */

a[lang="en-GB"] > img,
a[lang="it-IT"] > img {
    display: none !important;
}


/* ----------------------------------------------------------
   3. LINK DEL LANGUAGE SWITCHER
   ---------------------------------------------------------- */

a[lang="en-GB"],
a[lang="it-IT"] {
    display: inline-flex !important;

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

    width: 32px !important;
    height: 32px !important;

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

    line-height: 1 !important;
    text-decoration: none !important;
}


/* ----------------------------------------------------------
   4. ICONA BASE
   ---------------------------------------------------------- */

a[lang="en-GB"]::before,
a[lang="it-IT"]::before {
    content: "" !important;

    display: block !important;

    width: 25px !important;
    height: 25px !important;

    flex: 0 0 28px;

    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


/* ----------------------------------------------------------
   5. INGLESE
   ---------------------------------------------------------- */

a[lang="en-GB"]::before {
    background-image:
        url("/bosifil/wp-content/themes/yootheme-struttura/assets/images/uk.svg") !important;
}


/* ----------------------------------------------------------
   6. ITALIANO
   ---------------------------------------------------------- */

a[lang="it-IT"]::before {
    background-image:
        url("/bosifil/wp-content/themes/yootheme-struttura/assets/images/it.svg") !important;
}


/* ----------------------------------------------------------
   7. ELIMINA EVENTUALI DECORAZIONI YOOtheme
   ---------------------------------------------------------- */

a[lang="en-GB"]::after,
a[lang="it-IT"]::after {
    content: none !important;
    display: none !important;
}


/* ----------------------------------------------------------
   8. HOVER
   ---------------------------------------------------------- */

a[lang="en-GB"]:hover::before,
a[lang="it-IT"]:hover::before {
    opacity: 0.75;
    transform: scale(1.06);
}