/* Modal */

body.shortcode-modal-open {
    overflow: hidden;
}

.shortcode-modal {
    z-index: 160000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.shortcode-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    background: #000;
    opacity: 0.7;
    z-index: -1;
}

.shortcode-modal-container {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;

    pointer-events: none;
}

.shortcode-modal-frame {
    display: flex;
    flex-direction: column;

    overflow: hidden;
    position: absolute;
    top: 50%;
    left: 50%;

    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);

    width: 100%;
    max-width: 480px;

    background-color: #fff;
    box-shadow: 0 5px 15px rgb(0 0 0 / 70%);

    pointer-events: all;
}

.shortcode-modal-close {
    position: absolute;
    top: 0;
    right: 0;

    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    background: 0 0;
    color: #646970;
    z-index: 1000;
    cursor: pointer;
    outline: 0;
    transition: color .1s ease-in-out,background .1s ease-in-out;
}

.shortcode-modal-close:active,
.shortcode-modal-close:hover {
    color: #135e96;
}

.shortcode-modal-close:focus {
    color: #135e96;
    border-color: #4f94d4;
    box-shadow: 0 0 3px rgb(34 113 177 / 80%);
    outline: 2px solid transparent;
}

.shortcode-modal-content {
    flex: 1 1 auto;
}

.shortcode-modal-title {
    height: 50px;
    padding: 0 16px;
    border-bottom: 1px solid #dcdcde;
}

.shortcode-modal-title h1 {
    font-size: 22px;
    font-weight: 600;
    line-height: 2.27272727;
    padding: 0;
    margin: 0;
}

.shortcode-modal-content {
    padding: 16px;
}

.shortcode-modal-toolbar {
    height: 60px;
    padding: 0 16px;
    border-top: 1px solid #dcdcde;
}

.shortcode-modal-toolbar .shortcode-modal-toolbar-secondary {
    float: left;
    height: 100%;
}

.shortcode-modal-toolbar .shortcode-modal-toolbar-primary {
    float: right;
    height: 100%;
    position: relative;
}

.shortcode-modal-toolbar .shortcode-modal-toolbar-primary .button {
    float: left;
}

.shortcode-modal-toolbar .shortcode-modal-toolbar-primary .button {
    position: static;

    margin-top: 15px;
    margin-left: 10px;
}

@media screen and (max-width: 782px) {
    .shortcode-modal-toolbar .shortcode-modal-toolbar-primary .button {
        margin-top: 10px;
    }
}

@media only screen and (max-width: 640px), screen and (max-height: 400px) {
    .shortcode-modal-container {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .shortcode-modal-frame {
        height: 100%;
        max-width: none;
    }
}

/* Fields */

.shortcode-modal-field {
    margin-bottom: 12px;
}

.shortcode-modal-field:last-child {
    margin-bottom: 0;
}

.shortcode-modal-label label {
    font-weight: 600;
}

.shortcode-modal-input input {
    width: 100%;
}

.shortcode-modal-image-upload p {
    margin: 0;
}

.image-wrap {
    display: flex;
    flex-wrap: wrap;
}

.image-wrap .image-infos {
    word-break: break-all;
    margin-right: 8px;
}

/* Handlers */

/* Handle - state */

.shortcode-modal-show-if-value {
    display: none;
}

.shortcode-modal-has-value .shortcode-modal-show-if-value {
    display: block;
}

.shortcode-modal-has-value .shortcode-modal-hide-if-value {
    display: none;
}

/* Handle - actions */

.shortcode-modal-actions a.delete {
    color: #b32d2e;
}