@charset "utf-8";

/* 페이지 스크롤: html 기준 (default.css overflow-y: scroll 유지) */
html.custom-scrollbar {
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

html.custom-scrollbar body {
    width: 100%;
    overflow-x: hidden;
}

/* 모바일: 네이티브 스크롤바 숨김 -> jQuery 커스텀 스크롤바 사용 */
@media screen and (max-width: 500px) {
    html.custom-scrollbar,
    html.custom-scrollbar body {
        scrollbar-width: none;
        -ms-overflow-style: none !important;
    }

    html.custom-scrollbar::-webkit-scrollbar,
    html.custom-scrollbar body::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
        background: transparent !important;
    }
}

/* PC: JS 실패 시에도 기본 커스텀 스크롤바 노출 */
@media screen and (min-width: 501px) {
    html.custom-scrollbar {
        scrollbar-width: thin;
        scrollbar-color: #b88e66 transparent;
    }

    html.custom-scrollbar::-webkit-scrollbar {
        width: 6px;
    }

    html.custom-scrollbar::-webkit-scrollbar-track {
        background: transparent;
    }

    html.custom-scrollbar::-webkit-scrollbar-thumb {
        background-color: rgba(184, 142, 102, 0.85);
        border-radius: 3px;
    }

    html.custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background-color: #9a744f;
    }

    html.custom-scrollbar.beautyps-scrollbar-ready {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    html.custom-scrollbar.beautyps-scrollbar-ready::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }
}

.beautyps-scrollbar {
    position: fixed;
    top: 12px;
    right: 8px;
    bottom: 12px;
    z-index: 99999;
    width: 6px;
    border-radius: 999px;
    background: rgba(184, 142, 102, 0.14);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.beautyps-scrollbar.is-visible,
html.beautyps-scrollbar-dragging .beautyps-scrollbar {
    opacity: 1;
}

.beautyps-scrollbar.is-hidden {
    display: none;
}

.beautyps-scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    min-height: 44px;
    border-radius: 999px;
    background: rgba(184, 142, 102, 0.9);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.beautyps-scrollbar-thumb:hover,
html.beautyps-scrollbar-dragging .beautyps-scrollbar-thumb {
    background: #9a744f;
}

html.beautyps-scrollbar-dragging,
html.beautyps-scrollbar-dragging body {
    cursor: grabbing;
    user-select: none;
}

@media screen and (max-width: 500px) {
    .beautyps-scrollbar {
        right: 4px;
        width: 5px;
    }

    .beautyps-scrollbar-thumb {
        min-height: 52px;
    }
}
