/**
 * Tingle.js
 * https://tingle.robinparisi.com/
 */

.tingle-modal {
    align-items: center;
    background: rgba(0,0,0,.85 );
    backdrop-filter: blur( 0px );
    bottom: 0;
    display: flex;
    flex-direction: column;
    left: 0;
    opacity: 0;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    position: fixed;
    right: 0;
    top: 0;
    transition: backdrop-filter .25s ease-out, opacity .25s ease-out, visibility .25s ease-out;
    visibility: hidden;
    will-change: backdrop-filter, opacity, visibility;
    z-index: 1000;
}


/* confirm and alerts
-------------------------------------------------------------- */

.tingle-modal--confirm .tingle-modal-box {
    text-align: center;
}

/* modal
-------------------------------------------------------------- */

.tingle-modal--noOverlayClose {
    cursor: default;
}

.tingle-modal--noClose .tingle-modal__close {
    display: none;
}

.tingle-modal__close {
    background-color: transparent;
    border: none;
    color: black;
    cursor: pointer;
    height: 2rem;
    padding: 0;
    position: fixed;
    right: 2.5rem;
    top: 2.5rem;
    width: 2rem;
    z-index: 1000;
}

.tingle-modal__close:hover {
    color: black
}

.tingle-modal__close svg {
    fill: white !important;
}

.tingle-modal__close svg path{
    fill: white !important;
}

.tingle-modal__closeLabel {
    display: none;
}

.tingle-modal-box {
    cursor: auto;
    flex-shrink: 0;
    margin-bottom: auto;
    margin-top: auto;
    opacity: 1;
    position: relative;
    width: 60%;
    will-change: transform, opacity;
}

.tingle-modal-box__content {
    padding: 0 12px;
}

/* state
-------------------------------------------------------------- */

.tingle-enabled {
    left: 0;
    overflow: hidden;
    position: fixed;
    right: 0;
}

.tingle-modal--visible .tingle-modal-box__footer {
    bottom: 0;
}

.tingle-modal--visible {
    backdrop-filter: blur(12px);
    opacity: 1;
    visibility: visible;
}

.tingle-modal--visible .tingle-modal-box {
    animation: scale .2s cubic-bezier(.68, -.55, .265, 1.55) forwards;
}

.tingle-modal--overflow {
    overflow-y: scroll;
    padding-top: 8vh;
}

/* responsive
-------------------------------------------------------------- */

@media ( max-width: 540px ) {

    .tingle-modal {
        display: block;
        padding-top: 60px;
        top: 0px;
        width: 100%;
    }

    .tingle-modal-box {
        border-radius: 0;
        width: auto;
    }

    .tingle-modal-box__content {
        overflow-y: scroll;
    }

    .tingle-modal--noClose {
        top: 0;
    }

    .tingle-modal--noOverlayClose {
        padding-top: 0;
    }

    .tingle-modal-box__footer .tingle-btn {
        display: block;
        float: none;
        margin-bottom: 1rem;
        width: 100%;
    }

    .tingle-modal__close {
        background-color: #2c3e50;
        border: none;
        box-shadow: none;
        color: #fff;
        display: block;
        height: 60px;
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
    }

    .tingle-modal__closeLabel {
        display: inline-block;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
        font-size: 1rem;
        vertical-align: middle;
    }

    .tingle-modal__closeIcon {
        display: inline-block;
        font-size: 0;
        margin-right: .8rem;
        vertical-align: middle;
        width: 1.6rem;
    }
}

/* animations
-------------------------------------------------------------- */

@keyframes scale {
    0% {
        opacity: 0;
        transform: scale( .9 );
    }
    100% {
        opacity: 1;
        transform: scale( 1 );
    }
}
