:root {
    --hue: 223;
    --bg: hsl(var(--hue), 10%, 90%);
    --fg: hsl(var(--hue), 10%, 10%);
    --br: 8px;
    --transDur: 0.15s;
}

/* Animations */
@keyframes flyIn {
    from {
        transform: translateX(calc(100% + 1.5em));
    }

    to {
        transform: translateX(0);
    }
}

@keyframes flyOut {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(100% + 1.5em));
    }
}

@keyframes rotate {
    0% {
        transform: rotateZ(0deg);
    }

    100% {
        transform: rotateZ(360deg);
    }
}

.notification {
    padding-bottom: 0.75em;
    position: fixed;
    top: 1.5em;
    right: 1.5em;
    width: 36.75em;
    max-width: calc(100% - 3em);
    transition: transform 0.15s ease-out;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    z-index: 99999;
}

.notification__box,
.notification__content,
.notification__btns {
    display: flex;
}

.notification__box,
.notification__content {
    align-items: center;
}

.notification__box {
    position: relative;
    animation: flyIn 0.3s ease-out;
    background-color: hsl(0deg 0% 98.76%);
    border-radius: var(--br);
    box-shadow: 0 0.5em 1em hsla(var(--hue), 10%, 10%, 0.1);
    height: 100%;
    transition:
        background-color var(--transDur),
        color var(--transDur);
    overflow: hidden;
}

.notification--out .notification__box {
    animation: flyOut 0.3s ease-out forwards;
}

.notification__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(to right, #cdcdcd, #cfcfcf, #c8c8c8, #e3e3e3);
    /* transition: width 10s linear;  */
    border-radius: var(--br);
}

.notification__content {
    padding: 18px 10px;
    width: 100%;
    height: 100%;
}

.notification__icon {
    flex-shrink: 0;
    margin-right: 0.75em;
    width: 2em;
    height: 2em;
}

.notification__icon-svg {
    width: 100%;
    height: auto;
}

.notification__text {
    line-height: 1.333;
    font-family: sans-serif;
    color: #000000;
    transition: transform 300ms ease;
}

.notification__text:hover {
    transform: translateX(0.15rem)
}

.notification__text-title {
    font-size: 21px;
    color: #228b22;
    font-weight: bold;
        margin-bottom: 5px;
}

.notification__text-subtitle {
    font-size: 16px;
    opacity: 0.75;
}

.notification__btns {
    box-shadow: -1px 0 0 hsla(var(--hue), 10%, 10%, 0.15);
    flex-direction: column;
    flex-shrink: 0;
    min-width: 4em;
    height: 100%;
    transition: box-shadow var(--transDur);
}

.notification__btn {
    border: 1px solid #fafafa;
    border-left: 1px solid #f2f2f2;
    background-color: transparent;
    box-shadow: 0 0 0 hsla(var(--hue), 10%, 10%, 0.5) inset;
    font-size: 14px;
    line-height: 1;
    font-weight: 500;
    height: 100%;
    padding: 0 0.5rem;
    transition:
        background-color var(--transDur),
        color var(--transDur);
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.notification__btn-text {
    display: inline-block;
    pointer-events: none;
    color: #000000;
}

.notification__btn:first-of-type {
    border-radius: 0 var(--br) 0 0;
}

.notification__btn:last-of-type {
    border-radius: 0 0 var(--br) 0;
}

.notification__btn:only-child {
    border-radius: 0 var(--br) var(--br) 0;
}

.notification__btn+.notification__btn {
    box-shadow: 0 -1px 0 hsla(var(--hue), 10%, 10%, 0.15);
    font-weight: 400;
}

.notification__btn:active,
.notification__btn:focus {
    background-color: hsl(var(--hue), 10%, 95%);
}

.notification__btn:focus {
    outline: transparent;
}

@supports selector(:focus-visible) {
    .notification__btn:focus {
        background-color: transparent;
    }

    .notification__btn:focus-visible,
    .notification__btn:active {
        background-color: hsl(var(--hue), 10%, 95%);
    }
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    /* :root {
--bg: hsl(var(--hue), 10%, 10%);
--fg: hsl(var(--hue), 10%, 90%);
} */

    .notification__box {
        background-color: hsl(var(--hue), 10%, 30%);
    }

    .notification__text {
        color: #fff;
    }

    .notification__btns {
        box-shadow: -1px 0 0 hsla(var(--hue), 10%, 90%, 0.15);
    }

    .notification__btn+.notification__btn {
        box-shadow: 0 -1px 0 hsla(var(--hue), 10%, 90%, 0.15);
    }

    .notification__btn {
        border: 1px solid #494949;
    }

    .notification__btn:active,
    .notification__btn:focus {
        background-color: hsl(var(--hue), 10%, 35%);
    }

    .notification__btn-text {
        color: #ffffff;
    }

    @supports selector(:focus-visible) {
        .notification__btn:focus {
            background-color: transparent;
        }

        .notification__btn:focus-visible,
        .notification__btn:active {
            background-color: hsl(var(--hue), 10%, 35%);
        }
    }
}

/***************************************** form *****************************************/
[data-form="loading"] {
    position: relative;
}

[data-form="loading"]::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: var(--br);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1;
}

/***************************************** loading *****************************************/
@keyframes rotate {
    0% {
        transform: rotateZ(0deg);
    }

    100% {
        transform: rotateZ(360deg);
    }
}

/* [data-form="loading"] .loading {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -60px 0 0 -60px;
    width: 85px;
    height: 85px;
    border-radius: 100%;
    z-index: 2;
}

[data-form="loading"] .loading:after {
    content: '';
    background: trasparent;
    width: 140%;
    height: 140%;
    position: absolute;
    border-radius: 100%;
    top: -20%;
    left: -20%;
    opacity: 0.7;
    box-shadow: rgba(102, 102, 102, 0.6) -4px -5px 3px -3px;
    animation: rotate 1s infinite linear;
    z-index: 1;
} */
