/**
 * ═══════════════════════════════════════════════════════════════════════════
 * NOTIFICATIONS SIDEBAR - Styling
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════════════
   SIDEBAR CONTAINER
   ═══════════════════════════════════════════════════════════════════════ */
.notifications-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notifications-sidebar.open {
    right: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   OVERLAY
   ═══════════════════════════════════════════════════════════════════════ */
.notifications-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.notifications-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════ */
.notifications-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notifications-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notifications-actions {
    display: flex;
    gap: 8px;
}

.notifications-actions .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.notifications-actions .btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════════════
   FILTERS
   ═══════════════════════════════════════════════════════════════════════ */
.notifications-filters {
    display: flex;
    padding: 12px;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow-x: auto;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-btn .badge {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.filter-btn.active .badge {
    background: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════
   BODY (NOTIFICATIONS LIST)
   ═══════════════════════════════════════════════════════════════════════ */
.notifications-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════
   NOTIFICATION ITEM
   ═══════════════════════════════════════════════════════════════════════ */
.notification-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    transition: all 0.2s;
    position: relative;
}

.notification-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.notification-item.unread {
    background: #f0f9ff;
    border-color: #0ea5e9;
    border-left: 4px solid #0ea5e9;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notification-icon.action {
    background: #fef3c7;
    color: #f59e0b;
}

.notification-icon.info {
    background: #dbeafe;
    color: #3b82f6;
}

.notification-icon.warning {
    background: #fee2e2;
    color: #ef4444;
}

.notification-icon.success {
    background: #d1fae5;
    color: #10b981;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

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

.notification-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.notification-time {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

.notification-message {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.btn-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}

.notification-item:hover .btn-delete {
    opacity: 1;
}

.btn-delete:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════════════
   NOTIFICATION ACTIONS
   ═══════════════════════════════════════════════════════════════════════ */
.notification-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-action-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.notification-action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.notification-action-btn.primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a428f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════ */
.empty-notifications {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

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

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

/* ═══════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════ */
.notification-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 360px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 12px;
    z-index: 10001;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-toast.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

.notification-toast.action {
    border-left: 4px solid #f59e0b;
}

.notification-toast.info {
    border-left: 4px solid #3b82f6;
}

.notification-toast.warning {
    border-left: 4px solid #ef4444;
}

.notification-toast.success {
    border-left: 4px solid #10b981;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notification-toast.action .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.notification-toast.info .toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.notification-toast.warning .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.notification-toast.success .toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-content h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.toast-content p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.toast-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.toast-close:hover {
    background: #f1f5f9;
    color: #475569;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .notifications-sidebar {
        width: 100%;
        right: -100%;
    }

    .notification-toast {
        width: calc(100% - 48px);
        bottom: 16px;
        right: 24px;
        left: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════ */
.notifications-body::-webkit-scrollbar {
    width: 6px;
}

.notifications-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.notifications-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.notifications-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
