@charset "utf-8";
/* =========================================================
   LumosTV 공통 알림(모달) - 다크 테마
   /js/show.js 의 showModal() / closeModal() 과 함께 사용
   ========================================================= */

/* ---------- 오버레이 ---------- */
.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 99999999;
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.78);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* show.js 가 display:flex 로 열어준다 (구버전 캐시의 display:block 도 대응) */
#myModal {
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ---------- 본문 박스 ---------- */
.modal-content {
    position: relative;
    box-sizing: border-box;
    margin: auto;
    padding: 26px 22px 20px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    background-color: #16181c;
    color: #f2f3f5;
    border: 1px solid #34373f;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
    -webkit-animation: dtvModalIn 0.22s ease-out;
    animation: dtvModalIn 0.22s ease-out;
}

@-webkit-keyframes dtvModalIn {
    from { opacity: 0; -webkit-transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; -webkit-transform: translateY(0) scale(1); }
}
@keyframes dtvModalIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 닫기(X) ---------- */
.modal-content .close,
#myModal .close {
    position: absolute;
    top: 14px;
    right: 16px;
    float: none;
    width: 30px;
    height: 30px;
    line-height: 28px;
    font-size: 24px;
    font-weight: 400;
    color: #8b909a;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    -webkit-transition: color 0.15s, background-color 0.15s;
    transition: color 0.15s, background-color 0.15s;
}

.modal-content .close:hover,
.modal-content .close:focus,
#myModal .close:hover,
#myModal .close:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

/* ---------- 제목 ---------- */
.modal-header {
    position: relative;
    margin: 0 30px 16px;
    padding-bottom: 13px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    border-bottom: 1px solid #2c2f36;
    background: none;
}

.modal-header::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 42px;
    height: 2px;
    margin-left: -21px;
    background-color: #f2507e;
}

/* ---------- 내용 ---------- */
.modal-body {
    padding: 6px 4px 0;
    margin-bottom: 22px;
    font-size: 16px;
    line-height: 1.65;
    color: #dcdee3;
    word-break: keep-all;
    word-wrap: break-word;
    background: none;
}

/* ---------- 버튼 ---------- */
.modal-footer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 10px;
    padding: 0;
    background: none;
    border: 0;
}

.modal-button {
    display: inline-block;
    min-width: 130px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    background-color: #f2507e;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    -webkit-appearance: none;
    -webkit-transition: background-color 0.15s;
    transition: background-color 0.15s;
}

.modal-button:hover,
.modal-button:focus {
    background-color: #d93c69;
    color: #ffffff;
    text-decoration: none;
}

/* 자동 포커스시 흰 테두리 대신 부드러운 핑크 링 */
.modal-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(242, 80, 126, 0.32);
}
.modal-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 2px;
}

.modal-button:active {
    background-color: #c22f59;
}

/* 보조 버튼 (취소 등) */
.modal-button.modal-button-sub {
    background-color: #2a2d34;
    color: #d8dae0;
    border: 1px solid #3d414a;
}
.modal-button.modal-button-sub:hover {
    background-color: #34383f;
    color: #ffffff;
}

/* ---------- 모달 열렸을 때 배경 스크롤 방지 ---------- */
html.dtv-modal-open,
body.dtv-modal-open {
    overflow: hidden;
}

/* ---------- 작은 화면 ---------- */
@media screen and (max-width: 480px) {
    .modal { padding: 16px; }
    .modal-content {
        max-width: 340px;
        padding: 24px 18px 18px;
        border-radius: 14px;
    }
    .modal-header { font-size: 18px; margin: 0 26px 14px; }
    .modal-body { font-size: 15px; margin-bottom: 20px; }
    .modal-button { min-width: 120px; padding: 11px 20px; font-size: 15px; }
}

/* ---------- 라이트모드 강제 지정이 있어도 검정 유지 ---------- */
body.dark-mode .modal-content,
body:not(.dark-mode) .modal-content {
    background-color: #16181c;
    color: #f2f3f5;
}
body.dark-mode .modal-header,
body:not(.dark-mode) .modal-header {
    color: #ffffff;
}
body.dark-mode .modal-body,
body:not(.dark-mode) .modal-body {
    color: #dcdee3;
}
body.dark-mode .modal-button,
body:not(.dark-mode) .modal-button {
    background-color: #f2507e;
    color: #ffffff;
}
