/* static/css/header.css */

/* --- 상단 네비게이션 바 --- */
#main-navbar {
    background-color: var(--header-background);
    padding: 0 15px;
    position: fixed; /* 화면 상단 고정 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1070; /* 다른 요소 위에 오도록 */
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-size: 1.3em; /* 크기 조정됨 */
    font-weight: 600;
    color: var(--header-hover-text-color);
    text-decoration: none;
    margin-right: 20px;
    white-space: nowrap;
}
.navbar-brand:hover {
    color: var(--header-hover-text-color);
    text-decoration: none;
}


.navbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.navbar-menu li {
    margin-left: 18px;
}

.navbar-menu a, .navbar-menu .username-display {
    color: var(--header-text-color);
    text-decoration: none;
    padding: 8px 0;
    display: block;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.navbar-menu a:hover {
    color: var(--header-hover-text-color);
    text-decoration: none;
}
.username-display {
    font-size: 0.95em;
    cursor: default;
}

/* 설정 아이콘 버튼 */
.icon-button {
    background: none;
    border: none;
    color: var(--header-text-color);
    font-size: 1.25em;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 0.2s ease;
}
.icon-button:hover {
    color: var(--header-hover-text-color);
}

/* 드롭다운 메뉴 */
.dropdown {
    position: relative;
}
.dropdown-menu {
    display: none; /* 기본 숨김 */
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: var(--secondary-background-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--modal-shadow);
    border-radius: 6px;
    padding: 8px 0;
    min-width: 180px;
    z-index: 1080; /* 헤더보다 위에 오도록 */
    list-style: none;
    margin: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.dropdown-menu.show {
    display: block; /* JS에서 이 클래스 추가 시 보임 */
    opacity: 1;
    transform: translateY(0);
}
.dropdown-menu li {
    /* display: block; */ /* 기본 list-item */
}
.dropdown-menu li a {
    display: block; /* 링크 영역을 블록으로 */
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.95em;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.dropdown-menu li a:hover {
    background-color: var(--hover-background-color);
    color: var(--text-color);
    text-decoration: none;
}
.dropdown-divider {
    display: block; /* 구분선 보이게 */
    height: 1px;
    margin: 8px 0;
    overflow: hidden;
    background-color: var(--border-color);
    border: 0;
}

/* Hamburger Button (Mobile) */
#sidebar-toggle-button {
    display: none; background: none; border: none; padding: 10px; cursor: pointer;
    z-index: 1100; margin-right: 10px; order: -1;
}
#sidebar-toggle-button span {
    display: block; width: 24px; height: 3px;
    background-color: var(--header-hover-text-color);
    margin: 5px 0; transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 1px;
}

/* Overlay (Mobile) */
#sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 1050; opacity: 0;
    visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}