/*
Theme Name: OceanWP Child Theme
Theme URI: https://oceanwp.org/
Description: OceanWP WordPress theme. Sample child theme.
Author: OceanWP
Author URI: https://oceanwp.org/
Template: oceanwp
Version: 1.0
*/

/* Parent stylesheet should be loaded from functions.php not using @import */

/* Toggle lingua Polylang - desktop e mobile */
.lang-item {
    display: flex !important;
    align-items: center !important;
}

/* Base toggle */
.lang-item > a {
    display: inline-flex !important;
    align-items: center !important;
    width: 64px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.70);
    background: rgba(255,255,255,0.20);
    position: relative;
    overflow: hidden;
    font-size: 0 !important;
    color: transparent !important;
    line-height: 1 !important;
}

/* Pallino */
.lang-item > a::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    transition: all .25s ease;
}

/* Testo default: EN */
.lang-item > a::after {
    content: "EN";
    position: absolute;
    right: 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
}

/* Pagina inglese: mostra IT */
html[lang^="en"] .lang-item > a::before {
    left: 36px;
}

html[lang^="en"] .lang-item > a::after {
    content: "IT";
    left: 10px;
    right: auto;
}

/* Hover */
.lang-item > a:hover {
    background: rgba(255,255,255,0.35);
}

/* Desktop - distanza dal menu */
@media only screen and (min-width: 960px) {
    #site-navigation .lang-item {
        margin-left: 30px !important;
    }

    #site-navigation .lang-item > a {
        transform: translateY(30px);
    }
}

/* Mobile - centratura toggle */
@media only screen and (max-width: 959px) {
    li.lang-item {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
    }

    li.lang-item > a {
        display: inline-flex !important;
        margin: 15px auto !important;
        float: none !important;
        left: auto !important;
        right: auto !important;
    }
}
/* Separatore desktop */
@media only screen and (min-width: 960px) {

    #site-navigation .lang-item {
        margin-left: 5px !important;   /* era 30px */
        padding-left: 20px !important;
        position: relative;
    }

    #site-navigation .lang-item::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        width: 1px;
        height: 24px;
        background: rgba(255,255,255,0.25);

        /* segue il toggle */
        transform: translateY(20px);
    }

}