/* 1. Body 잠금 설정 */
body.no-scroll {
    overflow-y: scroll !important;
    position: fixed;
    top: 0;
    width: 100%;
}

/* 2. 바텀시트 전체 컨테이너 */
.bottom-sheet {
    position: fixed;
    z-index: 1050;
    top: 0;
    left: calc(50% + var(--body_width02));
    width: 100%;
    max-width: var(--body_width);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 0.1s linear;
}

.bottom-sheet.show {
    opacity: 1;
    pointer-events: auto;
}

/* 3. 오버레이 배경 */
.bottom-sheet .sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, 0.5); /* 오버레이 밝기 조절 */
}

/* 4. 바텀시트 본체(Content) */
.bottom-sheet .content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1001;
    width: 100%;
    max-width: var(--body_width);
    max-height: 100dvh;
    background: #fff;
    border-radius: 1.6rem 1.6rem 0 0;
    padding-bottom: env(safe-area-inset-bottom);

    /* 애니메이션 및 성능 최적화 */
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform, height;
}

.bottom-sheet.show .content {
    transform: translateY(0%);
}

.bottom-sheet.dragging .content {
    transition: none !important;
}

/* 닫히는 애니메이션 (가속도 추가) */
.bottom-sheet.hiding .content {
    transition: transform 0.15s ease-in !important;
    transform: translateY(100%) !important;
}

/* 풀스크린 상태 */
.bottom-sheet.fullscreen .content {
    border-radius: 0;
}

/* 5. 내부 구성 요소 (Header, Body, Footer) */
.bottom-sheet .bs_header {
    display: flex;
    flex-direction: column;
    padding: 0 2.4rem;
}

.bs_header .drag-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2.4rem 2.0rem 0.5rem;
    margin-top: -1.2rem;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.bs_header .drag-icon span {
    display: block;
    width: 30px;
    height: 0.4rem;
    background: var(--gray-300);
    border-radius: 2.0rem;
}

.bs_header .header-tit{display:flex;}

/* 스크롤 영역 */
.bottom-sheet .bs_body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 0 2.4rem;
    overflow: hidden; /* 자식의 스크롤만 허용 */
}

.bottom-sheet .bs_body .bs_content {
    padding: 1.0rem 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-y: overlay; /* 스크롤바가 콘텐츠를 가리지 않음 */
    min-height: 0;
    scrollbar-gutter: stable; /* 스크롤바 생성 시 콘텐츠 밀림 방지 */
}

/* 브라우저별 스크롤바 숨기기 (선택 사항) */
.bottom-sheet .bs_body .bs_content::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.bottom-sheet .bs_footer {
    padding: 0 0 1.0rem;
}
.bottom-sheet .bs_footer.px_20{
    padding: 0 2rem 1rem;
}

/* 6. 반응형 설정 */
@media (max-width: 991.98px) {
    .bottom-sheet {
        left: 50%;
    }
}