/* ========================================
   Language Switcher Trigger Button
   ======================================== */
   .gt_float_switcher .gt-selected .gt-current-lang {
    padding: 13px 15px !important;
    color: #777777 !important;
    display: flex;
    gap: 5px;
    align-items: center;
}

li.menu-item.menu-item-gtranslate.lang-mega-active-trigger > div {
    position: unset !important;
    height: 50px !important;
}

.gt_float_switcher img {
    width: 22px !important;
}

.gt_float_switcher .gt-selected .gt-current-lang span.gt-lang-code {
    font-size: 16px !important;
    line-height: 16px !important;
    top: 1px !important;
}

.gt_float_switcher {
    box-shadow: unset !important;
}

#gt_float_wrapper {
    display: flex;
}
.lang-switcher-btn {
    display: flex;
    gap: 3px;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.15s;
    user-select: none;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.lang-switcher-btn:hover {
    opacity: 0.8;
}

.lang-switcher-flag {
    width: 28px;
    height: 21px !important;
    object-fit: cover;
}

.lang-switcher-code {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: inherit;
}

.lang-switcher-arrow {
    margin-left: 0;
    transition: transform 0.2s;
}

.lang-switcher-btn.open .lang-switcher-arrow {
    transform: rotate(180deg);
}

/* ========================================
   Language Mega Menu
   ======================================== */

.lang-mega-dropdown {
    position: fixed;
    z-index: 999999;
    width: 100%;
    max-width: 100%;
    background: #fff;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    left: 0 !important;
    right: 0;
    top: 207px !important;
    
}

.logged-in .lang-mega-dropdown{
    top: 239px !important;
}

.lang-mega-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-mega-inner {
    display: flex;
    min-height: 400px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 0;
}

/* --- Left column: Region list --- */

.lang-mega-regions {
    width: 220px;
    flex-shrink: 0;
    padding: 20px 0;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

#langMegaDropdown .lang-region-item {
    display: flex;
    align-items: center;
    padding: 12px 22px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

#langMegaDropdown .lang-region-item:hover,
#langMegaDropdown .lang-region-item.active {
    color: #ff3131;
}

/* --- Centre column: Country list --- */

.lang-mega-countries {
    flex: 1;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}

.lang-country-group {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 32px;
    align-content: start;
}

.lang-country-group.active {
    display: grid;
}

#langMegaDropdown .lang-country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    text-decoration: none;
    color: #333;
    font-size: 13.5px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

#langMegaDropdown .lang-country-item:hover {
    background: #f5f5f5;
    color: #ff3131;
}

.lang-country-flag {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

.lang-country-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Right column: Currency list --- */

.lang-mega-currencies {
    width: 180px;
    flex-shrink: 0;
    padding: 20px 0;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.lang-mega-currencies-title {
    padding: 0 22px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
}

#langMegaDropdown .lang-currency-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 22px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

#langMegaDropdown .lang-currency-item:hover {
    background: #f5f5f5;
    color: #ff3131;
}

#langMegaDropdown .lang-currency-item.active {
    color: #ff3131;
    font-weight: 600;
    background: #fff5f5;
}

.lang-currency-code {
    font-weight: inherit;
}

.lang-currency-sym {
    font-size: 15px;
    opacity: 0.6;
}

#langMegaDropdown .lang-currency-item.active .lang-currency-sym {
    opacity: 1;
}

/* Hide native GTranslate dropdown */

.lang-mega-active-trigger .gt_selector,
.lang-mega-active-trigger select.gt_selector,
.lang-mega-active-trigger .gt-current-wrapper + ul,
.lang-mega-active-trigger > .sub-menu {
    display: none !important;
}

/* ========================================
   Currency Switch Toast
   ======================================== */

.lc-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 1000000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.lc-toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.lc-toast-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.08);
    padding: 16px 20px;
    max-width: 560px;
    min-width: 380px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.06);
}

.lc-toast-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFF0F0;
    border-radius: 10px;
}

.lc-toast-body {
    flex: 1;
    min-width: 0;
}

.lc-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 2px;
    line-height: 1.4;
}

.lc-toast-sub {
    font-size: 12px;
    color: #888;
    margin: 0;
    line-height: 1.4;
}

.lc-toast-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.lc-toast-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
}

.lc-toast-btn:active {
    transform: scale(0.97);
}

.lc-toast-accept {
    background: #ff3131;
    color: #fff;
}

.lc-toast-accept:hover {
    background: #e02828;
}

.lc-toast-dismiss {
    background: #f0f0f0;
    color: #555;
}

.lc-toast-dismiss:hover {
    background: #e4e4e4;
}

.lc-toast-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    color: #999;
    transition: color 0.15s, border-color 0.15s;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.lc-toast-close:hover {
    color: #333;
    border-color: #bbb;
}

/* ========================================
   Mobile: full-screen overlay
   ======================================== */

.lang-mega-close {
    display: none;
}

@media (max-width: 1024px) {
    
    .lang-mega-dropdown {
        position: fixed;
        top: 0 !important;
        left: 0 !important;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateY(100%);
        opacity: 1;
        visibility: hidden;
        transition: transform 0.32s ease, visibility 0.32s ease;
        box-shadow: none;
    }

    .lang-mega-dropdown.visible {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .lang-mega-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        top: 0;
        z-index: 10;
        background: #fff;
        border-bottom: 1px solid #eee;
        padding: 14px 20px;
        font-size: 15px;
        font-weight: 600;
        color: #333;
        cursor: pointer;
    }

    .lang-mega-close-x {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        color: #999;
        border-radius: 50%;
        transition: background 0.15s;
    }

    .lang-mega-close-x:active {
        background: #f0f0f0;
    }

    .lang-mega-inner {
        flex-direction: column;
        min-height: auto;
        padding: 0;
    }

    .lang-mega-regions {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 0;
        gap: 0;
        flex-shrink: 0;
    }

    #langMegaDropdown .lang-region-item {
        white-space: nowrap;
        padding: 14px 18px;
        font-size: 13px;
        border-bottom: 2px solid transparent;
        flex-shrink: 0;
    }

    #langMegaDropdown .lang-region-item.active {
        border-bottom-color: #ff3131;
    }

    .lang-mega-countries {
        padding: 16px;
    }

    .lang-country-group {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    #langMegaDropdown .lang-country-item {
        padding: 12px 14px;
        font-size: 15px;
    }

    .lang-mega-currencies {
        width: 100%;
        border-left: none;
        border-top: 1px solid #eee;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 16px;
        gap: 8px;
    }

    .lang-mega-currencies-title {
        width: 100%;
        padding: 0 0 8px;
    }

    #langMegaDropdown .lang-currency-item {
        padding: 10px 16px;
        border: 1px solid #eee;
        border-radius: 8px;
        font-size: 13px;
        gap: 6px;
    }

    #langMegaDropdown .lang-currency-item.active {
        border-color: #ff3131;
    }
}


@media (max-width: 1024px) {
    /* Let all clicks pass through to the <li> trigger */
    .lang-mega-active-trigger .nav-item-wrapper,
    .lang-mega-active-trigger .gt_float_switcher,
    .lang-mega-active-trigger .gt-selected,
    .lang-mega-active-trigger .gt-current-lang,
    .lang-mega-active-trigger .gt_options,
    .lang-mega-active-trigger #gt_float_wrapper,
    .lang-mega-active-trigger img,
    .lang-mega-active-trigger span {
        pointer-events: none;
    }
}

@media (max-width: 600px) {
    li.menu-item.menu-item-gtranslate.lang-mega-active-trigger > .nav-item-wrapper > div{
        position: unset !important;
    }
    #gt_float_wrapper,
    .gt_float_switcher,
    .gt_float_switcher .gt-selected .gt-current-lang{
        width: 100%;
    }
    .lc-toast-inner {
        flex-wrap: wrap;
        min-width: 0;
        max-width: calc(100vw - 32px);
        gap: 10px;
        padding: 14px 16px;
    }
    .lc-toast-actions {
        width: 100%;
    }
    .lc-toast-btn {
        flex: 1;
        text-align: center;
    }
}
