/**
 * @author: Yoann Le Crom <yoann.lecrom@abstractive.fr>
 */

.Alert {
    --alert-color: var(--info-color);
    position: relative;
    display: flex;
    font-weight: 600;
    align-items: center;
    padding: 1rem 2.8rem 1rem 1rem;
    background: var(--body-bg-color-alt);
    border-radius: .4rem;
    border-left: .4rem solid var(--alert-color);
    background-size: 2rem;
    transition: .5s visibility, .5s opacity, .5s height, .5s padding, .5s margin;
}
.Alert::before {
    content: '';
    display: inline-block;
    flex: 0 0 auto;
    width: 2em;
    height: 2em;
    margin-right: 1rem;
    mask-image: url("data:image/svg+xml;charset=utf8,%3Csvg enable-background='new 0 0 18 18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m15 0h-12c-1.7 0-3 1.3-3 3v12c0 1.7 1.3 3 3 3h12c1.7 0 3-1.3 3-3v-12c0-1.7-1.3-3-3-3zm-5 12.9c-.2.1-.4.2-.6.2s-.4-.1-.6-.2-.2-.3-.2-.6.1-.5.2-.6c.2-.1.4-.2.6-.2s.4.1.6.2.2.3.2.6c.1.3 0 .5-.2.6zm0-2.3h-1.2l-.2-4.7h1.7z'/%3E%3C/svg%3E");
    background-color: var(--alert-color);
}

.Alert + .Alert {
    margin-top: .5rem;
}

.Alert-closeBtn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2.8rem;
    line-height: .8;
    padding: 0;
    border: none;
    color: inherit;
    background: none;
}
.Alert-closeBtn::after {
    content: '\00d7';
    font-weight: 200;
    display: block;
    transition: color .5s ease;
}
.Alert-closeBtn:hover::after {
    color: var(--secondary-color);
}

.Alert--error {
    --alert-color: var(--error-color);
}

.Alert--warning {
    --alert-color: var(--warning-color);
}

.Alert--success {
    --alert-color: var(--success-color);
}

.Alert.hide {
    visibility: hidden;
    opacity: 0;
    height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

@media (max-width: 1400px) {
    .Alert::before {
        width: 1.5em;
        height: 1.5em;
    }
}
