.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 사이드바 오픈 버튼 */
.open-btn {
    display: none;
    background: url('https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/sidemenu.svg') no-repeat center/cover;
    width: 30px;
    height: 30px;
    margin: 10px;
}

.open-btn:hover {
    background: url('https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/arrowopen.svg') no-repeat center/cover;
    transition: all 0.2s;
}

/* 사이드바 */
.sidebar {
    position: relative;
    width: 270px;
    /* 최소 사이즈 제한 */
    min-width: 245px;
    /* 최대 사이즈 제한 */
    max-width: 475px;
    /* 창 최대 높이 */
    height: 100vh;
    max-height: 100%;
    background: #F9F8F7;
    border-right: 1px solid #eeeeec;
    padding: 10px 10px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    padding-right: 0;
}

.sidebar-title {
    font-size: 2rem;
    font-weight: 500;
    color: #4b4b4b
}

.create-root-btn,
.hide-btn {
    background: #818181;
    border: none;
    color: #fff;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    width: 28px;
    height: 28px;
}

.create-root-btn {
    background: url('https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/headercreate.svg') no-repeat center/cover;
}

.create-root-btn:hover,
.hide-btn:hover {
    background-color: rgba(42, 28, 0, 0.07);
}

.hide-btn {
    background: url('https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/arrowhide.svg') no-repeat center/cover;
}

.sidebar-features {
    font-size: 1.4rem;
    font-weight: 500;
    color: #777777
}

.sidebar-feature {
    position: relative;
    display: flex;
}

.sidebar-feature {
    padding: 3px 10px;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 6px;
}

.sidebar-feature:hover {
    background-color: rgba(42, 28, 0, 0.07);
}

.sidebar-feature:nth-child(1)::before {
    content: "";
    display: inline-block;
    width: 21px;
    height: 21px;
    margin-right: 6px;
    background: url("https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/search.svg") no-repeat center/cover;
}

/* 두 번째 sidebar-feature (홈 아이콘) */
.sidebar-feature:nth-child(2)::before {
    content: "";
    display: inline-block;
    position: absolute;
    width: 21px;
    height: 21px;
    background: url("https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/home.svg") no-repeat center/cover;
}

.sidebar-feature a {
    display: block;
    width: 100%;
    height: 100%;
    padding-left: 27px;
}

.myPage {
    font-size: 1.4rem;
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 3px 10px;
}

/* 드래그 핸들 */
.resizer {
    width: 5px;
    cursor: col-resize;
    background: transparent;
}

.resizer:hover {
    background: #ddd;
}

/* 편집기 */
main {
    position: relative;
    width: 100%;
    height: 100%;
}


main header .title {
    font-size: 2rem;
    margin-left: 20px;
    font-weight: 600;
}

.save-status {
    opacity: 0.9;
    font-size: 2rem;
    color: #28a745;
    min-width: 90px;
}

.editor {
    width: 60%;
    height: 100%;
    margin: 200px auto;
    overflow-y: auto;
}

.editor-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
}

input,
textarea {
    font-family: 'Pretendard', sans-serif;
    outline: none;
}

.document-title {
    width: 100%;
    height: 70px;
    font-size: 5rem;
    font-weight: 700;
    padding: 10px;
    border: none;
    border-radius: 4px;
}

.document-title::placeholder {
    color: #e4e4e4;
}

.editor-content {
    width: 100%;
    height: 300px;
    padding: 10px;
    font-size: 1.6rem;
    font-weight: 200;
    border: none;
    border-radius: 4px;
    resize: none;
}

.editor-content::placeholder {
    color: #757575;
}

/* delete btn */
.delete-btn {
    background: url('https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/delete.svg') no-repeat center/cover;
    background-size: 16px 16px;
}

.add-btn {
    background: url('https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/plus.svg') no-repeat center/cover;
    background-size: 16px 16px;
}

.delete-btn:hover,
.add-btn:hover {
    opacity: 0.8;
    background-color: rgba(42, 28, 0, 0.07);
    border-radius: 2px;
}

/* 트리 기본 */
.document-tree,
.document-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 각 행 전체가 hover 대상 */
.title-div,
.emptyLi {
    transition: background-color 0.15s ease;
    cursor: default;
    width: 100%;
    padding: 3px 10px;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 3px;
}

.title-div:hover,
.emptyLi:hover {
    background-color: rgba(42, 28, 0, 0.07);
}

/* on */
.document-tree .title-div.on {
    background-color: rgba(42, 28, 0, 0.07);
}

/* toggle 버튼 hover */
.toggle-btn {
    transition: all 0.15s ease;
    background: url('https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/toggle.svg') no-repeat center/cover;
    background-size: 12px 12px;
}

.toggle-btn:hover {
    background-color: rgba(42, 28, 0, 0.07);
    border-radius: 2px;
}

/* search-popup */
.search-popup {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    min-width: 500px;
    max-height: 1000px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    padding: 5px;
}

.search-popup input {
    width: 100%;
    height: 50px;
    font-size: 2.4rem;
    padding: 5px 8px 5px 50px;
    background: url('https://prgrms-fe-devcourse.github.io/FE7-PROJECT1-TEAM02/src/img/search.svg') no-repeat;
    background-position: 10px center;
    background-size: 30px 30px;
    margin-bottom: 5px;
    border: none;
    border-radius: 4px;
}

.search-popup ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-popup li {
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.6rem;
}

.search-popup li:hover {

    background-color: #eee;
}

/* darkmode-btn */
.darkmode-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
}

.darkmode-btn {
    border: none;
    color: #fff;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.5rem;
}

.darkmode-btn:hover {
    background-color: #7c7c7c;
    background-color: rgba(42, 28, 0, 0.07);
}