/* Popup Layer - 메인페이지 좌측 상단 팝업 */

.joeun-popup-layer {
    position: fixed;
    top: 100px;
    left: 100px;
    z-index: 99999;
    width: 450px;
    max-width: calc(100vw - 48px);
    box-sizing: border-box;
    background-color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.joeun-popup-layer-inner {
    display: flex;
    flex-direction: column;
}

.joeun-popup-main {
    position: relative;
    width: 100%;
}

/* 우측 상단 닫기 버튼 (Remix Icon) */
.joeun-popup-close-x {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.joeun-popup-close-x:hover {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.joeun-popup-close-x .ri-close-line {
    font-size: inherit;
}

.joeun-popup-image-wrap {
    width: 450px;
    max-width: 100%;
    margin: 0 auto;
    line-height: 0;
}

.joeun-popup-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.joeun-popup-image-link[href="#"] {
    cursor: default;
    pointer-events: none;
}

.joeun-popup-image-wrap img.joeun-popup-image {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
}

.joeun-popup-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.joeun-popup-thumb-item {
    width: 80px;
    height: 80px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.joeun-popup-thumb-item:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.joeun-popup-thumb-item.is-active {
    border-color: #294aa7;
    box-shadow: 0 0 0 1px #294aa7;
}

.joeun-popup-thumb-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.joeun-popup-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid #dadada;
}

.joeun-popup-btn {
    padding: 12px;
    background-color: #1a1a1a;
    color: #eee;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.joeun-popup-btn:hover {
    background-color: #333;
}

.joeun-popup-hide-today {
    border-right: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .joeun-popup-layer {
        left: 50%;
        transform: translateX(-50%);
        top: 100px;
        width: 90vw;
        max-width: 450px;
    }

    .joeun-popup-image-wrap {
        width: 100%;
    }
}
