/**
 * GLOBALCORP Multilingual - Frontend Switcher Styles
 * @author nhuynhduc.com
 */

/* ==========================================================================
   Language Dropdown Component
   ========================================================================== */

.gc-lang-dropdown-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    font-family: inherit;
    font-size: 13px;
    z-index: 999;
}

.gc-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1e293b;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gc-lang-toggle:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.gc-lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.gc-lang-chevron {
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.gc-lang-dropdown-wrapper:hover .gc-lang-chevron,
.gc-lang-dropdown-wrapper:focus-within .gc-lang-chevron {
    transform: rotate(180deg);
}

.gc-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15), 0 4px 8px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gc-lang-dropdown-wrapper:hover .gc-lang-menu,
.gc-lang-dropdown-wrapper:focus-within .gc-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gc-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #334155 !important;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gc-lang-option:hover {
    background: #f1f5f9;
    color: #0f172a !important;
}

.gc-lang-option.is-selected {
    background: #eff6ff;
    color: #1e40af !important;
    font-weight: 600;
}

.gc-lang-check {
    margin-left: auto;
}

/* ==========================================================================
   Inline Style Switcher
   ========================================================================== */

.gc-lang-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gc-lang-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none !important;
    color: #64748b !important;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.gc-lang-item:hover {
    color: #0f172a !important;
    background: rgba(0, 0, 0, 0.04);
}

.gc-lang-item.is-active {
    color: #1e40af !important;
    background: #eff6ff;
}

/* ==========================================================================
   Flatsome Header Specific Fixes
   ========================================================================== */

.header-nav .gc-lang-dropdown-wrapper {
    margin: 0 8px;
}

/* Trong chế độ mobile hoặc dark header */
.header.dark .gc-lang-toggle {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.header.dark .gc-lang-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}
