/* The notice stack: one file, the same class names the back office uses. */

#toast-container {
    position: fixed;
    top: 5rem;
    right: 1.25rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 16rem;
    max-width: 24rem;
    padding: 0.75rem 0.875rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 18px 45px -15px rgba(0,0,0,.18);
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
    border-left: 0.25rem solid var(--blue);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left-color: var(--green);
}

.toast-failure {
    border-left-color: var(--red);
}

.toast-warning {
    border-left-color: var(--amber);
}

.toast-info {
    border-left-color: var(--blue);
}

.toast-icon {
    flex-shrink: 0;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toast-success .toast-icon {
    color: var(--green);
}

.toast-failure .toast-icon {
    color: var(--red);
}

.toast-warning .toast-icon {
    color: var(--amber);
}

.toast-info .toast-icon {
    color: var(--blue);
}

.toast-message {
    flex: 1;
    font-size: 12px;
    color: var(--ink);
    line-height: 1.5;
    word-break: break-word;
}

.toast-close {
    flex-shrink: 0;
    border: none;
    background: none;
    color: var(--ink3);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease;
}

.toast-close:hover,
.toast-close:focus {
    color: var(--ink);
    outline: none;
}

@media (max-width: 768px) {
    #toast-container {
        top: 4.5rem;
        right: 1rem;
        left: 1rem;
        align-items: stretch;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

