/* ===============================
* [Object] Modal
* =============================== */
.modal {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    text-align: left;

    transition: opacity .25s ease;
    z-index: 2000;
    pointer-events: none;
}



.modal__bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    cursor: pointer;
    opacity: 0.8;
    background-color: #392F2EFF
}

input[type="checkbox"].modal-state,
.modal-state {
    display: none;
}

.modal-state:checked + .modal {
    opacity: 1;
    visibility: visible;
    z-index: 2000;
    pointer-events: all;
}


.modal-state:checked + .modal .modal__inner {
    transform: translate(-50%, -50%);
    opacity: 1;
    margin: 0;
    padding: 0;

}

.modal__inner {
    transition: transform .25s ease;
    position: absolute;
    transform: translate(-50%, -80%);
    right: 0;
    bottom: 0;
    top: 50vh;
    left: 50vw;
    max-width: 800px;
    width: 100vw;
    margin: 0;
    background: #fff;
    border-radius: 5px;
    padding: 1em 2em;
    max-height: 900px;
    height: 100vh;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.modal__inner.small{
    max-height: 280px;
}

.modal__inner .content{
    padding: 64px 1rem;
    pointer-events: none;
}

[for="modal-for-address"] ~ .modal__inner{
    background-color: #f8f9fa;
}

.modal__inner iframe{
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
    border: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    overflow: hidden;
    overflow-y: auto;
    max-height: 100%;
}

.modal__inner.loading iframe{
    visibility: hidden;
    height: 0;
}



.modal__inner.loading:before{
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    border: 3px solid #FFF;
    border-bottom-color: #2196F3;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    left: 50%;
    top: 50%;
    margin-left: -24px;
    margin-top: -24px;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.modal__close {
    position: absolute;
    right: 2rem;
    top: 1rem;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 2;
    background-color: #fff;
    border-radius: 20em;

}

.modal__close:after,
.modal__close:before {
    content: '';
    position: absolute;
    width: 3px;
    height: 20px;
    background: #666;
    display: block;
    left: 50%;
    margin: 0;
    transform: translate(-50%, -50%) rotate(45deg);
    top: 50%;
}

.modal__close:hover:after,
.modal__close:hover:before {
    background: #000;
}

.modal__close:before {
    transform: translate(-50%, -50%) rotate(-45deg);
}
