.app-notification-region {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    width: min(420px, calc(100vw - 48px));
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.app-notification {
    --app-notification-accent: var(--primary-color, #cf1f1f);
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 16px;
    overflow: hidden;
    color: #fff;
    background: #191919;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 3px solid var(--app-notification-accent);
    border-radius: 20px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    pointer-events: auto;
    opacity: 0;
    transform: translate3d(24px, -10px, 0);
    transition: opacity 220ms ease, transform 220ms ease;
}

.app-notification.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.app-notification.is-leaving {
    opacity: 0;
    transform: translate3d(24px, -10px, 0);
}

.app-notification__icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--app-notification-accent);
}

.app-notification__icon svg {
    width: 24px;
    height: 24px;
}

.app-notification__title {
    margin: 0 0 4px;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
}

.app-notification__message {
    margin: 0;
    color: #d8d8d8;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.app-notification__close {
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    color: #bdbdbd;
    background: transparent;
    border: 0;
    border-radius: 50%;
    place-items: center;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}

.app-notification__close:hover,
.app-notification__close:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    outline: 2px solid var(--app-notification-accent);
    outline-offset: 2px;
}

.app-notification--success {
    --app-notification-accent: #55d98b;
}

.app-notification--error {
    --app-notification-accent: #ff6b6b;
}

.app-notification--warning {
    --app-notification-accent: #f5c451;
}

.app-notification--info {
    --app-notification-accent: #65b9ff;
}

.app-notification-data {
    display: none;
}

.app-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3100;
    display: grid;
    padding: 24px;
    background: rgba(0, 0, 0, 0.68);
    place-items: center;
}

.app-confirm {
    width: min(420px, 100%);
    padding: 24px;
    color: #fff;
    background: #191919;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
    animation: app-confirm-in 220ms ease both;
}

.app-confirm__title {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.1rem;
}

.app-confirm__message {
    margin: 0 0 22px;
    color: #d8d8d8;
    line-height: 1.8;
}

.app-confirm__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.app-confirm__button {
    min-width: 92px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
}

.app-confirm__button--confirm {
    color: #fff;
    background: var(--primary-color, #cf1f1f);
}

.app-confirm__button--cancel {
    color: #e6e6e6;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.18);
}

.app-confirm__button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@keyframes app-confirm-in {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .app-notification-region {
        top: 14px;
        right: 14px;
        left: 14px;
        width: auto;
    }

    .app-notification {
        transform: translate3d(0, -10px, 0);
    }

    .app-notification.is-leaving {
        transform: translate3d(0, -10px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-notification,
    .app-confirm {
        animation: none;
        transition: none;
    }
}
