/* ===== LinkWheel Fix (Ghost List Removed) ===== */

/* 1. 배경 설정: 전체 회색 띠 */
.lw-clean-wrapper {
    width: 100%;
    background-color: #e1e1e1; /* 푸터 배경색과 동일 */
    border-top: none !important;
    padding: 15px 0;
    box-sizing: border-box;
    font-family: 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    position: relative;
    z-index: 10;
}

/* 2. 내용물 정렬: 중앙 1200px */
.lw-clean-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: right; /* 버튼 우측 정렬 */
    padding: 0 15px;
    box-sizing: border-box;
}

/* 3. [중요] 도망가는 리스트 붙잡는 닻 역할 */
.lw-details {
    display: inline-block;
    position: relative; /* ★ 이게 없어서 저 위로 날아갔던 겁니다! ★ */
}

/* 4. 버튼 디자인 (흰색 박스) */
.lw-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 180px;
    height: 36px;
    padding: 0 15px;
    background-color: #f1f1f1;
    border: 1px solid #c0c0c0;
    color: #444;
    font-size: 12px;
    cursor: pointer;
    list-style: none; /* 화살표 제거 */
    box-sizing: border-box;
    transition: border 0.2s;
}

/* 크롬 기본 화살표 제거 */
.lw-summary::-webkit-details-marker { display: none; }

.lw-summary:hover {
    border-color: #888;
    color: #222;
}

/* 화살표 아이콘 */
.lw-arrow {
    width: 6px;
    height: 6px;
    border-top: 1px solid #666;
    border-right: 1px solid #666;
    transform: rotate(-45deg); /* 위쪽 방향 */
    margin-top: 3px;
    transition: transform 0.2s;
}

.lw-details[open] .lw-arrow {
    transform: rotate(135deg); /* 아래쪽 방향 */
    margin-top: -2px;
}

/* 5. [수정] 펼쳐지는 박스 위치 및 디자인 */
.lw-dropdown-box {
    position: absolute;
    /* 버튼 바로 위에 위치하도록 설정 */
    bottom: 37px; /* 버튼 높이(36px) + 1px */
    right: 0;     /* 버튼의 오른쪽 끝선에 맞춤 */
    
    width: 180px; /* 버튼이랑 똑같은 너비 */
    max-height: 250px; /* 너무 길면 스크롤 */
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 9999; /* 제일 위에 뜨게 */
    text-align: left;
}

/* 리스트 스타일 초기화 (테마 영향 방지) */
.lw-dropdown-box ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lw-dropdown-box li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* 링크 스타일 */
.lw-dropdown-box li a {
    display: block;
    padding: 8px 15px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
    line-height: 1.4;
}

.lw-dropdown-box li:last-child a {
    border-bottom: none;
}

.lw-dropdown-box li a:hover {
    background-color: #f0f0f0;
    color: #000;
}

/* 스크롤바 디자인 */
.lw-dropdown-box::-webkit-scrollbar { width: 5px; }
.lw-dropdown-box::-webkit-scrollbar-thumb { background: #bbb; }