@charset "utf-8";
/**
 * dasion - 팝업 전용 CSS
 * 그누보드 #hd_pop 팝업레이어 + 모달/오버레이 보강
 */

/* ===== 그누보드 팝업레이어 (newwin.inc.php) ===== */
#hd_pop {
    z-index: 2000;
    position: relative;
    margin: 0 auto;
    height: 0;
    width: 100%;
}
#hd_pop h2 {
    position: absolute;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
    text-indent: -9999em;
}

.hd_pops {
    position: absolute;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.hd_pops:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
}

.hd_pops img {
    max-width: 100%;
    height: auto;
    display: block;
}

.hd_pops_con {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 80vh;
}
.hd_pops_con::-webkit-scrollbar { width: 6px; }
.hd_pops_con::-webkit-scrollbar-track { background: #f1f1f1; }
.hd_pops_con::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
.hd_pops_con::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

.hd_pops_footer {
    position: relative;
    padding: 0;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    border-top: 1px solid #333;
}
.hd_pops_footer::after {
    display: block;
    visibility: hidden;
    clear: both;
    content: "";
}

.hd_pops_footer .hd_pops_reject {
    flex: 1;
    min-width: 140px;
    padding: 14px 18px;
    border: 0;
    background: #1a1a1a;
    color: #b0b0b0;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}
.hd_pops_footer .hd_pops_reject:hover {
    background: #252525;
    color: #fff;
}
.hd_pops_footer .hd_pops_reject strong {
    font-weight: 600;
    color: #fff;
}

.hd_pops_footer .hd_pops_close {
    padding: 14px 24px;
    border: 0;
    background: #333;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    border-left: 1px solid #444;
}
.hd_pops_footer .hd_pops_close:hover {
    background: #444;
}
.hd_pops_footer .hd_pops_close i {
    margin-left: 6px;
    font-size: 0.9em;
    opacity: 0.9;
}


/* ===== ds- 모달 오버레이 (커스텀 팝업용) ===== */
.ds-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ds-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ds-popup-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    max-width: 90%;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2001;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}
.ds-popup-box.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.ds-popup-box .ds-popup-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 70vh;
}
.ds-popup-box .ds-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: #f5f5f5;
    color: #666;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.ds-popup-box .ds-popup-close:hover {
    background: #e0e0e0;
    color: #333;
}


/* ===== bPopup 호환 (스킨/외부 플러그인 사용 시) ===== */
.b-modal {
    transition: opacity 0.3s ease !important;
}
.b-iframe {
    border: none;
    display: block;
}
.b-ajax-wrapper {
    padding: 20px;
}


/* ===== 반응형 ===== */
@media screen and (max-width: 768px) {
    .hd_pops {
        max-width: calc(100vw - 24px);
        left: 12px !important;
    }
    .hd_pops_footer {
        flex-direction: column;
    }
    .hd_pops_footer .hd_pops_reject,
    .hd_pops_footer .hd_pops_close {
        width: 100%;
        text-align: center;
        border-left: none;
        border-top: 1px solid #333;
    }
    .hd_pops_footer .hd_pops_close {
        border-top: 1px solid #444;
    }
    .ds-popup-box {
        max-width: calc(100% - 24px);
        margin: 0 12px;
    }
}
