/* KINGOFCS / NOGCP Notification UI
   Horizontal light theme compatible.
   This file intentionally contains only the shared notification component. */

#nogcp-notify-stack.notify-stack,
.notify-stack.nogcp-notify-stack {
    position: fixed;
    right: 20px;
    bottom: 92px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(400px, calc(100vw - 32px));
    pointer-events: none;
    font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#nogcp-notify-stack .notify-item,
.notify-stack.nogcp-notify-stack .notify-item {
    --notify-accent: #0b6ff5;
    --notify-accent-strong: #0759c7;
    --notify-soft: #eff6ff;
    --notify-border: #bfdbfe;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    pointer-events: auto;
    border: 1px solid var(--notify-border) !important;
    border-radius: 17px;
    background:
        radial-gradient(circle at 96% 0%, color-mix(in srgb, var(--notify-accent) 10%, transparent), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #ffffff 58%, var(--notify-soft) 145%);
    color: #334155;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, .16),
        0 2px 8px rgba(15, 23, 42, .05),
        inset 0 1px 0 rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

#nogcp-notify-stack .notify-item::before,
.notify-stack.nogcp-notify-stack .notify-item::before {
    content: "";
    position: absolute;
    z-index: 2;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(180deg, var(--notify-accent), var(--notify-accent-strong));
    box-shadow: 0 0 18px color-mix(in srgb, var(--notify-accent) 26%, transparent);
    pointer-events: none;
}

#nogcp-notify-stack .notify-item::after,
.notify-stack.nogcp-notify-stack .notify-item::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -34px;
    top: -42px;
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--notify-accent) 8%, transparent);
    pointer-events: none;
}

#nogcp-notify-stack .notify-head,
.notify-stack.nogcp-notify-stack .notify-head {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 58px;
    padding: 12px 12px 8px 16px;
}

#nogcp-notify-stack .notify-icon,
.notify-stack.nogcp-notify-stack .notify-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    align-self: center;
    padding: 0 !important;
    border: 1px solid var(--notify-border);
    border-radius: 12px;
    background: var(--notify-soft);
    color: var(--notify-accent) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

#nogcp-notify-stack .notify-icon i,
.notify-stack.nogcp-notify-stack .notify-icon i {
    font-size: 16px !important;
    line-height: 1;
}

#nogcp-notify-stack .notify-title,
.notify-stack.nogcp-notify-stack .notify-title {
    overflow: hidden;
    color: var(--notify-accent-strong) !important;
    font-family: "Exo 2", "Open Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.3;
    letter-spacing: -.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#nogcp-notify-stack .notify-body,
.notify-stack.nogcp-notify-stack .notify-body {
    max-height: 180px;
    overflow: auto;
    margin: 0;
    padding: 0 48px 15px 65px;
    color: #475569 !important;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.62;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

#nogcp-notify-stack .notify-body::-webkit-scrollbar,
.notify-stack.nogcp-notify-stack .notify-body::-webkit-scrollbar {
    width: 5px;
}

#nogcp-notify-stack .notify-body::-webkit-scrollbar-thumb,
.notify-stack.nogcp-notify-stack .notify-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cbd5e1;
}

#nogcp-notify-stack .notify-close,
.notify-stack.nogcp-notify-stack .notify-close {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    margin-left: auto;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    outline: 0;
    background: rgba(248, 250, 252, .88);
    color: #64748b !important;
    opacity: 1;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}

#nogcp-notify-stack .notify-close:hover,
.notify-stack.nogcp-notify-stack .notify-close:hover {
    border-color: var(--notify-border);
    background: var(--notify-soft);
    color: var(--notify-accent-strong) !important;
    transform: translateY(-1px);
}

#nogcp-notify-stack .notify-close:focus-visible,
.notify-stack.nogcp-notify-stack .notify-close:focus-visible {
    border-color: var(--notify-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--notify-accent) 13%, transparent);
}

#nogcp-notify-stack .notify-item.success,
.notify-stack.nogcp-notify-stack .notify-item.success {
    --notify-accent: #10b981;
    --notify-accent-strong: #047857;
    --notify-soft: #ecfdf5;
    --notify-border: #a7f3d0;
}

#nogcp-notify-stack .notify-item.warning,
.notify-stack.nogcp-notify-stack .notify-item.warning {
    --notify-accent: #f59e0b;
    --notify-accent-strong: #b45309;
    --notify-soft: #fffbeb;
    --notify-border: #fde68a;
}

#nogcp-notify-stack .notify-item.danger,
#nogcp-notify-stack .notify-item.error,
.notify-stack.nogcp-notify-stack .notify-item.danger,
.notify-stack.nogcp-notify-stack .notify-item.error {
    --notify-accent: #e11d48;
    --notify-accent-strong: #be123c;
    --notify-soft: #fff1f2;
    --notify-border: #fecdd3;
}

#nogcp-notify-stack .notify-item.info,
.notify-stack.nogcp-notify-stack .notify-item.info {
    --notify-accent: #0b6ff5;
    --notify-accent-strong: #0759c7;
    --notify-soft: #eff6ff;
    --notify-border: #bfdbfe;
}

@media (max-width: 640px) {
    #nogcp-notify-stack.notify-stack,
    .notify-stack.nogcp-notify-stack {
        right: 10px;
        bottom: 76px;
        left: 10px;
        width: auto;
        gap: 9px;
    }

    #nogcp-notify-stack .notify-item,
    .notify-stack.nogcp-notify-stack .notify-item {
        border-radius: 15px;
    }

    #nogcp-notify-stack .notify-head,
    .notify-stack.nogcp-notify-stack .notify-head {
        padding: 10px 10px 7px 14px;
    }

    #nogcp-notify-stack .notify-icon,
    .notify-stack.nogcp-notify-stack .notify-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 11px;
    }

    #nogcp-notify-stack .notify-body,
    .notify-stack.nogcp-notify-stack .notify-body {
        max-height: 145px;
        padding: 0 44px 13px 61px;
        font-size: 11.5px;
        line-height: 1.55;
    }

    #nogcp-notify-stack .notify-close,
    .notify-stack.nogcp-notify-stack .notify-close {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #nogcp-notify-stack .notify-item,
    #nogcp-notify-stack .notify-close,
    .notify-stack.nogcp-notify-stack .notify-item,
    .notify-stack.nogcp-notify-stack .notify-close {
        transition: none !important;
    }
}
