/* Inline alerts (auth / public forms) */

.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert--success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Admin toast notifications */

.toast-stack {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0.875rem 0.875rem 1rem;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transform: translateX(1.25rem);
    transition:
        opacity 0.28s ease,
        transform 0.28s ease;
    pointer-events: auto;
}

.dark .toast {
    background: #171717;
    border-color: var(--color-border-dark);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

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

.toast.is-leaving {
    opacity: 0;
    transform: translateX(1.25rem);
}

.toast__indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    align-self: center;
}

.toast--success .toast__indicator {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.toast--error .toast__indicator {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.toast__message {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--gray-800);
    align-self: center;
}

.dark .toast__message {
    color: var(--brand-offwhite);
}

.toast__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base);
}

.toast__close svg {
    width: 1rem;
    height: 1rem;
}

.toast__close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.dark .toast__close:hover {
    background: #262626;
    color: var(--brand-offwhite);
}
