.app-toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    left: auto;
    z-index: 100001;
    display: grid;
    gap: 10px;
    width: min(400px, calc(100vw - 32px));
    pointer-events: none;
    transform: none;
}

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 var(--border-color, #e5e7eb);
    border-left: 4px solid var(--primary, #1a1a1a);
    border-radius: 0;
    background: var(--card-bg, #fff);
    font-family: var(--font-primary, 'Poppins', sans-serif);
    box-shadow:
        0 12px 34px rgba(15, 23, 42, 0.14),
        0 2px 8px rgba(15, 23, 42, 0.06);
    pointer-events: auto;
    animation: appToastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) 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: 0;
    background: var(--theme-primary-soft, rgba(26, 35, 90, 0.1));
    color: var(--primary, #1a1a1a);
    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: var(--primary, #1a1a1a);
}

.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: 0;
    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: translateX(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes appToastOut {
    to {
        opacity: 0;
        transform: translateX(24px) scale(0.98);
    }
}

body.site-body .app-toast-stack {
    top: 96px;
}

@media (max-width: 782px) {
    .app-toast-stack {
        top: 16px;
        right: 12px;
        left: 12px;
        width: auto;
        justify-items: end;
    }

    .app-toast {
        width: min(400px, 100%);
    }

    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;
    }
}
