/**
 * NotificationPanel Component Styles
 * 
 * Slide-out panel styling with notification items,
 * type indicators, and RAG color coding.
 */

/* Overlay background */
.notification-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    animation: overlay-fade-in 0.2s ease-out;
}

@keyframes overlay-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Panel container */
.notification-panel {
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    animation: panel-slide-in 0.3s ease-out;
}

@keyframes panel-slide-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Panel header */
.notification-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.notification-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.notification-panel-header .close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #000;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-panel-header .close-btn:hover {
    opacity: 1;
}

/* Actions bar */
.notification-panel-actions {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

/* Panel body */
.notification-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Empty state */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6c757d;
}

.notification-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 16px;
}

/* Notification item */
.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

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

/* Acknowledged notification styling */
.notification-item.notification-acknowledged {
    background: #f8f9fa;
    opacity: 0.7;
}

.notification-item.notification-acknowledged .notification-title {
    font-weight: 500;
}

/* Notification item header */
.notification-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.notification-type-indicator {
    font-size: 18px;
    flex-shrink: 0;
}

.notification-title {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* Notification message */
.notification-message {
    font-size: 13px;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Notification item actions */
.notification-item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Type-specific styling */
.notification-type-new_referral {
    color: #0d6efd;
}

.notification-type-referral_rejected {
    color: #c53030;
}

.notification-type-rag_escalation {
    color: #fd7e14;
}

/* RAG color indicators */
.notification-type-rag_escalation.rag-red {
    color: #c53030;
}

.notification-type-rag_escalation.rag-amber {
    color: #fd7e14;
}

/* Button styles for panel */
.notification-panel .btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.notification-panel .btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

.notification-panel .btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.notification-panel .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.notification-panel .btn-outline {
    background: transparent;
    color: #6c757d;
    border-color: #6c757d;
}

.notification-panel .btn-outline:hover {
    background: #6c757d;
    color: white;
}

.notification-panel .btn-link {
    background: transparent;
    color: #0d6efd;
    border: none;
    padding: 4px 8px;
    text-decoration: none;
}

.notification-panel .btn-link:hover {
    text-decoration: underline;
    color: #0a58ca;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .notification-panel {
        width: 100vw;
    }
    
    .notification-panel-header {
        padding: 14px 16px;
    }
    
    .notification-panel-header h3 {
        font-size: 16px;
    }
    
    .notification-item {
        padding: 14px 16px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
}
