.custom-lang-switcher-container {
    position: relative;
    font-family: inherit;
    display: inline-block;
    max-width: 100%;
}

.custom-lang-selector {
    position: relative;
    user-select: none;
    max-width: 100%;
}

.custom-lang-selector .lang-toggle {
    background: transparent;
    border: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    line-height: 1;
    max-width: 100%;
    box-sizing: border-box;
}

.custom-lang-selector .lang-toggle .lang-current-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; /* Important for ellipsis to work */
}

.custom-lang-selector .lang-toggle:hover {
    opacity: 0.9;
}

.custom-lang-selector .lang-toggle .main-icon-wrapper,
.custom-lang-selector .lang-toggle .chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.custom-lang-selector .lang-toggle svg,
.custom-lang-selector .lang-toggle i {
    width: 1em;
    height: 1em;
    fill: currentColor;
    stroke: none; /* FontAwesome icons don't need stroke */
}

/* Specific fix for SVG icons that might have stroke instead of fill */
.custom-lang-selector .lang-toggle svg[fill="none"] {
    stroke: currentColor;
    fill: none;
}

.custom-lang-selector .lang-toggle .chevron {
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.custom-lang-selector.open .lang-toggle .chevron {
    transform: rotate(180deg);
}

.custom-lang-selector .lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 150px;
    background-color: #fff;
    border-radius: 6px;
    padding: 6px 0;
    margin: 4px 0 0;
    list-style: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.custom-lang-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-lang-selector .lang-dropdown li {
    padding: 10px 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Hide icons in the dropdown list while keeping them for the toggle logic */
.custom-lang-selector .lang-dropdown li .item-icon {
    display: none !important;
}

.custom-lang-selector .lang-dropdown li .item-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
}

.custom-lang-selector .lang-dropdown li:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Hide the Google translate top bar */
.skiptranslate iframe,
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}
body {
    top: 0px !important;
}
