/* 알림 컨테이너 */
.notification-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

/* 알림 아이콘 */
.notification-icon {
    position: relative;
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(75, 85, 99, 0.08);
    transition: all 0.2s ease;
    color: #4B5563;
}

.notification-icon:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #6366F1;
    transform: translateY(-1px);
}

.notification-icon i {
    font-size: 18px;
    position: relative;
}

/* 알림 배지 */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    border: 2px solid white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* 알림 배지가 있을 때 표시 */
.notification-badge.active {
    display: flex;
    animation: notificationPulse 2s infinite;
}

/* 두 자리 숫자일 때 크기 조정 */
.notification-badge[data-count="10"],
.notification-badge[data-count="9+"] {
    min-width: 20px;
    height: 18px;
    font-size: 9px;
    padding: 0 2px;
    border-radius: 9px;
}

@keyframes notificationPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 알림 드롭다운 */
.notification-dropdown {
    position: absolute;
    top: 45px;
    right: -8px;
    width: 340px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* 드롭다운 활성화 */
.notification-dropdown.active {
    display: block;
    animation: notificationDropdownSlide 0.2s ease-out;
}

@keyframes notificationDropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 알림 헤더 */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #E5E7EB;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
}

.notification-header span {
    font-weight: 600;
    font-size: 15px;
    color: #1F2937;
}

.notification-header button {
    background: none;
    border: none;
    color: #6366F1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.notification-header button:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #4F46E5;
}

/* 알림 목록 */
.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

/* 알림 아이템 */
.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f5f5f5;
}

.notification-item.unread {
    background-color: #ebf5ff;
}

.notification-item a {
    display: block;
    text-decoration: none;
    color: #333;
}

.notification-content {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.notification-time {
    font-size: 12px;
    color: #777;
}

/* 알림 푸터 */
.notification-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid #eee;
}

.notification-footer a {
    color: #2196F3;
    font-size: 14px;
    text-decoration: none;
}

/* 비어있는 알림 */
.empty-notifications {
    padding: 30px 15px;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* 로딩 표시 */
.loading {
    padding: 20px;
    text-align: center;
    color: #777;
}

/* 마이페이지 알림 스타일 */
.notification-page-list {
    margin-top: 20px;
}

.notification-page-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    transition: background-color 0.2s;
}

.notification-page-item.unread {
    background-color: #f0f7ff;
}

.notification-page-item:hover {
    background-color: #f5f5f5;
}

.notification-link {
    display: block;
    text-decoration: none;
    color: #333;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #777;
}

.notification-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border-radius: 4px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.pagination a.active {
    background-color: #2196F3;
    color: #fff;
}

/* 빈 상태 표시 */
.empty-state {
    margin: 40px 0;
    text-align: center;
}

.empty-icon {
    font-size: 40px;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-text {
    color: #999;
    font-size: 16px;
}

/* 브라우저 알림 컨트롤 영역 */
.browser-notification-controls {
    padding: 12px 18px;
    border-bottom: 1px solid #E5E7EB;
    background: #FAFBFF;
}

.browser-notification-controls > div:first-child {
    font-size: 0.8rem;
    color: #6B7280;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

#toggle-browser-notifications {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.8rem;
    background: #6366F1;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

#toggle-browser-notifications:hover {
    background: #4F46E5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* 알림 타입별 아이콘 스타일 */
.notification-item[data-type="message"] .notification-icon {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.notification-item[data-type="comment"] .notification-icon {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
}

.notification-item[data-type="reply"] .notification-icon {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.notification-item[data-type="mention"] .notification-icon {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.notification-item[data-type="review_comment"] .notification-icon {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.notification-item[data-type="notice"] .notification-icon {
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
}

/* 알림 타입별 이모지 추가 */
.notification-item[data-type="message"] .notification-icon::before {
    content: "💬";
}

.notification-item[data-type="comment"] .notification-icon::before {
    content: "💭";
}

.notification-item[data-type="reply"] .notification-icon::before {
    content: "↩️";
}

.notification-item[data-type="mention"] .notification-icon::before {
    content: "@";
    font-weight: bold;
}

.notification-item[data-type="review_comment"] .notification-icon::before {
    content: "⭐";
}

.notification-item[data-type="notice"] .notification-icon::before {
    content: "📢";
} 