/* Shared feedback primitives (toast/notifications) */

.aeg-toast-container {
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.aeg-toast {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 24px;
    align-items: start;
    gap: 10px;
    width: min(320px, calc(100vw - 48px));
    padding: 12px 12px 12px 14px;
    border: 0;
    border-radius: 0;
    background: var(--surface-card, #ffffff);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-main);
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
    pointer-events: auto;
}

.aeg-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.aeg-toast-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: var(--primary);
}

.aeg-toast-icon-box svg {
    width: 16px;
    height: 16px;
}

.aeg-toast-content {
    min-width: 0;
}

.aeg-toast-title {
    margin: 0 0 2px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.aeg-toast-message {
    color: var(--text-secondary, var(--text-muted));
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.aeg-toast-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.aeg-toast-close:hover {
    background: var(--primary-muted);
    color: var(--primary);
}

.aeg-toast-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (max-width: 720px) {
    .aeg-toast-container {
        left: 12px;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        align-items: stretch;
    }

    .aeg-toast {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aeg-toast {
        transition: none;
    }
}
