﻿/* 알림 벨 및 드롭다운 스타일 */

/* 알림 뱃지 */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

.notification-badge-mobile {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* 알림 드롭다운 */
.notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    overflow: hidden;
}

    .notification-dropdown.show {
        display: block;
    }

.notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

    .notification-dropdown-header span {
        font-weight: bold;
        font-size: 16px;
        color: #333;
    }

    .notification-dropdown-header a {
        font-size: 13px;
        color: #68635e;
        text-decoration: none;
    }

        .notification-dropdown-header a:hover {
            text-decoration: underline;
        }

.notification-dropdown-list {
    max-height: 280px;
    overflow-y: auto;
}

.notification-dropdown-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

    .notification-dropdown-item:hover {
        background: #f5f5f5;
    }

    .notification-dropdown-item.unread {
        background: #f0f7ff;
    }

    .notification-dropdown-item .noti-icon {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #eee;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
        flex-shrink: 0;
        font-size: 14px;
    }

    .notification-dropdown-item .noti-content {
        flex: 1;
        min-width: 0;
    }

    .notification-dropdown-item .noti-message {
        font-size: 13px;
        color: #333;
        line-height: 1.4;
        margin-bottom: 4px;
        word-break: keep-all;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .notification-dropdown-item .noti-time {
        font-size: 11px;
        color: #999;
    }

.notification-dropdown-footer {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    text-align: center;
}

    .notification-dropdown-footer button {
        width: 100%;
        padding: 8px;
        background: #68635e;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 13px;
        transition: background 0.2s;
    }

        .notification-dropdown-footer button:hover {
            background: #4a4540;
        }

        .notification-dropdown-footer button.subscribed {
            background: #27ae60;
        }

.notification-empty {
    padding: 30px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 모바일 반응형 */
@media screen and (max-width: 768px) {
    .notification-dropdown {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
    }
}
/* 헤더 메뉴 새 글 뱃지 */
.header-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: 5px;
    vertical-align: middle;
}

/* 상위 메뉴 (태극도 소식, 자료실) 뱃지 */
#menu-badge-news,
#menu-badge-dataroom {
    position: relative;
    top: -2px;
}

/* 하위 메뉴 뱃지 */
.dep02 .menu-badge {
    margin-left: 8px;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
}

/* 서브헤더 뱃지 */
.sdep01 .header-menu-badge {
    position: relative;
    top: 0;
    right: 0;
    margin-left: 8px;
}
/* 모바일 메뉴 뱃지 */
.mobile-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: 8px;
    margin-right: 8px;
}

/* 모바일 하위 메뉴 뱃지 */
.menu-badge-mobile {
    font-size: 10px;
    min-width: 16px;
    height: 16px;
}
/* 알림 버튼 상태별 스타일 */
#push-toggle-btn {
    transition: all 0.3s ease;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

    #push-toggle-btn:hover {
        opacity: 0.8;
    }

/* 알림 페이지 버튼 */
.noti-btn-green {
    background: #27ae60 !important;
    color: white !important;
}

.noti-btn-gray {
    background: #95a5a6 !important;
    color: white !important;
}

/* 종 아이콘 애니메이션 */
.notification-bell > span {
    transition: transform 0.3s ease;
}

.notification-bell:hover > span {
    transform: rotate(15deg);
}

/* 알림 켜짐 상태 종 아이콘 */
.notification-bell.active > span {
    animation: ring 0.5s ease-in-out;
}

@keyframes ring {
    0% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(15deg);
    }

    50% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(0);
    }
}
/* 모바일 메뉴 뱃지 회전 방지 */
.mobile-menu-badge {
    transform: none !important;
}

/* 모바일 메뉴 뱃지 회전 방지 */
#header .mobile-menu-badge,
#header .menu-badge-mobile,
#header #menu-badge-news-mobile,
#header #menu-badge-dataroom-mobile,
.parent_a .mobile-menu-badge,
.child_a .menu-badge-mobile {
    transform: none !important;
    -webkit-transform: none !important;
}