/* Style GTranslate container */
.gtranslate_wrapper,
.gt_float_wrapper,
.gt_float_switcher {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    max-width: 200px;
    z-index: 1000;
}

.gt_float_switcher .gt_options.gt-open a {
    padding: 10px 15px !important;
    color: #444 !important;
    font-weight: 600 !important;
}

/* Style the selected language (toggle button) */
.gt_float_switcher .gt-selected {
    font-size: 14px;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23333" d="M6 9l4-5H2z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.gt_float_switcher .gt-selected:hover,
.gt_float_switcher .gt-selected:focus {
    border-color: #007bff;
    outline: none;
}

/* Style the dropdown options */
.gt_float_switcher .gt_options {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background-color: #fff;
    z-index: 1001;
    min-width: 150px;
    max-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 4px;
    list-style: none;
    padding: 0;
}

/* Show dropdown when active */
.gt_float_switcher .gt_options[style*="display: block"],
.gt_float_switcher .gt_options.active {
    display: block !important;
}

/* Style individual options */
.gt_float_switcher .gt_options a {
    font-size: 14px;
    align-items: center;
    text-decoration: none;
    display: block;
    padding: 10px 15px !important;
    color: #444 !important;
    font-weight: 600 !important;
}

.gt_float_switcher .gt_options a:hover {
    background-color: var(--primary-color2) !important;
    color: #fff !important;
}

/* Flag styling */
.gt_float_switcher .gt-selected img,
.gt_float_switcher .gt_options img {
    width: 20px;
    height: 14px;
    margin-right: 5px;
}

/* Ensure header layout is unaffected */
.gtranslate_wrapper,
.gt_float_wrapper,
.gt_float_switcher {
    float: none !important;
    overflow: visible !important;
    max-width: 200px;
}

/* Prevent jumping by overriding dynamic styles */
.gt_float_switcher .gt_options {
    transform: none !important;
    transition: none !important;
}

.gt_float_switcher .gt_options.gt-open {
    display: block !important;
    overflow: hidden !important;
}

.gt_float_switcher .gt-lang-code {
    color: #fff;
    font-weight: 600 !important;
}