/* Popup Styles */

/* Desktop Popup Styles */
.layer_popup {
    position: fixed;
    top: 100px;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border-radius: 5px;
    overflow: hidden;
    display: none;
    left: 50px;
}

.layer_popup .pop_con {
    width: 400px;
    max-height: 600px;
    overflow: auto;
}

.layer_popup .pop_con img {
    width: 100%;
    display: block;
}

.popup_bottom {
    background: #f5f5f5;
    padding: 10px;
    display: flex;
    justify-content: space-between;
}

.popup_bottom label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.popup_bottom input[type="checkbox"] {
    margin-right: 5px;
}

.popup_bottom a {
    font-size: 13px;
    color: #333;
    text-decoration: none;
}

/* 원위치 버튼 스타일 */
.popup_reset {
    margin-right: 10px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
}

/* 슬라이드 컨트롤 스타일 */
.slider_controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    transform: translateY(-50%);
    z-index: 100;
    pointer-events: none; /* 버튼 외에는 터치 통과 */
}

.slider_controls button {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto; /* 버튼은 터치 가능 */
    opacity: 0.7;
    transition: opacity 0.3s;
}

.slider_controls button:hover,
.slider_controls button:focus {
    opacity: 1;
    outline: none;
}

.slide_prev {
    margin-right: auto;
}

.slide_next {
    margin-left: auto;
}

/* Mobile Popup Slider Styles */
.mobile_popup_slider {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    touch-action: none; /* 전체 영역에서 브라우저 기본 터치 액션 비활성화 */
}

.slider_container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
}

.slider_wrapper {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 80%;
    white-space: nowrap;
    /* 기본 트랜지션 제거 - JavaScript에서 필요할 때만 추가 */
    will-change: transform; /* 하드웨어 가속 활성화 */
    touch-action: pan-x; /* 수평 스와이프만 허용 */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    user-select: none; /* 터치 중 텍스트 선택 방지 */
}

.mobile_popup_slide {
    display: inline-block;
    width: 90%;
    max-width: 400px;
    margin: 0 5%;
    height: 100%;
    position: relative;
    vertical-align: top;
    touch-action: pan-y; /* 슬라이드 내에서는 수직 스크롤 허용 */
}

.slide_content {
    position: relative;
    background: #fff;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.image_container {
    height: calc(100% - 50px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y; /* 이미지 컨테이너에서 수직 스크롤 허용 */
}

.image_container img {
    width: 100%;
    display: block;
    pointer-events: auto; /* 이미지에 터치 이벤트 허용 */
    user-select: none; /* 이미지 드래그 시 선택 방지 */
    touch-action: pan-y; /* 이미지에서도 수직 스크롤 허용 */
}

.popup_mobile_bottom {
    height: 50px;
    background: #f5f5f5;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup_mobile_bottom label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.popup_mobile_bottom input[type="checkbox"] {
    margin-right: 5px;
}

.slider_pagination {
    margin-right: 10px;
    font-size: 12px;
    color: #666;
}

/* Desktop Popup 닫기 버튼 개선 */
.popup_close {
    font-size: 13px;
    color: #333;
    text-decoration: none;
    padding: 8px 15px;
    background-color: #eee;
    border-radius: 3px;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-block;
}

.popup_close:hover {
    background-color: #ddd;
    color: #000;
}

.popup_close:active {
    background-color: #ccc;
}

/* Mobile Popup 닫기 버튼 개선 */
.popup_close_mobile {
    font-size: 13px;
    color: #fff !important;
    text-decoration: none;
    background-color: #555;
    padding: 8px 15px;
    border-radius: 3px;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-block;
}

.popup_close_mobile:hover {
    background-color: #333;
}

.popup_close_mobile:active {
    background-color: #222;
} 