/**
 * 메인 페이지 팝업 스타일
 */

/* 오버레이 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 모달 - 피그마 기준 460 x 650px (이미지 596px + 버튼 54px) */
.popup-modal {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 0;
    width: 460px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

/* 이미지 래퍼 - 페이징 오버레이를 위한 relative 컨테이너 */
.popup-image-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 이미지 컨테이너 - 피그마 기준 460 x 596px (2배수 이미지 920x1192px 축소 표시) */
.popup-image-container {
    width: 100%;
    max-height: calc(90vh - 54px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.popup-image-container img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* 페이징 오버레이 - 피그마 Frame 1000004943 기준 88x28px */
.popup-paging-overlay {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 14px;
    padding: 4px 8px;
    height: 28px;
    box-sizing: border-box;
}

.popup-paging-prev,
.popup-paging-next {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    opacity: 1;
    transition: opacity 0.2s;
}

.popup-paging-prev:hover,
.popup-paging-next:hover {
    opacity: 0.7;
}

.popup-paging-current,
.popup-paging-total {
    font-size: 14px;
    font-weight: 400;
    color: white;
    line-height: 1;
}

.popup-paging-separator {
    width: 1px;
    height: 11px;
    background-color: #7C7C7C;
    margin: 0 4px;
}

/* 컨트롤 바 - 피그마 기준 460 x 54px */
.popup-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    box-sizing: border-box;
}

.popup-hide-today-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.popup-hide-today-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #FF6B00;
}

.popup-close-button {
    background: none;
    color: #666;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
}

.popup-close-button:hover {
    color: #333;
}

.popup-close-button:active {
    transform: none;
}

/* 반응형 - 모바일 */
@media (max-width: 480px) {
    .popup-modal {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
    }

    .popup-controls {
        height: 48px;
        padding: 0 12px;
        gap: 12px;
    }

    .popup-hide-today-label {
        font-size: 13px;
    }
    
    .popup-close-button {
        font-size: 13px;
    }
    
    .popup-paging-overlay {
        bottom: 12px;
    }
    
    .popup-paging-current,
    .popup-paging-total {
        font-size: 12px;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .popup-paging-prev,
    .popup-paging-next {
        /* 터치 타겟 최소 크기 보장 */
        min-width: 28px;
        min-height: 28px;
    }
}
