.page--modal {
    background-color: var(--color-background-white, rgb(255, 255, 255));

    & .canvas {
        padding: 12px 25px;
    }
}

.modal--isOpen:not(.modal--is-draggable) {
    overflow: hidden;
}

.modal--isOpen .overlay {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal--is-draggable .overlay {
    overflow: initial;
    width: 0;
    height: 0;
}

.modal {
    position: fixed;
    top: 20px;
    width: 450px;
    background: #ffffff;
    border-radius: 2px;
    z-index: 399999;
    -moz-box-shadow: 0 25px 15px -5px rgba(0, 0, 0, 0.15), 0 9px 15px -7px rgba(0, 0, 0, 0.6);
    -webkit-box-shadow: 0 25px 15px -5px rgba(0, 0, 0, 0.15), 0 9px 15px -7px rgba(0, 0, 0, 0.6);
    box-shadow: 0 25px 15px -5px rgba(0, 0, 0, 0.15), 0 9px 15px -7px rgba(0, 0, 0, 0.6);

    &.modal--dragging-enabled {
        margin: initial;
        max-width: initial;
    }
}

.modal--frame {
    padding-bottom: 0;
}

.modal--fixed {
    position: fixed;
}

.modal--dragging-enabled {
    position: absolute;
    margin: initial;

    &.modal--fixed {
        position: fixed;
        top: 1.25em;
        left: 50%;
        transform: translate(-50%, 0);

        &.modal--dragged {
            transform: initial;
        }
    }

    &.modal--dragging {
        position: absolute;
        transform: initial;
    }

    & .modal__headerTitle {
        cursor: move;
    }
}

@media screen and (max-width: 500px) {
    .modal {
        left: 5%;
        width: 90%;
    }
}

.modal--fit {
    left: 45px;
    width: calc(100% - 90px);
    height: calc(100vh - 1.25em - 1.25em);
}

.modal__confirm {
    position: relative;
    top: 5px;
    height: initial;
    opacity: 0;
    transform: translateX(-50%, 0);
    transition: top .5s;
}

.modal__confirm--open {
    opacity: 1;
    top: 25px;
}

.modal__header {
    position: relative;
    height: 50px;
    line-height: 50px;
    padding: 0 25px;
    border-bottom: 1px solid rgba(238,238,238,0.6);
    z-index: 400000;
}

.modal__headerTitle {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin-bottom: 0;
    padding-right: 25px;
    line-height: 50px;
    font-weight: 400;
    font-size: var(--text-xl, 1.5em);
}

.modal__closeButton {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    border-left: 1px solid rgba(238,238,238,0.6);
    opacity: 0.8;
    text-align: center;
    cursor: pointer;

    & .button {
        color: var(--color-secondary-dark);
    }

    & .button:hover {
        color: var(--color-dark);
    }
}

.modal__content {
    padding: 12px 25px;
    height: calc(100% - 50px);
    max-height: 100%;
}

.modal--frame .modal__content {
    padding: 0;
    max-height: calc(100% - 50px);
}

.modal:not(.modal--frame) .modal__content {
    overflow-x: hidden;
    max-height: calc(100vh - (50px + 40px));
}

@media screen and(min-width: 780px) {
    .modal:not(.modal--frame) .modal__content {
        max-height: calc(100vh - (50px + 40px));
    }
}

.modal--fit .modal__content {
    padding: 0 25px;
    overflow-x: hidden;
    overflow-y: auto;
}

.modalConfirm__content {
    margin-bottom: 1em;
}


