/* General styles for language and brand switchers */
.vinut-showcase-switcher {
    padding: 10px;
}

/* Fullwidth style (theo chiều rộng website) */
.vinut-showcase-fullwidth {
    width: 100%; /* Kéo dài theo chiều rộng website */
    max-width: none; /* Không giới hạn chiều rộng */
}

/* Popup style (giới hạn chiều rộng và canh giữa) */
.vinut-showcase-popup {
    max-width: 600px; /* Giới hạn chiều rộng tối đa của popup */
    margin: 0 auto; /* Canh giữa */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* List styles for language and brand */
.vinut-showcase-language-list,
.vinut-showcase-brand-list {
    display: flex;
    flex-wrap: wrap; /* Tự động xuống dòng */
    gap: 10px;
    justify-content: center;
    align-items: center;
}

/* Style for individual language and brand items */
.language-item,
.brand-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    margin: 5px;
    flex: 0 1 auto;
}

/* Style for flags and logos */
.language-item .flag,
.brand-item .brand-logo {
    margin-right: 8px;
    width: 24px;
    height: 16px;
}

/* Text styling */
.language-text,
.brand-text {
    font-size: 14px;
    white-space: normal;
    word-wrap: break-word;
    max-width: 120px;
}

/* Dropdown styles for language and brand */
.vinut-showcase-language-dropdown,
.vinut-showcase-brand-dropdown {
    position: relative;
    font-family: Arial, sans-serif;
}

/* Điều chỉnh chiều rộng dropdown theo position */
.vinut-showcase-fullwidth .vinut-showcase-language-dropdown,
.vinut-showcase-fullwidth .vinut-showcase-brand-dropdown {
    width: 160px;
    margin: 0 auto;
}

.vinut-showcase-popup .vinut-showcase-language-dropdown,
.vinut-showcase-popup .vinut-showcase-brand-dropdown {
    width: 160px;
    margin: 0 auto;
}

/* Dropdown header */
.dropdown-header {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-header:hover {
    border-color: #999;
}

.dropdown-header .flag,
.dropdown-header .brand-logo {
    margin-right: 8px;
}

.dropdown-text {
    font-size: 14px;
    flex-grow: 1;
    text-align: center;
}

/* Dropdown arrow */
.dropdown-arrow {
    font-size: 12px;
    color: #666;
}

/* Dropdown list */
.dropdown-list {
    display: none;
    position: absolute;
    top: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

/* Điều chỉnh vị trí và chiều rộng dropdown list theo position */
.vinut-showcase-fullwidth .dropdown-list {
    left: 0;
    right: 0;
    width: 160px;
    margin: 0 auto;
}

.vinut-showcase-popup .dropdown-list {
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    max-width: 90%;
}

/* Dropdown items */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item .flag,
.dropdown-item .brand-logo {
    margin-right: 8px;
    width: 24px;
    height: 16px;
}

.dropdown-item .dropdown-text {
    font-size: 14px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    max-width: 150px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .vinut-showcase-fullwidth,
    .vinut-showcase-popup {
        max-width: 100%;
        padding: 5px;
    }

    .vinut-showcase-language-list,
    .vinut-showcase-brand-list {
        flex-direction: column;
        align-items: center;
    }

    .language-text,
    .brand-text {
        display: none;
    }

    .language-item .flag,
    .brand-item .brand-logo {
        margin-right: 0;
    }

    .vinut-showcase-fullwidth .vinut-showcase-language-dropdown,
    .vinut-showcase-fullwidth .vinut-showcase-brand-dropdown,
    .vinut-showcase-popup .vinut-showcase-language-dropdown,
    .vinut-showcase-popup .vinut-showcase-brand-dropdown {
        width: 100%;
        max-width: 200px;
    }

    .vinut-showcase-fullwidth .dropdown-list,
    .vinut-showcase-popup .dropdown-list {
        width: 180px;
        max-width: 90%;
    }
}

/* Fix for container */
.vinut-showcase-switcher {
    overflow: hidden;
}