/**
 * 팝업 슬라이드 모달 스타일
 * - 메인 페이지 팝업 슬라이드 모달 전용 CSS
 */

/* 팝업 모달 기본 스타일 */
.popup-slide-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-slide-modal.active {
    display: block;
    opacity: 1;
}

.popup-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.popup-modal-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 닫기 버튼 (X) */
.popup-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popup-modal-close:hover {
    background: #f5f5f5;
    border-color: #333;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.popup-modal-close svg {
    width: 20px;
    height: 20px;
}

/* 진행 표시 */
.popup-progress {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.popup-separator {
    margin: 0 4px;
    opacity: 0.7;
}

/* Swiper 래퍼 */
.popup-swiper-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
}

.popup-swiper {
    width: 100%;
    height: 100%;
}

.popup-slide {
    display: flex;
    flex-direction: column;
    background: white;
    height: 100%;
}

/* 팝업 이미지 */
.popup-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    overflow: hidden;
    height: 100%;
}

.popup-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 팝업 컨트롤 */
.popup-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f9f9f9;
    border-top: 1px solid #e5e5e5;
}

.popup-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* 커스텀 체크박스 */
.popup-dont-show-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #999;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background: white;
    flex-shrink: 0;
}

.popup-dont-show-checkbox:hover {
    border-color: #333;
}

.popup-dont-show-checkbox:checked {
    background: #333;
    border-color: #333;
}

.popup-dont-show-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.popup-close-btn {
    padding: 10px 24px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-close-btn:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 네비게이션 버튼 */
.popup-swiper-button-prev,
.popup-swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
}

.popup-swiper-button-prev {
    left: 16px;
}

.popup-swiper-button-next {
    right: 16px;
}

.popup-swiper-button-prev:hover,
.popup-swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.popup-swiper-button-prev.swiper-button-disabled,
.popup-swiper-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .popup-modal-container {
        width: 95%;
        max-width: none;
        margin: 2vh auto;
        max-height: 96vh;
        border-radius: 12px;
    }

    .popup-controls {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .popup-checkbox-label {
        font-size: 13px;
    }

    .popup-dont-show-checkbox {
        width: 18px;
        height: 18px;
    }

    .popup-dont-show-checkbox:checked::after {
        left: 4px;
        top: 1px;
        width: 5px;
        height: 9px;
    }

    .popup-close-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .popup-modal-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }

    .popup-modal-close svg {
        width: 18px;
        height: 18px;
    }

    .popup-progress {
        top: 12px;
        left: 12px;
        font-size: 13px;
        padding: 4px 12px;
    }

    .popup-swiper-button-prev,
    .popup-swiper-button-next {
        width: 36px;
        height: 36px;
    }

    .popup-swiper-button-prev {
        left: 8px;
    }

    .popup-swiper-button-next {
        right: 8px;
    }
}

/* 작은 모바일 화면 */
@media (max-width: 480px) {
    .popup-modal-container {
        width: 92%;
        max-height: 92vh;
        margin: 4vh auto;
        border-radius: 16px;
    }

    .popup-modal-close {
        width: 32px;
        height: 32px;
        top: 10px;
        right: 10px;
    }

    .popup-modal-close svg {
        width: 16px;
        height: 16px;
    }

    .popup-progress {
        top: 10px;
        left: 10px;
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* 애니메이션 */
@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-slide-modal.active .popup-modal-container {
    animation: popupSlideIn 0.3s ease;
}
