/* Notification Center */

/* -------------------------------------------------------------------------
   Toast container (top-right)
   ------------------------------------------------------------------------- */

.nc-toasts {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: 100%;
}

.nc-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(28, 28, 30, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: white;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.07);
    pointer-events: all;
    cursor: default;
    transform: translateX(calc(100% + 30px));
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    border-left: 3px solid transparent;
}

.nc-toast--visible {
    transform: translateX(0);
    opacity: 1;
}

.nc-toast--out {
    transform: translateX(calc(100% + 30px));
    opacity: 0;
}

.nc-toast--info    { border-left-color: #64b5f6; }
.nc-toast--success { border-left-color: #66bb6a; }
.nc-toast--warning { border-left-color: #ffa726; }
.nc-toast--error   { border-left-color: #ef5350; }

.nc-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1.2;
    margin-top: 1px;
}

.nc-toast-body {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.nc-toast-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nc-toast-message {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nc-toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
    margin-top: -1px;
}

.nc-toast-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* -------------------------------------------------------------------------
   Tray icon with badge
   ------------------------------------------------------------------------- */

.nc-tray-icon {
    position: relative;
}

.nc-tray-bell {
    font-size: 16px;
    line-height: 1;
}

.nc-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: #ef5350;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(20, 20, 20, 0.9);
    pointer-events: none;
    animation: nc-badge-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nc-badge.hidden {
    display: none !important;
}

@keyframes nc-badge-pop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* -------------------------------------------------------------------------
   Sidebar panel
   ------------------------------------------------------------------------- */

.nc-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100vh;
    height: 100dvh;
    background: rgba(22, 22, 24, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.5);
    z-index: 9997;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.nc-panel--open {
    transform: translateX(0);
}

/* Header */
.nc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.nc-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.nc-clear-all {
    background: none;
    border: none;
    color: rgba(100, 181, 246, 0.85);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.nc-clear-all:hover {
    background: rgba(100, 181, 246, 0.1);
    color: #64b5f6;
}

/* List */
.nc-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.nc-list::-webkit-scrollbar {
    width: 4px;
}

.nc-list::-webkit-scrollbar-track {
    background: transparent;
}

.nc-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

/* Empty state */
.nc-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

.nc-empty.hidden {
    display: none !important;
}

/* Notification item */
.nc-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
    position: relative;
}

.nc-item:last-child {
    border-bottom: none;
}

.nc-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.nc-item--unread {
    background: rgba(255, 255, 255, 0.03);
}

.nc-item--unread::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #64b5f6;
}

.nc-item--info    .nc-item-icon { color: #64b5f6; }
.nc-item--success .nc-item-icon { color: #66bb6a; }
.nc-item--warning .nc-item-icon { color: #ffa726; }
.nc-item--error   .nc-item-icon { color: #ef5350; }

.nc-item-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.3;
    margin-top: 1px;
}

.nc-item-body {
    flex: 1;
    min-width: 0;
}

.nc-item-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 3px;
}

.nc-item-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nc-item-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    white-space: nowrap;
}

.nc-item-message {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nc-item-app {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

.nc-item-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 18px;
    height: 18px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    margin-top: 2px;
}

.nc-item:hover .nc-item-remove {
    opacity: 1;
}

.nc-item-remove:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* -------------------------------------------------------------------------
   Dark theme (data-theme="dark" is default, already dark — these ensure
   light-theme overrides work if ever introduced)
   ------------------------------------------------------------------------- */

[data-theme="light"] .nc-panel {
    background: rgba(245, 245, 247, 0.97);
    border-left-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nc-title {
    color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .nc-item-title {
    color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .nc-item-message {
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .nc-toast {
    background: rgba(255, 255, 255, 0.97);
    color: #1c1c1e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nc-toast-title {
    color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .nc-toast-message {
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .nc-toast-close {
    color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .nc-toast-close:hover {
    color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .nc-empty {
    color: rgba(0, 0, 0, 0.3);
}
