.app-notifications {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1080;
    display: flex;
    width: min(17rem, calc(100vw - 2rem));
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.app-notification {
    position: relative;
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) 1.25rem;
    align-items: start;
    gap: 0.7rem;
    min-height: 3.4rem;
    padding: 0.75rem 0.65rem 0.85rem 0.8rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    background: #ffffff;
    color: #171923;
    box-shadow: 0 5px 16px rgba(23, 25, 35, 0.2);
    pointer-events: auto;
    animation: app-notification-enter 0.18s ease-out both;
}

.app-notification-icon {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    margin-top: 0.02rem;
    border-radius: 50%;
    background: #dbeafe;
    color: #1683d8;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
}

.app-notification-info .app-notification-icon {
    border: 2px solid #1683d8;
    background: transparent;
    animation: app-notification-spin 1s linear infinite;
}

.app-notification-info .app-notification-icon::before {
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 50%;
    background: #1683d8;
    content: "";
}

.app-notification-success .app-notification-icon {
    background: #d9f5df;
    color: #078b18;
}

.app-notification-error .app-notification-icon {
    background: #ffe0e0;
    color: #ef1515;
}

.app-notification-warning .app-notification-icon {
    background: #fff0c7;
    color: #ed9900;
}

.app-notification-content {
    min-width: 0;
    padding-top: 0.02rem;
}

.app-notification-summary,
.app-notification-detail {
    overflow-wrap: anywhere;
}

.app-notification-summary {
    margin-bottom: 0.2rem;
    color: #171923;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
}

.app-notification-detail {
    color: #4a5568;
    font-size: 0.7rem;
    line-height: 1.4;
}

.app-notification-close {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    margin: -0.2rem -0.1rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #718096;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
}

.app-notification-close:hover {
    background: #f0f4f8;
    color: #171923;
}

.app-notification-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #1683d8;
    transform-origin: left;
    animation-name: app-notification-progress;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.app-notification-info .app-notification-progress {
    background: #1683d8;
    animation: app-notification-indeterminate 1.2s ease-in-out infinite;
}

.app-notification-success .app-notification-progress {
    background: #078b18;
}

.app-notification-error .app-notification-progress {
    background: #ef1515;
}

.app-notification-warning .app-notification-progress {
    background: #ed9900;
}

@keyframes app-notification-enter {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes app-notification-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@keyframes app-notification-indeterminate {
    0% {
        transform: scaleX(0.15);
        transform-origin: left;
    }

    50% {
        transform: scaleX(0.7);
        transform-origin: left;
    }

    100% {
        transform: scaleX(0.15);
        transform-origin: right;
    }
}

@keyframes app-notification-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {
    .app-notifications {
        right: 0.75rem;
        bottom: 0.75rem;
        width: calc(100vw - 1.5rem);
    }
}
