.chatnoxe-notifications {
    position: fixed;
    z-index: 1080;
    top: 20px;
    right: 20px;
    display: flex;
    width: min(440px, calc(100vw - 40px));
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    pointer-events: none;
}

.chatnoxe-notification {
    --chatnoxe-notification-color: #2563eb;
    --chatnoxe-notification-background: #eff6ff;
    --chatnoxe-notification-border: #bfdbfe;

    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 12px;
    border: 1px solid var(--chatnoxe-notification-border);
    border-left: 4px solid var(--chatnoxe-notification-color);
    border-radius: 14px;
    background: var(--chatnoxe-notification-background);
    box-shadow: 0 12px 32px rgb(15 23 42 / 14%), 0 2px 6px rgb(15 23 42 / 6%);
    color: var(--color-text, #1f2937);
    font-family: "Plus Jakarta Sans", var(--font-family-base, sans-serif);
    opacity: 0;
    pointer-events: auto;
    transform: translateY(-20px);
    transition:
        opacity 300ms cubic-bezier(0.2, 0.75, 0.25, 1),
        transform 300ms cubic-bezier(0.2, 0.75, 0.25, 1);
    will-change: opacity, transform;
}

.chatnoxe-notification--success {
    --chatnoxe-notification-color: var(--color-success, #16a34a);
    --chatnoxe-notification-background: var(--color-success-light, #f0fdf4);
    --chatnoxe-notification-border: #bbf7d0;
}

.chatnoxe-notification--error {
    --chatnoxe-notification-color: var(--color-danger, #dc2626);
    --chatnoxe-notification-background: var(--color-danger-light, #fef2f2);
    --chatnoxe-notification-border: #fecaca;
}

.chatnoxe-notification--warning {
    --chatnoxe-notification-color: var(--color-warning, #d97706);
    --chatnoxe-notification-background: var(--color-warning-light, #fffbeb);
    --chatnoxe-notification-border: #fde68a;
}

.chatnoxe-notification--info {
    --chatnoxe-notification-color: var(--color-info, #2563eb);
    --chatnoxe-notification-background: var(--color-info-light, #eff6ff);
    --chatnoxe-notification-border: #bfdbfe;
}

.chatnoxe-notification--visible {
    opacity: 1;
    transform: translateY(0);
}

.chatnoxe-notification--exiting {
    opacity: 0;
    transform: translateY(-20px);
}

.chatnoxe-notification__icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: rgb(255 255 255 / 75%);
    color: var(--chatnoxe-notification-color);
}

.chatnoxe-notification__icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.chatnoxe-notification__content {
    min-width: 0;
    padding: 2px 0;
}

.chatnoxe-notification__title {
    margin: 0 0 3px;
    color: var(--color-text, #1f2937);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.chatnoxe-notification__message {
    margin: 0;
    color: var(--color-text-secondary, #475569);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.chatnoxe-notification__close {
    display: grid;
    width: 40px;
    height: 40px;
    margin: -1px -2px 0 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-text-muted, #64748b);
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.chatnoxe-notification__close:hover {
    background: rgb(15 23 42 / 7%);
    color: var(--color-text, #1f2937);
}

.chatnoxe-notification__close:focus-visible {
    outline: 3px solid var(--color-focus, #f97316);
    outline-offset: 2px;
}

.chatnoxe-notification__close svg {
    display: block;
    width: 20px;
    height: 20px;
}

@media (max-width: 600px) {
    .chatnoxe-notifications {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .chatnoxe-notification {
        gap: 10px;
        padding: 12px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chatnoxe-notification {
        transition-duration: 1ms;
        will-change: auto;
    }
}
