@charset "UTF-8";

.popup-layer {
    position: fixed;
    z-index: 9999;

    width: 420px;
    max-width: 90vw;

    top: 100px;
    left: 100px;
    transform: none;

    max-height: calc(100vh - 40px);

    display: flex;
    flex-direction: column;

    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);

    overflow: hidden;
}

/* 헤더 */
.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 14px;

    font-size: 14px;
    font-weight: 600;

    color: #1e3a8a;
    background: #ffffff;

    border-bottom: 2px solid #2563eb;

    cursor: move;
    user-select: none;

    flex-shrink: 0;
}

.popup-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* 이미지 */
.popup-content img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* 푸터 */
.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 12px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;

    flex-shrink: 0;
}

/* 버튼 */
.popup-footer button {
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.btn-hide {
    background: #e5e7eb;
    color: #374151;
}

.btn-close {
    background: #1e40af;
    color: #fff;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .popup-layer {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-height: calc(100vh - 20px);
    }

    .popup-header {
        cursor: default;
    }

    .popup-footer button {
        padding: 10px 14px;
        font-size: 14px;
    }
}

@media (max-height: 700px) {
    .popup-layer {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-height: calc(100vh - 20px) !important;
    }
}

@media (max-height: 800px) {
    .popup-layer {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-height: calc(100vh - 20px) !important;
    }
}