/* =========================================
   1. 팝업 배경 (Dim) 및 기본 컨테이너
========================================= */
.popup-dim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); /* 필요시 0.5 등으로 수정하여 어둡게 가능 */
    pointer-events: none;
    z-index: 9998;
}

.notice-popup {
    pointer-events: auto;
    position: absolute;
    width: 400px;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-family: sans-serif;
    box-sizing: border-box;
}

/* =========================================
   2. 팝업 헤더 (아이콘 + 제목)
========================================= */
.popup-header {
    /* 포커스 아웃라인 제거 (접근성 탭 이동시 헤더 자체에는 테두리 안생기게) */
    outline: none;
}

.popup-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.popup-title {
    margin-bottom: 3rem;
    color: #222;
    font-size: 1.8rem;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 2줄 제한 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   3. 팝업 본문 (스크롤 영역 + 내용)
========================================= */
.popup-content-wrap {
    /* 내용이 길어질 경우 팝업이 무한정 길어지는 것을 방지하고 내부 스크롤 생성 */
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px; /* 스크롤바 공간 확보 */
    outline: none;
}

/* 웹킷(크롬, 사파리, 엣지) 스크롤바 디자인 */
.popup-content-wrap::-webkit-scrollbar {
    width: 6px;
}
.popup-content-wrap::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.popup-content {
    text-align: left;
    display: inline-block;
    width: 100%;
    padding: 0;
    margin: 0;
    color: #555;
    font-size: 1.5rem;
    line-height: 1.8;
    font-weight: 500;
    list-style-type: none;
}

.popup-content li {
    margin-bottom: 10px;
    word-break: keep-all;
}

.popup-content li:last-child {
    margin-bottom: 0;
}

/* 링크 스타일 */
.popup-content li a {
    color: #0066cc;
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.2s;
}

.popup-content li a:hover {
    color: #ec7204;
    text-decoration: none;
}

.popup-sub-notice {
    margin-top: 15px;
    color: #888;
    font-size: 13px;
    word-break: keep-all;
    line-height: 1.4;
}

/* =========================================
   4. 팝업 하단 (체크박스 + 닫기 버튼)
========================================= */
.popup-footer {
    margin-top: 3rem;
    border-top: 1px solid #eee; /* 본문과 살짝 구분되도록 선 추가 */
    padding-top: 1.5rem;
}

/* "오늘 하루 열지 않음" 체크박스 영역 */
.popup-cookie-check {
    display: flex;
    align-items: center;
    justify-content: center; /* 가운데 정렬 */
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.popup-cookie-check input[type="checkbox"] {
    margin-right: 6px;
    cursor: pointer;
    width: 15px;
    height: 15px;
}

.popup-btn {
    width: 100%;
    padding: 12px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.2s ease;
    pointer-events: auto;
}

.popup-btn:hover {
    background: #444;
}

/* =========================================
   5. 반응형 (모바일)
========================================= */
@media (max-width: 768px) {
    .notice-popup {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        /* 모바일에서는 자바스크립트로 계산한 top/left 무시하고 무조건 정중앙 */
        width: 90%;
        max-width: 450px;
    }
}