/****************************************************************
*****\=GENERAL ITEMS  \*******************************************************
******************************************************************************/

/*  General ----------------------------------------*/
.un-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000000000000;
    width: 100%;
}

.un-box, .un-box *, .un-box *:after, .un-box *:before { /* BOX SIZING */
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/*  Common, default styles for the notification box */
.un-box { /*position: fixed;*/
    background: #fff;
    color: #333;
    padding: 20px;
    line-height: 1.4;
    z-index: 1000000000000;
    pointer-events: none;
    /* TRANSFORM ORIGIN */ -webkit-transform-origin: 0 0;
    -moz-transform-origin: 0 0;
    -ms-transform-origin: 0 0;
    -o-transform-origin: 0 0;
    transform-origin: 0 0;
}

    .un-box .un__inner {
        position: relative;
        padding: 0 40px 0 0;
    }

    .un-box.un-show {
        pointer-events: auto;
    }

    .un-box a {
        color: inherit !important;
        text-decoration: underline !important;
        opacity: 0.7;
        font-weight: 600;
    }

        .un-box a:hover,
        .un-box a:focus {
            opacity: 1;
        }

    .un-box p {
        margin: 0;
        padding: 0.25em 0 0.25em 0;
        color: inherit !important;
    }

    .un-box.un-show,
    .un-box.un-showload,
    .un-box.un-visible {
        pointer-events: auto;
    }


/*  Close icon ---------------------------------*/
.un__close {
    width: 40px;
    height: 40px;
    position: absolute;
    right: 0;
    top: 50%;
    overflow: hidden;
    text-indent: 100%;
    cursor: pointer;
    /* BACKFACE  */ -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    /* TRANSFORM */ -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}

    .un__close:hover,
    .un__close:focus {
        outline: none;
    }

    .un__close::before,
    .un__close::after {
        content: '';
        position: absolute;
        width: 1px;
        height: 60%;
        top: 50%;
        left: 50%;
        background: #333;
    }

    .un__close:hover::before,
    .un__close:hover::after {
        width: 2px;
    }

    .un__close::before { /* TRANSFORM */
        -webkit-transform: translate(-50%,-50%) rotate(45deg);
        -moz-transform: translate(-50%,-50%) rotate(45deg);
        -ms-transform: translate(-50%,-50%) rotate(45deg);
        -o-transform: translate(-50%,-50%) rotate(45deg);
        transform: translate(-50%,-50%) rotate(45deg);
    }

    .un__close::after { /* TRANSFORM */
        -webkit-transform: translate(-50%,-50%) rotate(-45deg);
        -moz-transform: translate(-50%,-50%) rotate(-45deg);
        -ms-transform: translate(-50%,-50%) rotate(-45deg);
        -o-transform: translate(-50%,-50%) rotate(-45deg);
        transform: translate(-50%,-50%) rotate(-45deg);
    }



/*  Top bar notifications */
.un-box.un--topbar {
    top: 0;
    left: 0;
    width: 100%;
}

/*  Hide the Notification ----------------------------------*/
un--topbar.un-hide {
    -webkit-animation-direction: reverse;
    -moz-animation-direction: reverse;
    -o-animation-direction: reverse;
    animation-direction: reverse;
}


/*  Notification Types -------------------------------------- */
.un--default {
    background: #fff;
    color: #333;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
}

.un--dark {
    background: #2c3e50;
    color: #bdc3c7;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
}

.un--info {
    background: #3498db;
    color: #fff;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
}

.un--success {
    background: #27ae60;
    color: #fff;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
}

.un--failure {
    background: #e74c3c;
    color: #fff;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
}

.un--warning {
    background: #f39c12;
    color: #fff;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
}

.un--default .un__close::before,
.un--default .un__close::after {
    background: #333;
}

.un--dark .un__close::before,
.un--dark .un__close::after,
.un--info .un__close::before,
.un--info .un__close::after,
.un--success .un__close::before,
.un--success .un__close::after,
.un--failure .un__close::before,
.un--failure .un__close::after,
.un--warning .un__close::before,
.un--warning .un__close::after {
    background: #fff;
}

/*  Buttons -------------------------------------- */



/*  With Icon ----------------------------------*/

.un--with-icon .un__inner {
    padding-left: 70px;
}

.un__icon {
    position: absolute;
    left: 0;
    top: 50%;
    /* TRANSFORM*/ -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}

    .un__icon svg {
        fill: #333;
        width: 50px;
        height: 50px;
    }

.un--default .un__icon svg {
    fill: #333;
}

.un--dark .un__icon svg {
    fill: #bdc3c7;
}

.un--info .un__icon svg {
    fill: #fff;
}

.un--success .un__icon svg {
    fill: #fff;
}

.un--failure .un__icon svg {
    fill: #fff;
}

.un--warning .un__icon svg {
    fill: #fff;
}

.un-box svg,
.un--with-icon svg,
.un--without-icon svg {
    display: none;
}

.un-box.un--with-icon.un--info .icon--info {
    display: block;
}

.un-box.un--with-icon.un--success .icon--success {
    display: block;
}

.un-box.un--with-icon.un--failure .icon--failure {
    display: block;
}

.un-box.un--with-icon.un--warning .icon--warning {
    display: block;
}

/****************************************************************
*****\=ANIMATIONS  \*******************************************************
******************************************************************************/

/*  Expanding the Notification WITH LOADER -------------------------------------- */
.un--topbar.un-showload {
    -webkit-animation-name: animLoad;
    animation-name: animLoad;
    -webkit-animation-duration: 1.5s;
    animation-duration: 1.5s;
}

@-webkit-keyframes animLoad {
    0% {
        opacity: 1;
        -webkit-transform: scale3d(0,0.1,1);
    }

    33% {
        opacity: 1;
        -webkit-transform: scale3d(0.5,0.1,1);
    }

    50% {
        opacity: 1;
        -webkit-transform: scale3d(0.6,0.1,1);
    }

    80%, 85% {
        opacity: 1;
        -webkit-transform: scale3d(1,0.1,1);
        -webkit-animation-timing-function: cubic-bezier(0.7,0,0.1,1);
    }

    100% {
        opacity: 1;
        -webkit-transform: scale3d(1,1,1);
    }
}

@keyframes animLoad {
    0% {
        opacity: 1;
        -webkit-transform: scale3d(0,0.1,1);
        transform: scale3d(0,0.1,1);
    }

    33% {
        opacity: 1;
        -webkit-transform: scale3d(0.5,0.1,1);
        transform: scale3d(0.5,0.1,1);
    }

    50% {
        opacity: 1;
        -webkit-transform: scale3d(0.6,0.1,1);
        transform: scale3d(0.6,0.1,1);
    }

    80%, 85% {
        opacity: 1;
        -webkit-transform: scale3d(1,0.1,1);
        transform: scale3d(1,0.1,1);
        -webkit-animation-timing-function: cubic-bezier(0.7,0,0.1,1);
        animation-timing-function: cubic-bezier(0.7,0,0.1,1);
    }

    100% {
        opacity: 1;
        -webkit-transform: scale3d(1,1,1);
        transform: scale3d(1,1,1);
    }
}

/*  Showing the Text and the Close Icon WITH LOADER  -------------------------------------- */
.un--topbar.un-showload .un__inner,
.un--topbar.un-showload .un__close {
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation-duration: 0.3s;
    animation-duration: 0.3s;
    -webkit-animation-delay: 1.4s;
    animation-delay: 1.4s;
}


/*  Expanding  the Notification -------------------------------------- */
.un--topbar.un-show {
    -webkit-animation-name: expand;
    animation-name: expand;
    -webkit-animation-duration: 0.3s;
    animation-duration: 0.3s;
}

@-webkit-keyframes expand {
    0% {
        opacity: 1;
        -webkit-transform: scale3d(1,0,1);
    }

    100% {
        opacity: 1;
        -webkit-transform: scale3d(1,1,1);
        -webkit-animation-timing-function: cubic-bezier(1,1,1,1);
    }
}

@keyframes expand {
    0% {
        opacity: 1;
        -webkit-transform: scale3d(1,0,1);
        transform: scale3d(1,0,1);
    }

    100% {
        opacity: 1;
        -webkit-transform: scale3d(1,1,1);
        transform: scale3d(1,1,1);
        -webkit-animation-timing-function: cubic-bezier(1,1,1,1);
        animation-timing-function: cubic-bezier(1,1,1,1);
    }
}


/*  Showing the Text and the Close Icon  -------------------------------------- */
.un--topbar.un-show .un__inner,
.un--topbar.un-show .un__close {
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation-duration: 0.3s;
    animation-duration: 0.3s;
    -webkit-animation-delay: 0.2s;
    animation-delay: 0.2s;
}


/*  Common Rules  -------------------------------------- */

/* Close Icon */
.un--topbar.un-show .un__close {
    -webkit-animation-name: animFade;
    animation-name: animFade;
}

.un--topbar.un-showload .un__close {
    -webkit-animation-name: animFade;
    animation-name: animFade;
}

/* Text */
.un--topbar.un-show .un__inner {
    -webkit-animation-name: animFadeMove;
    animation-name: animFadeMove;
    -webkit-animation-timing-function: ease-out;
    animation-timing-function: ease-out;
}

.un--topbar.un-showload .un__inner {
    -webkit-animation-name: animFadeMove;
    animation-name: animFadeMove;
    -webkit-animation-timing-function: ease-out;
    animation-timing-function: ease-out;
}


/*  Hiding the Notification -------------------------------------- */
.un--topbar.un-hide {
    -webkit-animation-name: animFade;
    animation-name: animFade;
    -webkit-animation-duration: 0.3s;
    animation-duration: 0.3s;
}



/* The Animations ----------------------------------------------*/
@-webkit-keyframes animFadeMove {
    0% {
        opacity: 0;
        -webkit-transform: translate3d(0,10px,0);
    }

    100% {
        opacity: 1;
        -webkit-transform: translate3d(0,0,0);
    }
}

@keyframes animFadeMove {
    0% {
        opacity: 0;
        -webkit-transform: translate3d(0,10px,0);
        transform: translate3d(0,10px,0);
    }

    100% {
        opacity: 1;
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
    }
}

@-webkit-keyframes animFade {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes animFade {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}
