/**
 * Layer Popup Styles
 * 레이어 팝업 스타일
 */

/* Popup Container */
.layer-popup {
    position: fixed;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    display: none; /* JS에서 제어 */
}

/* Popup Content */
.layer-popup-content {
    line-height: 0;
}

.layer-popup-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.layer-popup-content a {
    display: block;
    line-height: 0;
}

.layer-popup-content a:hover {
    opacity: 0.95;
}

/* Popup Buttons */
.layer-popup-buttons {
    display: flex;
    justify-content: space-between;
    background: #333;
    padding: 0;
}

.layer-popup-buttons button {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.layer-popup-buttons button:hover {
    background: #555;
}

.layer-popup-buttons .btn-popup-today {
    border-right: 1px solid #444;
}

.layer-popup-buttons .btn-popup-close {
    font-weight: 500;
}

/* Responsive - 모바일에서 중앙 정렬 */
@media (max-width: 768px) {
    .layer-popup {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        max-width: 90vw;
        width: auto !important;
    }

    .layer-popup-content img {
        max-width: 100%;
        max-height: 70vh;
        object-fit: contain;
    }

    .layer-popup-buttons button {
        padding: 14px 10px;
        font-size: 12px;
    }
}

/* Animation */
.layer-popup.show {
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 모바일에서 애니메이션 보정 */
@media (max-width: 768px) {
    .layer-popup.show {
        animation: popupFadeInMobile 0.3s ease-out;
    }

    @keyframes popupFadeInMobile {
        from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }
}
