/* 언어 선택기 스타일 */
.header-language-selector {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 16px;
    cursor: pointer;
}

.header-language-current {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
}

.header-language-current:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.header-language-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 언어 드롭다운 메뉴 - 좌측 가로 방향 */
.header-language-dropdown {
    position: absolute;
    top: 50%;
    right: calc(100% + 8px);
    transform: translateY(-50%) translateX(10px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: row;
    gap: 4px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100001;
    overflow: visible;
}

.header-language-selector.open .header-language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.header-language-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    position: relative;
}

.header-language-option:hover {
    background: #f5f5f5;
    transform: scale(1.1);
}

.header-language-option.active {
    background: #e8f5e9;
    box-shadow: 0 0 0 2px #00d282;
}

.header-language-option-flag {
    width: 28px;
    height: 21px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 다크모드 스타일 */
body.dark-theme .header-language-dropdown {
    background: #2a2a2a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body.dark-theme .header-language-option {
    color: #fff;
}

body.dark-theme .header-language-option:hover {
    background: #3a3a3a;
}

body.dark-theme .header-language-option.active {
    background: #1b4332;
    box-shadow: 0 0 0 2px #00d282;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .header-language-selector {
        margin-left: 8px;
    }

    .header-language-current {
        padding: 6px;
        width: 32px;
        height: 32px;
    }

    .header-language-flag {
        width: 20px;
        height: 15px;
    }

    .header-language-dropdown {
        padding: 6px;
        gap: 2px;
    }

    .header-language-option {
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    .header-language-option-flag {
        width: 24px;
        height: 18px;
    }
}
