@charset "utf-8";

/* bxSlider 기본 구조 CSS (필수) */
.bx-wrapper {
    position: relative;
    margin: 0 auto;
    padding: 0;
    max-width: 400px;
    box-shadow: none;
    border: none;
    background: none;
}

/* 초기 로딩 시 슬라이드 숨김 처리 */
.popup-slider {
    width: 100%;
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    transition-duration: 0.5s;
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    -o-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    /* 초기에는 숨김 */
    visibility: hidden;
    opacity: 0;
}

/* bxSlider 초기화 후 표시 */
.popup-slider.bx-initialized {
    visibility: visible;
    opacity: 1;
}

/* 단일 팝업일 때는 바로 표시 */
.popup-slider.single-popup-ready {
    visibility: visible;
    opacity: 1;
}

.popup-slide {
    float: left;
    list-style: none;
    position: relative;
    width: 400px !important;
    margin-right: 10px;
}

/* 팝업 컨테이너 기본 설정 */
.popupContainer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 400px;
    visibility: visible !important;
    opacity: 1 !important;
    height: 640px;
    display: none;
}

.popupWrap {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.bx-viewport {
    height: 100% !important; /* 부모 높이만큼 */
    min-height: unset;       /* 기본값 제거 */
}
.popup-slide {
    width: 400px !important;
}

/* 팝업 내용 스타일 */
.popup-td {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 20px;
    position: relative;
    min-height: 200px;
    width: 100%;
    box-sizing: border-box;
    height: 640px; /* 팝업 높이 설정 */
    overflow: auto; /* 내용이 많을 경우 스크롤 가능 */
}

.popup-info {
    margin-bottom: 15px;
}

.popup-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #333;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.popup_tumb {
    text-align: center;
    margin-bottom: 15px;
}

.popup_tumb img {
    max-width: 100%;
    height: auto;
}

.popup-cont {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    word-break: keep-all;
}

.popup-cancel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px; /* 각 영역 간 간격 */
    background-color: #ffffff;
    padding: 5px;
    border: 1px solid #ddd;
}

/* 페이저 영역 */
.pager-area {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* 체크박스 영역 */
.checkbox-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-cancel input[type="checkbox"] {
    margin-right: 8px;
    width: 15px;
    height: 15px;
    border-radius: 2px;
}

.popup-cancel label {
    font-size: 15px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    white-space: nowrap; /* 텍스트 줄바꿈 방지 */
}

/* 닫기 버튼 영역 */
.close-area {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.close-btn {
    background: #ffffff;
    color: #757474;
    border: 1px solid #757474;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.close-btn:hover {
    background: #757474;
    color: #ffffff;
    /*transform: scale(1.1);*/
}

/* bxSlider 컨트롤 스타일 */
.bx-controls {
    position: relative;
}

/* 슬라이더 좌우 버튼 숨김 */
.bx-controls-direction {
    display: none !important;
}

.bx-controls-direction a {
    position: absolute;
    background: rgba(0,0,0,0.7);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    pointer-events: all;
    z-index: 10;
}

.bx-controls-direction a:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.bx-prev {
    left: -45px;
}

.bx-next {
    right: -45px;
}

.bx-prev:after {
    content: '‹';
}

.bx-next:after {
    content: '›';
}

.bx-prev.disabled,
.bx-next.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.bx-prev.disabled:hover,
.bx-next.disabled:hover {
    background: rgba(0,0,0,0.7);
    transform: none;
}

/* 페이저 스타일 - popup-cancel 내부에서 사용 */
.popup-cancel .bx-pager {
    text-align: left;
    padding-top: 10px;
    margin: 0;
}

.popup-cancel .bx-pager-item {
    display: inline-block;
    margin: 0 4px;
}

.popup-cancel .bx-pager-link {
    display: block;
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    text-indent: -9999px;
    transition: all 0.2s ease;
}

.popup-cancel .bx-pager-link:hover {
    background: #999;
}

.popup-cancel .bx-pager-link.active {
    background: #007bff;
    transform: scale(1.2);
}

/* 기본 페이저 스타일 (하단에 표시되는 경우) */
.bx-pager {
    text-align: center;
    padding-top: 15px;
}

.bx-pager-item {
    display: inline-block;
    margin: 0 4px;
}

.bx-pager-link {
    display: block;
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    text-indent: -9999px;
    transition: all 0.2s ease;
}

.bx-pager-link:hover {
    background: #999;
}

.bx-pager-link.active {
    background: #007bff;
    transform: scale(1.2);
}

/* 로딩 상태 */
.popup-slider.loading {
    opacity: 0.5;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 단일 팝업일 때 컨트롤 숨기기 */
.popup-slider:has(li:only-child) ~ .bx-controls .bx-controls-direction,
.popup-slider:has(li:only-child) ~ .bx-controls .bx-pager {
    display: none;
}

/* IE 대응 (has 선택자 미지원) */
.single-popup .bx-controls-direction,
.single-popup .bx-pager {
    display: none;
}