.app-toast-stack {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 100001;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
    transform: translateX(-50%);
}

body.wp-admin .app-toast-stack {
    top: 44px;
}

.app-toast {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 32px;
    gap: 12px;
    align-items: center;
    padding: 14px 14px 14px 12px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #00a32a;
    border-radius: 12px;
    background: #fff;
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.12),
        0 2px 8px rgba(15, 23, 42, 0.06);
    pointer-events: auto;
    animation: appToastIn 0.28s ease both;
}

.app-toast--error {
    border-left-color: #d63638;
}

.app-toast--warning {
    border-left-color: #dba617;
}

.app-toast.is-hiding {
    animation: appToastOut 0.22s ease both;
}

.app-toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 163, 42, 0.1);
    color: #00a32a;
    font-size: 1.2rem;
}

.app-toast--error .app-toast-icon {
    background: rgba(214, 54, 56, 0.1);
    color: #d63638;
}

.app-toast--warning .app-toast-icon {
    background: rgba(219, 166, 23, 0.14);
    color: #996800;
}

.app-toast-content {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.app-toast-content strong {
    color: #1e1e1e;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.app-toast--success .app-toast-content strong {
    color: #007a24;
}

.app-toast--error .app-toast-content strong {
    color: #b32d2e;
}

.app-toast--warning .app-toast-content strong {
    color: #996800;
}

.app-toast-content span {
    color: #50575e;
    font-size: 0.92rem;
    line-height: 1.4;
}

.app-toast-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #8c8f94;
    font-size: 0.9rem;
    cursor: pointer;
}

.app-toast-close:hover,
.app-toast-close:focus {
    background: #f0f0f1;
    color: #1e1e1e;
}

@keyframes appToastIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes appToastOut {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
    }
}

body.site-body .app-toast-stack {
    top: 96px;
}

@media (max-width: 782px) {
    .app-toast-stack {
        top: 16px;
        width: min(420px, calc(100vw - 24px));
    }

    body.wp-admin .app-toast-stack {
        top: 52px;
    }

    body.site-body .app-toast-stack {
        top: 72px;
    }

    .app-toast {
        grid-template-columns: 38px minmax(0, 1fr) 30px;
        padding: 12px;
    }

    .app-toast-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
    }
}
