/* 알림 시스템 CSS */

/* 알림 팝업 스타일 */
.notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
}

.notification-popup.show {
    transform: translateX(0);
}

.notification-content {
    padding: 16px;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notification-type {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
}

.notification-close:hover {
    color: #333;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.notification-message {
    color: #666;
    line-height: 1.4;
    margin-bottom: 12px;
}

.notification-link {
    display: inline-block;
    background: #007bff;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.notification-link:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* 알림 카운트 배지 */
.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
}

/* 알림 상태 표시 */
.notification-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.notification-status.connected {
    background: #28a745;
    color: white;
}

.notification-status.disconnected {
    background: #ffc107;
    color: #212529;
}

.notification-status.error,
.notification-status.failed {
    background: #dc3545;
    color: white;
}

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

.notification-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.notification-item.unread {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.notification-type-badge {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.notification-type-badge.QUESTION_CREATED {
    background: #17a2b8;
}

.notification-type-badge.ANSWER_CREATED {
    background: #28a745;
}

.notification-type-badge.JOB_POSTING_CREATED {
    background: #007bff;
}

.notification-type-badge.APPLICATION_SUBMITTED {
    background: #ffc107;
    color: #212529;
}

.notification-type-badge.SYSTEM_NOTICE {
    background: #dc3545;
}

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

.notification-item-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.notification-item-content {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

/* 줄바꿈 처리를 위한 클래스 */
.whitespace-pre-line {
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification-item-link {
    color: #007bff;
    text-decoration: none;
    font-size: 13px;
}

.notification-item-link:hover {
    text-decoration: underline;
}

/* 알림 버튼 스타일 */
.notification-button {
    position: relative;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.notification-button:hover {
    background-color: #f8f9fa;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .notification-popup {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .notification-popup {
        background: #2d3748;
        border-color: #4a5568;
        color: white;
    }
    
    .notification-title {
        color: white;
    }
    
    .notification-message {
        color: #cbd5e0;
    }
    
    .notification-item {
        border-bottom-color: #4a5568;
    }
    
    .notification-item:hover {
        background-color: #4a5568;
    }
    
    .notification-item.unread {
        background-color: #2a4a6b;
    }
}