/**
 * Top-bar user + SNS dropdown (parts/header/top-bar.php)
 * - 기존 인라인 <style> 외부화
 * - PC: hover 로 열기, Mobile: js/top-bar.js 의 .is-open 토글
 *
 * 이 파일(이슈데이)에는 .top-bar.pop 래퍼가 없으므로
 * "고정 위치/우측 정렬"은 user-icons-inner 가 담당
 */

/* 상단 우측 고정(원하면 top 값만 조절) */
.user-icons-inner {
    top: 8px;
    left: 0;
    right: 0;
    z-index: 9999;

    display: flex;
    justify-content: flex-end;

    /* 사이트 너비 정책(원래 쓰던 1400 유지) */
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 12px;
    width: 100%;
    padding: 8px 0;
}

/* hover 범위를 내용만큼만 */
.user-icon-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;

    width: auto;
    flex: 0 0 auto;
    margin: 0;
}

/* 프로필 링크 */
.user-profile a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
    color: #000;
}

/* 드롭다운(SNS 메뉴) */
.user-icon-box>.sns-icons {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;

    background: var(--dark-color);
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);

    display: flex;
    gap: 6px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;

    z-index: 99999;
    white-space: nowrap;
}

/* 아이콘 버튼 공통 */
.user-icon-box>.sns-icons>a {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;

    background: #fff;
    color: #000;
    text-decoration: none;
}

/* hover */
.user-icon-box>.sns-icons>a:hover {
    background: var(--primary-color);
}

.user-icon-box>.sns-icons>a:hover i {
    color: #fff;
}

/* PC: user-profile 에 hover/focus 되었을 때만 열기 + 메뉴 위에서도 유지 */
@media (hover:hover) and (pointer:fine) {

    .user-profile:hover+.sns-icons,
    .user-profile:focus-within+.sns-icons,
    .sns-icons:hover {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* 모바일: JS 토글용 */
.user-icon-box.is-open>.sns-icons {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 576px) {
    .user-profile {
        display: initial;
    }
}
