/**
 * Unified Translation Dropdown Styles
 * This file contains all styles for the translation dropdown
 * Used across all layouts: login, auth, and index
 */

/* Hide page content until translation is applied */
body:not(.translated-ltr):not(.translated-rtl):not(.skiptranslate) {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

/* Show page content after translation is applied */
body.translated-ltr,
body.translated-rtl {
    opacity: 1;
}

/* Ensure translation element is hidden */
#google_translate_element,
.skiptranslate {
    display: none !important;
}

/* Hide Google Translate branding/logo */
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf {
    display: none !important;
}

.VIpgJd-ZVi9od-aZ2wEe-OiiCO {
    display: none !important;
}

.VIpgJd-ZVi9od-aZ2wEe {
    display: none !important;
}

/* Dropdown Button Styles */
.dropdown button {
    background-color: #202022;
    min-width: 130px;
    width: max-content;
    height: 40px;
    border-radius: 5px;
    color: white;
    padding: 10px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    justify-content: space-evenly;
}

.dropdown button img {
    margin: 0 5px 0 0;
}

.dropdown button img,
.dropdown-content li img {
    width: 28px;
}

.dropdown button,
.dropdown-content li {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-family: "Open Sans", sans-serif;
    font-family: "Noto Sans JP", sans-serif;
    font-family: "Noto Sans Arabic", sans-serif;
    font-family: "Noto Sans KR", sans-serif;
    font-weight: 500;
}

.arrow-down {
    width: 0;
    height: 0;
    display: inline-block;
    vertical-align: middle;
    border-style: solid;
    border-width: 4px 4px 0 4px;
    border-color: #fff transparent transparent transparent;
    margin: 0 0 0 5px;
}

.dropdown button:hover {
    cursor: pointer;
    background-color: #24242b;
}

/* Dropdown Content Styles */
.dropdown-content {
    display: none;
    position: absolute;
    margin: 1px 0 0 0;
    padding: 0;
    background: #121216;
    border: 1px solid #383847;
    min-width: 160px;
    z-index: 1;
    border-radius: 5px;
    overflow-y: scroll;
    max-height: 315px;
}

/* Dropdown Content Items */
.dropdown-content li {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    justify-content: end;
}

.dropdown-content li img {
    margin: 0 20px 0px 20px;
}

/* Dropdown Content Items Hover */
.dropdown-content li:hover {
    background-color: #24242b;
    cursor: pointer;
    color: #fafaff;
    border-radius: 0;
}

/* Prevent dropdown from closing when clicking on items */
.dropdown-content li {
    pointer-events: auto;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Show dropdown when focused */
.dropdown:focus-within .dropdown-content {
    display: block;
}

/* Keep dropdown open when data-keep-open is set */
.dropdown[data-keep-open="true"] .dropdown-content {
    display: block !important;
}

/* Keep dropdown open when clicking on items */
.dropdown-content li:active {
    background-color: #24242b;
}

/* Dropdown Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-content {
    animation: slideIn 0.3s ease-out;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: #2C2F33;
}

::-webkit-scrollbar-thumb:hover {
    background: #3A3D42;
}

::-webkit-scrollbar-track {
    background: #1E2024;
}

/* Special styles for footer dropdown (lang class) */
.lang .dropdown-content {
    bottom: calc(100% + 10px);
    top: auto;
}

/* Special background color for auth layout footer */
.layouts-auth-footer .dropdown button {
    background-color: #24262b;
}

.layouts-auth-footer .dropdown button:hover {
    background-color: #24262b;
}

/* Special scrollbar for auth layout footer */
.layouts-auth-footer ::-webkit-scrollbar-thumb {
    background: #2C2F33;
}

.layouts-auth-footer ::-webkit-scrollbar-thumb:hover {
    background: #3A3D42;
}

