/* PintSave SEO Language Switcher */

#psls-google-translate,
.psls-google-translate,
iframe.goog-te-banner-frame,
.goog-te-banner-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-ORHb,
#goog-gt-tt,
.goog-te-balloon-frame {
    position: absolute !important;
    left: -99999px !important;
    top: -99999px !important;
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    border: 0 !important;
}

body.psls-language-switcher-active {
    top: 0 !important;
}

.psls-menu-item {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
    z-index: 99990 !important;
}

.psls-switcher,
.psls-switcher * {
    box-sizing: border-box;
}

.psls-switcher {
    --psls-accent: #e60023;
    --psls-accent-hover: #e60023;
    --psls-soft: #fff1f3;
    --psls-text: #202124;
    --psls-muted: #6b7280;
    --psls-border: #e5e7eb;

    position: relative;
    z-index: 99999;
    font-family: Poppins, inherit, Arial, sans-serif;
    direction: ltr;
}

.psls-current {
    appearance: none;
    -webkit-appearance: none;
    min-height: 46px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid transparent !important;
    border-radius: 10px;
    background: #fff !important;
    color: var(--psls-text) !important;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none !important;
}

.psls-current:hover,
.psls-current:focus,
.psls-switcher:focus-within .psls-current {
    background: var(--psls-soft) !important;
    border-color: #fecdd3 !important;
    color: var(--psls-accent-hover) !important;
    outline: none;
}

.psls-flag {
    width: 24px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    line-height: 1;
}

.psls-chevron {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .16s ease;
}

.psls-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 268px;
    max-height: min(68vh, 560px);
    padding: 7px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;

    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);

    border: 1px solid var(--psls-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(17, 24, 39, .14);
    z-index: 999999;
    scrollbar-width: thin;
    scrollbar-color: #fda4af transparent;

    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.psls-dropdown::-webkit-scrollbar { width: 7px; }
.psls-dropdown::-webkit-scrollbar-track { background: transparent; }
.psls-dropdown::-webkit-scrollbar-thumb { background: #fda4af; border-radius: 99px; }

.psls-switcher.is-open .psls-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.psls-switcher.is-open .psls-chevron {
    transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    .psls-switcher::after {
        content: "";
        position: absolute;
        top: 100%;
        right: 0;
        width: 268px;
        height: 16px;
        z-index: 999998;
        pointer-events: auto;
    }

    .psls-switcher:hover .psls-dropdown,
    .psls-switcher:focus-within .psls-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .psls-switcher:hover .psls-chevron,
    .psls-switcher:focus-within .psls-chevron {
        transform: rotate(180deg);
    }

    .psls-dropdown::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -10px;
        height: 10px;
    }
}

.psls-option,
.psls-option:visited {
    min-height: 44px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 9px;
    border-radius: 9px;
    color: var(--psls-text) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.psls-option:hover,
.psls-option:focus,
.psls-option.is-active {
    background: var(--psls-soft);
    color: var(--psls-accent-hover) !important;
    text-decoration: none !important;
    outline: none;
}

.psls-option-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.psls-check,
.psls-check-placeholder {
    width: 17px;
    height: 17px;
}

.psls-check {
    fill: none;
    stroke: var(--psls-accent-hover);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1024px) {
    .psls-menu-item { width: 100%; }
    .psls-switcher { width: 100%; }

    .psls-current {
        width: 100%;
        justify-content: flex-start;
    }

    .psls-current .psls-chevron { margin-left: auto; }

    .psls-dropdown {
        position: static;
        width: 100%;
        max-height: 58vh;
        margin-top: 6px;
        box-shadow: none;
        border-radius: 10px;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .psls-switcher.is-open .psls-dropdown { display: block; }
}

.goog-text-highlight,
[class*="goog-text-highlight"],
.VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q,
[class*="VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q"] {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border: 0 !important;
    outline: 0 !important;
}

/* Automatic header fallback used when a theme/header builder bypasses wp_nav_menu_items. */
.psls-auto-host {
    position: relative !important;
    z-index: 99990 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    margin-left: 12px !important;
    overflow: visible !important;
}

/* Astra-specific alignment: keep the switcher on the right side of the main header. */
.site-header-primary-section-right > .psls-auto-host,
.ast-primary-header-bar .psls-auto-host {
    align-self: center !important;
}

/* When the fallback is mounted inside a navigation <ul>, behave like a normal menu item. */
ul > .psls-auto-host,
ol > .psls-auto-host {
    list-style: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

@media (max-width: 1024px) {
    .psls-auto-host {
        width: auto !important;
        margin-left: 8px !important;
    }

    .psls-auto-host .psls-switcher {
        width: auto;
        min-width: 0;
    }

    .psls-auto-host .psls-current {
        width: auto;
        min-height: 42px;
        padding: 7px 10px;
    }

    /* If the theme places the fallback directly in the mobile header row, keep the
       dropdown absolutely positioned instead of expanding the whole header. */
    .site-header-primary-section-right > .psls-auto-host .psls-dropdown,
    .ast-mobile-header-wrap .psls-auto-host .psls-dropdown {
        position: absolute;
        right: 0;
        left: auto;
        top: calc(100% + 8px);
        width: min(286px, calc(100vw - 24px));
        max-height: 62vh;
        margin-top: 0;
        display: none;
        box-shadow: 0 18px 45px rgba(17, 24, 39, .14);
    }

    .site-header-primary-section-right > .psls-auto-host .psls-switcher.is-open .psls-dropdown,
    .ast-mobile-header-wrap .psls-auto-host .psls-switcher.is-open .psls-dropdown {
        display: block;
    }
}
