@keyframes fadeout {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes shorten {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

@keyframes insert-left {
    from {
        transform: rotateY(-70deg);
        transform-origin: left;
    }
    to {
        transform: rotateY(0deg);
        transform-origin: left;
    }
}

@keyframes insert-right {
    from {
        transform: rotateY(-70deg);
        transform-origin: right;
    }
    to {
        transform: rotateY(0deg);
        transform-origin: right;
    }
}

.gn-wrapper {
    position: fixed;
    overflow: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    z-index: 1080;
}

.gn-top-right,
.gn-bottom-right {
    align-items: flex-end;
}

.gn-top-left,
.gn-bottom-left {
    align-items: flex-start;
}

.gn-top-right {
    top: 0;
    right: 0;
}
.gn-top-left {
    top: 0;
    left: 0;
}
.gn-bottom-right {
    bottom: 0;
    right: 0;
}
.gn-bottom-left {
    bottom: 0;
    left: 0;
}

.gn-notification {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    box-shadow: 1px 1px 3px black;
    border-radius: 3px;
    overflow: hidden;
    margin: 1rem;
    cursor: default;
    animation-duration: 1000ms;
    animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
    animation-fill-mode: forwards;
    pointer-events: all;
    min-width: 10rem;
    max-width: 25rem;
    position: relative;
    transition: background-color .2s ease-in-out;
}

.gn-insert {
    animation-duration: 250ms;
    animation-timing-function: cubic-bezier(0.23, 1, 0.320, 1);
    animation-fill-mode: forwards;
}

.gn-top-left .gn-insert,
.gn-bottom-left .gn-insert {
    animation-name: insert-left;
}

.gn-top-right .gn-insert,
.gn-bottom-right .gn-insert {
    animation-name: insert-right;
}

.gn-close-on-click {
    cursor: pointer;
}
.gn-close {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1rem;
    padding: 0.5rem;
    border-left: 1px solid rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    border-bottom-left-radius: 3px;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 100ms ease-in;
    cursor: pointer;
    user-select: none;
    -moz-user-select: none;
}
.gn-notification:hover .gn-close {
    opacity: 1;
}
.gn-close:hover {
    background: rgba(0, 0, 0, 0.6);
}
.gn-close.gn-close-title {
    display: flex;
    align-items: center;
    bottom: 0;
    border-bottom: 0;
    border-bottom-left-radius: 0;
}

.gn-notification > h1 {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}
.gn-notification > h3 {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.gn-fadeout {
    animation-duration: 1000ms;
    animation-name: fadeout;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.gn-lifespan {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #4dd0e1;
    transition: height .4s ease-in-out, width 0s linear;
}
.gn-extinguish {
    animation-duration: 1000ms;
    animation-name: shorten;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}
.gn-lifespan.gn-retire {
    height: 0px;
}

.gn-success {
    background-color: #689f38;
    color: white;
}
.gn-info {
    background-color: #0288d1;
    color: white;
    font-size: 0.75rem; 
}
.gn-error {
    background-color: #b42f2d;
    color: white;
}
.gn-warning {
    background-color: #d87a00;
    color: white;
}
.gn-message {
    background-color: #333333;
    color: white;
}

.gn-content {
    display: flex;
    flex: 1;
    align-content: space-between;
    align-items: center;
}
.gn-content > img {
    max-width: 50%;
    max-height: 20rem;
    flex-shrink: 0;
}
.gn-content .gn-text {
    max-width: 100%;
    word-break: break-word;
    font-size: 0.8rem;
}
.gn-content > img:only-child,
.gn-content .gn-text:only-child {
    max-width: 100%;
}
.gn-notification > h1,
.gn-notification > h3,
.gn-content .gn-text {
    padding: 0.5rem;
    margin: 0;
}

.gn-content .gn-text a {
    color: rgba(255, 255, 255, 0.8);
    transition: all .2s ease-in-out;
}
.gn-content .gn-text a:hover {
    text-shadow: 1px 0 1px rgba(255, 255, 255, 0.8);
    border-radius: 2px;
}
.gn-content .gn-text h1,
.gn-content .gn-text h3,
.gn-content .gn-text h2 {
    margin: 0.5rem 0;
}
.gn-content .gn-text h1 .gn-text h3 {
    font-size: 1.2rem;
}
.gn-content .gn-text h2 .gn-text h4 {
    font-size: 1.1rem;
}
.gn-content .gn-text img {
    height: auto;
    max-width: 100%;
    margin: 0.1rem 0;
}
.gn-bold {
    font-weight: bold;
}
.gn-italic {
    font-style: italic;
}
.gn-code {
    font-family: SFMono-Regular, Menlo, "Lucida Console", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    padding: 0.1rem 0.2rem;
    background-color: #333333;
    color: #f7f7f7;
    line-height: 1.4;
    border-radius: 2px;
    box-shadow: 0 0 1px #333333;
}
.gn-message .gn-code {
    background-color: #4D4D4D;
    box-shadow: 0 0 1px #4D4D4D;
}
.gn-separator {
    display: block;
    width: 100%;
    border-bottom: 1px solid white;
    border-radius: 4px;
    height: 2px;
    line-height: 0px;
    margin: .75rem 0;
}

.gn-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: stretch;
    align-items: stretch;
    align-content: stretch;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.4);
}
.gn-button {
    width: 100%;
    padding: .5rem;
    border: 0;
    cursor: pointer;
    border-right: 1px solid rgba(0, 0, 0, 0.4);
    transition: all 0.1s ease-in;
    font-size: 1rem;
}
.gn-button:hover {
    background: rgba(0, 0, 0, 0.6);
}
.gn-button:disabled {
    background: rgba(0, 0, 0, 0.6);
    filter: grayscale(60%);
}
.gn-button:last-child {
    border-right: 0;
}