/* Notices */
.notice {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .75rem 1rem;
    border-radius: var(--radius);
    font-size: .875rem;
    line-height: 1.5;
    border: 1px solid;
}

.notice--warning {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
    color: var(--text);
}

.notice--warning svg {
    flex-shrink: 0;
    margin-top: .15rem;
    color: var(--accent);
}

.notice--error {
    background: color-mix(in srgb, var(--red) 10%, transparent);
    border-color: color-mix(in srgb, var(--red) 30%, transparent);
    color: var(--text);
}

.notice--error svg {
    flex-shrink: 0;
    margin-top: .15rem;
    color: var(--red);
}

.notice--error a:not([class]) {
    color: var(--red);
}

.notice--success {
    background: color-mix(in srgb, var(--green) 10%, transparent);
    border-color: color-mix(in srgb, var(--green) 30%, transparent);
    color: var(--text);
}

.notice--success svg {
    flex-shrink: 0;
    margin-top: .15rem;
    color: var(--green);
}

.notice--info {
    background: color-mix(in srgb, var(--blue) 10%, transparent);
    border-color: color-mix(in srgb, var(--blue) 30%, transparent);
    color: var(--text);
}

.notice--info svg {
    flex-shrink: 0;
    margin-top: .15rem;
    color: var(--blue);
}

.notice--info a:not([class]) {
    color: var(--blue);
}

.notice--event {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: .5rem;
    row-gap: .5rem;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
    color: var(--text);
}

.notice--event svg {
    flex-shrink: 0;
    color: var(--accent);
}

.notice--task {
    align-items: center;
    gap: .75rem;
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.notice__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
}

.notice__text {
    flex: 1;
    min-width: 0;
}

.notice--task .notice__body {
    font-size: .78rem;
}

.notice a.notice__action {
    flex-shrink: 0;
    padding: .45rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s;
}

.notice a.notice__action:hover,
.notice a.notice__action:focus-visible {
    border-color: var(--text-muted);
}

.notice__close {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: -.4rem -.5rem -.4rem 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
}

.notice__close:hover,
.notice__close:focus-visible {
    color: var(--text);
}

.notice__close svg {
    margin-top: 0;
    color: currentColor;
}

.notice__title {
    font-weight: 700;
}

/* The actions of a notice, under its text, spaced like the review notice's list. */
.notice__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}

/* Sized like .notice__action; a notice's link and icon styles do not apply. */
.notice__buttons .btn {
    width: auto;
    padding: .45rem .8rem;
    border: 1px solid transparent;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
}

.notice__buttons .btn svg {
    margin-top: 0;
    color: currentColor;
}

.notice__buttons .btn--ghost {
    border-color: var(--border);
    color: var(--text);
}

.notice__body {
    display: block;
    color: var(--text-muted);
}

.notice--event .notice__body {
    grid-column: 1 / -1;
}

.notice--event a {
    color: var(--accent);
    font-weight: 600;
}

.notice a {
    color: inherit;
    text-decoration: underline;
}

/* Flash messages fade out before they are removed. */
.flash {
    transition: opacity .3s ease;
}

.flash--leaving {
    opacity: 0;
}

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