/* ===== Notification Popup (desktop dropdown) ===== */
.notif-popup {
    position: fixed;
    top: 35px;
    right: 20px;
    width: 405px;
    height: 740px;
    max-height: calc(100vh - 80px);
    background: #fff;
    border: 1px solid #000;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 10500;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Apple SD Gothic Neo', sans-serif;
    letter-spacing: -.4px;
}
.notif-popup.is-open {
    display: flex;
}

.notif-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #1f1f1f;
    border-bottom: 1px solid #1f1f1f;
    flex-shrink: 0;
}
.notif-popup-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #f0f0f0;
    letter-spacing: -.5px;
}
.notif-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #bbb;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.notif-popup-close:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.notif-popup-filters {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #131313;
    border-bottom: 1px solid #222;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
}
.notif-popup-filters::-webkit-scrollbar { display: none; }
.notif-popup-filter {
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 140px;
    padding: 0 14px;
    background: #1f1f1f;
    border: 1px solid #444;
    border-radius: 17px;
    font-size: 14px;
    font-weight: 500;
    line-height: 31px;
    color: #fff;
    letter-spacing: -.46px;
    outline: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.notif-popup-filter.active {
    background: #fff;
    color: #111;
    border-color: #fff;
}
.notif-popup-filter:hover:not(.active) {
    background: #2a2a2a;
    color: #fff;
}

.notif-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    background: #131313;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-sizing: border-box;
}
.notif-popup-body::-webkit-scrollbar {
    display: none;
}
.notif-popup-empty {
    padding: 40px 16px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

/* Popup notification card (compact, naver-style) — always dark */
.notif-popup-card {
    position: relative;
    display: block;
    margin: 11px 0;
    padding: 14px 16px;
    text-decoration: none;
    color: #e8e8e8;
    cursor: pointer;
    background: #1f1f1f;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: background 0.12s, box-shadow 0.12s;
}
.notif-popup-card:hover {
    background: #262626;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.notif-popup-card.is-read {
    opacity: 0.65;
}
.notif-popup-card:not(.is-read) .notif-popup-card-title,
.notif-popup-card:not(.is-read) .notif-popup-card-content,
.notif-popup-card:not(.is-read) .notif-popup-card-time {
    color: #fff !important;
}
.notif-popup-card-source {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.notif-popup-card-title {
    font-family: 'Pretendard', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
    letter-spacing: -0.02px !important;
    color: #f0f0f0 !important;
    -webkit-font-smoothing: antialiased;
    flex-shrink: 0;
    margin-right: auto;
}
.notif-popup-card-time {
    font-size: 14px;
    color: #888;
    margin-left: auto;
    white-space: nowrap;
}
.notif-popup-card-more {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0 4px 6px;
    margin-right: -8px;
    color: #888;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.12s, color 0.12s;
}
.notif-popup-card-more:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Edit Layer (3-dot menu) */
.notif-popup-edit-layer {
    position: absolute;
    z-index: 11000;
    min-width: 240px;
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    padding: 4px 0;
    overflow: hidden;
}
.notif-popup-edit-layer .btn_edit {
    width: 100%;
    min-height: 65px;
    padding: 14px 20px 12px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: #e8e8e8;
    transition: background 0.12s;
    font-family: 'Pretendard', sans-serif;
}
.notif-popup-edit-layer .btn_edit:hover {
    background: rgba(255, 255, 255, 0.06);
}
.notif-popup-edit-layer .btn_edit .title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #f0f0f0;
}
.notif-popup-edit-layer .btn_edit .title .ico_edit {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.notif-popup-edit-layer .btn_edit .desc {
    margin: 6px 0 0 30px;
    font-size: 12.5px;
    color: #888;
    font-weight: 400;
    line-height: 1.4;
}
.notif-popup-edit-layer .btn_edit.type_delete .title {
    color: #ff6b6b;
}
.notif-popup-card-content {
    font-family: 'Pretendard', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    letter-spacing: -0.02px !important;
    color: #cfcfcf !important;
    -webkit-font-smoothing: antialiased;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-popup-footer {
    flex-shrink: 0;
    padding: 10px 18px;
    background: #1f1f1f;
    border-top: 1px solid #1f1f1f;
    text-align: center;
}
.notif-popup-allbtn {
    display: inline-block;
    font-size: 13px;
    color: #ddd;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 10px;
}
.notif-popup-allbtn:hover {
    color: #fff;
    text-decoration: underline;
}

/* Mobile — full screen popup */
@media (max-width: 768px) {
    .notif-popup {
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border: none;
        border-radius: 0;
    }
}

/* Dark mode */
html.dark-mode .notif-popup {
    background: #1a1a1a;
    border-color: #333;
    color: #e0e0e0;
}
html.dark-mode .notif-popup-header {
    border-color: #2a2a2a;
}
html.dark-mode .notif-popup-title {
    color: #f0f0f0;
}
html.dark-mode .notif-popup-close {
    color: #aaa;
}
html.dark-mode .notif-popup-close:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}
