/* 내비바 */
#wrapper {
    display: flex;
    position: relative; /* 부모 요소에 상대 위치를 적용 */
}

#sidebar {
    display: flex;
    height: 100vh;
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out; /* 부드러운 전환 */
    background-color: #414A58;
    color: white;
    overflow-y: auto;
    z-index: 1000;
    position: fixed; /* 위치를 고정하여 left를 이용해 이동 가능하게 설정 */
    top: 0;
    left: 0; /* 기본적으로 사이드바가 화면에 보이는 위치 */
}

#sidebar.collapsed {
    left: -290px;
}

#bluebar {
    width: 50px;    /* 블루바의 너비 */
    height: 100vh;
    background-color: #313842;
    color: #fff;
    z-index: 999;
    text-align: center;
    opacity: 1;
    visibility: visible;
}

#bluebar > p {
    transform: matrix(0, -1, 1, 0, 0, 0);
    line-height: 50px;
    white-space: nowrap;
    width: max-content;
    padding: 0 20px;
    height: 120px;
    opacity: 0.3;
}

#sidebar-content {
    width: 240px;
    flex-grow: 1;
    overflow-y: auto;
}

#topbar {
    position: fixed;
    transition: left 0.3s ease-in-out, width 0.3s ease-in-out; /* 부드러운 전환 */
    width: calc(100% - 290px);
    left: 290px;
    top: 0;
    z-index: 1020;
    border-bottom: 1px solid #0000001a;
    height: 71px;
    padding: 0 10px;
}

#topbar.full-width {
    width: 100%;
    left: 0;
}

#searchType {
    width: 150px;
}

#keyword {
    flex-grow: 1;
    width: 300px;
}

#content {
    flex-grow: 1;
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out; /* 부드러운 전환 */
    width: calc(100% - 290px);
    margin-left: 290px; /* 사이드바 열렸을 때의 여백 */
    margin-top: 70px;
}

#divContent {
    min-height: calc(100vh - 324px);
}

#content.full-width, footer.full-width {
    margin-left: 0; /* 사이드바가 숨겨졌을 때 콘텐츠가 화면 전체를 차지하도록 */
    width: 100%;
}

/* footer */
footer {
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out; /* 부드러운 전환 */
    background-color: #F6F6F6;
    opacity: 0.5;
    display: block;
    box-sizing: border-box;
    width: calc(100% - 290px);
    margin-left: 290px; /* 사이드바 열렸을 때의 여백 */
    margin-top: 2em;
}
footer .copy {
    padding: 26px 42px;
}
footer h1 {
    color: #78787B;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1em;
}

footer .vr {
    margin-left: 6px;
    margin-right: 6px;
    height: 17px;
    color: black;
}

/* 로고 */
.sidebar-header > div {
    margin: 0;
    padding: 18px 0;
    height: 71px;
}

/* 밑줄 */
.bottom-border {
    border-bottom: 1px solid #e4e4e4;
}

.sidebar, .sidebar-active, .sidebar-header, .sidebar-sublink, .bottom-border {
    border-color: #ffffff25;
}

/* 페이지 이동 때 해당되는 페이지에 사이드바 메뉴 컬러 지정 */
.sidebar-active {
    background-color: #313842 !important;
    border-radius: 5px;
}

/* 서브메뉴 설정 */
.sidebar .nav .nav-item .nav-link.sidebar-sublink {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* 사이드바 메뉴 호버 시 배경색 변경 */
.sidebar-link:hover, .sidebar-sublink:hover {
    background-color: #405472;
    border-radius: 5px;
}

/* 호버 시 아이콘 애니메이션 설정 */
.nav-link .sidebar-link:hover > svg::before, .sidebar-sublink:hover > svg::before {
    animation: swing ease-in-out 0.5s 1 alternate;
}

.sidebar-link:hover > svg, .sidebar-link:hover span > svg, .sidebar-link:hover div div > svg {
    display: inline-block;
    animation: swing ease-in-out 0.5s 1 alternate;
}

/* 메뉴 글씨 스타일 */
.sidebar-menu-name {
    font-weight: 600;
    font-size: 1.1em;
    line-height: 1em;
}

/* swing 애니메이션 정의 */
@keyframes swing {
    0% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(10deg);
    }
    30% {
        transform: rotate(0deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(0deg);
    }
    60% {
        transform: rotate(5deg);
    }
    70% {
        transform: rotate(0deg);
    }
    80% {
        transform: rotate(-5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* 정보 수정 버튼 */
button.btn_gray {
    background-color: #DFE1E7;
    color: #2A2B6A;
    font-weight: 600;
    font-size: 11px;
}
button.btn_gray:hover {
    background-color: #c3c4ce;
    color: #3a3b93;
}
.user-info-icon {
    font-size: 0.78rem;
    margin-left: 0.3rem;
}

/* 매뉴얼 버튼 */
.popup-toggle {
    border-radius: 99999px;
    padding: 7px 7px;
    display: flex;
    align-items: center;
    --bs-btn-font-size: 1.9em;
    color: #989898de;
}

.popup-toggle:active, .logoutBtn:active {
    border-color: #00000000 !important;
    background-color: #d7d7d738 !important;
}

.popup-toggle:hover, .logoutBtn:hover {
    border: 1px solid #00000000;
    background-color: #d7d7d738 !important;
}

.topbar-popup {
    position: absolute;
    top: 60px; /* 버튼 위치에 따라 조정 */
    background-color: #f3f3f3;
    box-shadow: 0 4px 14px rgb(0 0 0 / 45%);
    padding: 20px;
    border-radius: 5px;
    width: 400px;
    opacity: 0;
    transform: scale(0.9); /* 약간 축소된 상태에서 시작 */
    transition: all 0.3s ease-in-out;
    pointer-events: none; /* 클릭 불가 상태로 전환 */
    visibility: hidden; /* 요소를 화면에서 숨김 */
    z-index: 1200;
}

.topbar-popup.show {
    opacity: 1;
    transform: scale(1); /* 원래 크기로 복원 */
    pointer-events: auto; /* 클릭 가능 상태로 전환 */
    visibility: visible; /* 요소를 화면에 표시 */
}

.custom-popup-hd .custom-popup-close {
    margin: 4px 0 20px 0;
}

.custom-popup-content .list-group-item, .custom-popup-content .accordion {
    border-color: #f3f3f3 !important;
    --bs-accordion-border-color: #f3f3f3;
}

/* 팝업 컨텐트 CSS */
/* 매뉴얼 */
.update-title {
    font-size: .875rem;
    font-weight: 600;
    display: flex;
    width: 100%;
    line-height: 1.375rem;;
}

.update-date {
    font-size: .75rem;
    font-weight: 400;
    color: #666974;
    display: flex;
    width: 100%;
    line-height: 1rem;
}

.accordion-button:not(.collapsed) {
    color: #000;
    background-color: rgba(0, 0, 0, 0);
}

/* 사용자 팝업 */
.popup-content-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.popup-user-name {
    font-size: 1.6em;
    font-weight: 600;
    color: #1C1C1C;
    margin: 4px 0 10px 0;
    display: block;
}
.popup-user-id {
    font-size: 1.2em;
    font-weight: 600;
    color: #313842;
}
.popup-content-middle {
    margin-bottom: 20px;
}
.popup-content-bottom {
    background-color: white;
    border-radius: 0.375rem;
    padding: 20px 16px;
}
.workLog_hd {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.workLog_hd .btn {
    background-color: #efefef;
}
.workLog_hd .btn:active {
    background-color: #d8d8d8;
    border-color: #d8d8d8;
}
.workLog_title {
    font-size: 1.2em;
    font-weight: 600;
    color: #313842;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.workLog-body-wrapper {
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1* var(--bs-gutter-y));
    margin-right: calc(-.5* var(--bs-gutter-x));
    margin-left: calc(-.5* var(--bs-gutter-x));
}

.close-sidebar-btn {
    top: 10px;
    right: 10px;
    cursor: pointer;
}

.menu-icon {
    width: 0;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
    pointer-events: none; /* 이걸 빼고 JS로 조절 */
}

/* 숨김 상태: 왼쪽으로 벗어남 + 흐림 */
.menu-icon.offscreen {
    transform: translateX(-60px);
    opacity: 0;
    pointer-events: none;
}

/* 메뉴 등장 시 */
.menu-icon.onscreen {
    width: 28px;
    opacity: 1;
    transform: translateX(0);
    cursor: pointer;
}

.new-badge {
    height: 20px;
    width: 20px;
}