div#ticketmode div.tm-floater {
    position: fixed;
    top: 10px;
    left: calc(50% - 80px);
    height: 25px;
    background-color: var(--background-color) !important;
    -webkit-box-shadow: 0 0 4px 0 rgba(0,0,0,0.25);
    box-shadow: 0 0 4px 0 rgba(0,0,0,0.25);
    border-radius: 6px;
    padding: 4px 12px;
    padding-left: 4px;
    z-index: 501;
    -webkit-box-orient: horizontal;
    display: flex;
    align-items: center !important;
    pointer-events: auto;
}

    div#ticketmode div.tm-floater i.tm-icon {
        color: var(--icon-color);
        margin: 0 6px;
        opacity: 0.7;
        cursor: default;
        /* use !important to prevent issues with browser extensions that change fonts */
        font-family: 'Glyphicons Basic' !important;
        font-size: 20px;
        speak: none;
        font-style: normal;
        font-weight: normal;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        /* Better Font Rendering =========== */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

        div#ticketmode div.tm-floater i.tm-icon.tm-action-icon {
            cursor: pointer;
        }

            div#ticketmode div.tm-floater i.tm-icon.tm-action-icon:hover {
                opacity: 1;
            }

        div#ticketmode div.tm-floater i.tm-icon.tm-icon-drag {
            margin-left: 0px;
            margin-right: 14px;
            cursor: grab;
            cursor: -webkit-grab;
            cursor: -moz-grab;
            background-image: url(../App_Images/__DraggableHandler.svg);
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
            opacity: 0.5;
        }

            div#ticketmode div.tm-floater i.tm-icon.tm-icon-drag:before {
                content: '\eaf1';
                color: transparent;
                font-size: 16px;
            }

        div#ticketmode div.tm-floater.ui-draggable-dragging i.tm-icon-drag {
            cursor: grabbing;
            cursor: -webkit-grabbing; 
            cursor:-moz-grabbing;
        }

        div#ticketmode div.tm-floater i.tm-icon.tm-icon-track:before {
            content: '\e933';
        }

        div#ticketmode div.tm-floater i.tm-icon.tm-icon-track.no-track:before {
            content: '\e934';
        }

        div#ticketmode div.tm-floater i.tm-icon.tm-icon-screenshot:before {
            content: '\e90b';
        }

        div#ticketmode div.tm-floater i.tm-icon.tm-icon-screenshot.problem {
            opacity: 0.7 !important;
            cursor: default !important;
        }

            div#ticketmode div.tm-floater i.tm-icon.tm-icon-screenshot.problem:after {
                content: "!";
                position: relative;
                top: -7px;
                right: -2px;
                font-family: var(--counter-font-family);
                font-weight: 900;
                font-size: 10px;
                color: var(--dialog-content-title-danger-icon-background);
            }

        div#ticketmode div.tm-floater i.tm-icon.tm-icon-gallery {
            cursor: default;
            opacity: 0.7 !important;
        }

            div#ticketmode div.tm-floater i.tm-icon.tm-icon-gallery:before {
                content: '\e925';
            }

            div#ticketmode div.tm-floater i.tm-icon.tm-icon-gallery[data-count] {
                position: relative;
                cursor: pointer;
            }

                div#ticketmode div.tm-floater i.tm-icon.tm-icon-gallery[data-count]:hover {
                    opacity: 1 !important;
                }

                div#ticketmode div.tm-floater i.tm-icon.tm-icon-gallery[data-count]:after {
                    content: attr(data-count);
                    height: 14px;
                    width: 14px;
                    line-height: 14px;
                    position: absolute;
                    font-size: 0.7rem;
                    background: var(--primary-color);
                    color: var(--primary-contrast-color);
                    text-align: center;
                    border-radius: 50%;
                    top: -4px;
                    right: -8px;
                    font-family: var(--counter-font-family);
                    font-weight: normal;
                }

        div#ticketmode div.tm-floater i.tm-icon.tm-icon-form {
            margin-right: 0;
        }

            div#ticketmode div.tm-floater i.tm-icon.tm-icon-form:before {
                content: '\e996';
            }

div#ticketmode div.tm-tracked {
    position: absolute;
    display: none;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    width: auto;
    border: 2px solid var(--primary-color);
}

    div#ticketmode div.tm-tracked::after {
        content: attr(data-tm-field-id);
        position: absolute;
        bottom: -18px;
        right: 0;
        left: initial;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-family: var(--counter-font-family);
        font-size: 0.7rem !important;
        font-weight: 500;
        color: var(--primary-color);
        background-color: rgba(var(--primary-color-rgb), 0.2);
        padding: 1px 2px;
    }

    div#ticketmode div.tm-tracked ul {
        position: absolute;
        top: -32px;
        right: -4px;
    }

        div#ticketmode div.tm-tracked ul li {
            float: left;
            padding: 0 2px;
            list-style-type: none;
            list-style-position: outside;
            list-style-image: none;
        }

            div#ticketmode div.tm-tracked ul li a.tm-badge {
                float: left;
                height: 16px;
                width: 16px;
                cursor: pointer;
            }

                div#ticketmode div.tm-tracked ul li a.tm-badge:after {
                    height: 16px;
                    width: 16px;
                    line-height: 16px;
                    content: attr(data-tm-value);
                    position: absolute;
                    font-size: 0.7rem;
                    background: var(--primary-color);
                    color: var(--primary-contrast-color);
                    text-align: center;
                    border-radius: 50%;
                }

                div#ticketmode div.tm-tracked ul li a.tm-badge:hover {
                    /* use !important to prevent issues with browser extensions that change fonts */
                    font-family: 'Glyphicons Basic' !important;
                    font-size: 20px;
                    speak: none;
                    font-style: normal;
                    font-weight: normal;
                    font-variant: normal;
                    text-transform: none;
                    line-height: 1;
                    /* Better Font Rendering =========== */
                    -webkit-font-smoothing: antialiased;
                    -moz-osx-font-smoothing: grayscale;
                }

                    div#ticketmode div.tm-tracked ul li a.tm-badge:hover:after {
                        content: '\e910';
                        background: none;
                        color: var(--primary-color);
                        font-size: 16px;
                    }

div#ticketmode.no-track div.tm-tracked {
    display: none !important;
}

div#ticketmode div.tm-dialog {
    display: none;
}

.tm-dialog {
    height: 100%;
    overflow-y: auto;
    background-color: var(--dialog-surface-color) !important;
}

    .tm-dialog .tm-gallery {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 20px 40px;
        justify-items: center;
        animation: 2s;
    }

        .tm-dialog .tm-gallery .tm-gallery-item {
            position: relative;
            width: 400px;
            height: calc((400px / (16/9)) + 42px);
            margin: 40px;
            box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.3) !important;
            align-self: flex-start;
        }

            .tm-dialog .tm-gallery .tm-gallery-item:before {
                content: attr(data-count);
                position: absolute;
                left: 50%;
                transform: translateX(-50%);
                top: -30px;
                color: var(--primary-color);
                opacity: 0.7;
                height: 16px;
                width: 16px;
                line-height: 16px;
                font-family: --counter-font-family;
                font-size: 0.7rem;
                font-weight: 900;
                text-align: center;
                border-radius: 50%;
                border: 1px solid var(--primary-color);
                box-shadow: var(--surface-box-shadow) !important;
            }

            .tm-dialog .tm-gallery .tm-gallery-item.highlight {
                grid-row: 1;
                grid-column-start: 1;
                grid-column-end: 3;
                width: 650px;
                height: calc((650px / (16/9)) + 42px);
            }

                .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-gallery-pager {
                    font-style: normal;
                    font-weight: 900;
                    font-size: 20px;
                    width: 20px;
                    height: 20px;
                    position: absolute;
                    top: 50%;
                    color: var(--icon-color);
                    opacity: 0.7;
                    cursor: pointer;
                    /* use !important to prevent issues with browser extensions that change fonts */
                    font-family: 'Glyphicons Basic' !important;
                    font-size: 20px;
                    speak: none;
                    font-style: normal;
                    font-weight: normal;
                    font-variant: normal;
                    text-transform: none;
                    line-height: 1;
                    /* Better Font Rendering =========== */
                    -webkit-font-smoothing: antialiased;
                    -moz-osx-font-smoothing: grayscale;
                }

                    .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-gallery-pager:hover {
                        opacity: 1;
                    }

                    .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-gallery-pager.disabled {
                        opacity: 0.3 !important;
                        cursor: default;
                    }

                    .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-gallery-pager.tm-gallery-prev {
                        left: -50px;
                    }

                        .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-gallery-pager.tm-gallery-prev:before {
                            content: '\e9de';
                        }

                    .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-gallery-pager.tm-gallery-next {
                        right: -50px;
                    }

                        .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-gallery-pager.tm-gallery-next:before {
                            content: '\e9df';
                        }

                .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-box-canvas:hover {
                    position: relative;
                    cursor: pointer;
                }

                    .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-box-canvas:hover:after {
                        content: '\e9d6' !important;
                        width: 30px;
                        height: 30px;
                        font-size: 30px;
                    }

            .tm-dialog .tm-gallery .tm-gallery-item .tm-box-canvas {
                position: relative;
                width: 400px;
                height: calc(400px / (16/9));
            }

                .tm-dialog .tm-gallery .tm-gallery-item .tm-box-canvas:hover {
                    position: relative;
                    cursor: pointer;
                }

                    .tm-dialog .tm-gallery .tm-gallery-item .tm-box-canvas:hover:before {
                        content: '';
                        width: 100%;
                        height: 100%;
                        background-color: #000;
                        position: absolute;
                        opacity: 0.1;
                    }

                    .tm-dialog .tm-gallery .tm-gallery-item .tm-box-canvas:hover:after {
                        content: '\e9d7';
                        position: absolute;
                        width: 28px;
                        height: 28px;
                        font-size: 28px;
                        top: 50%;
                        left: 50%;
                        transform: translateX(-50%) translateY(-50%);
                        color: var(--icon-color);
                        opacity: 0.8;
                        /* use !important to prevent issues with browser extensions that change fonts */
                        font-family: 'Glyphicons Basic' !important;
                        speak: none;
                        font-style: normal;
                        font-weight: normal;
                        font-variant: normal;
                        text-transform: none;
                        line-height: 1;
                        /* Better Font Rendering =========== */
                        -webkit-font-smoothing: antialiased;
                        -moz-osx-font-smoothing: grayscale;
                    }

            .tm-dialog .tm-gallery .tm-gallery-item.highlight .tm-box-canvas {
                width: 650px;
                height: calc(650px / (16/9));
            }

                .tm-dialog .tm-gallery .tm-gallery-item .tm-box-canvas .tm-canvas {
                    width: 100%;
                    height: 100%;
                }

            .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info {
                display: flex;
                flex-direction: column;
                padding: 5px 20px;
                background: var(--background-color);
            }

                .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-descr {
                    height: 100px;
                    overflow: hidden;
                    display: flex;
                    flex-direction: column;
                    padding-top: 10px;
                    display: none;
                    /* temporary */;
                }

                    .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-descr textarea {
                        width: 100% !important;
                        padding: 5px;
                        font-size: 0.8em !important;
                        font-weight: normal;
                        color: var(--font-color) !important;
                        resize: none !important;
                    }

                .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations {
                    display: flex;
                    justify-content: space-around;
                    padding: 6px;
                    margin-top: auto;
                }

                    .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations .tm-info-icon {
                        display: flex;
                        color: var(--icon-color);
                        cursor: pointer;
                        opacity: 0.7;
                        margin: 0 10px;
                        height: 20px;
                        line-height: 20px;
                    }

                        .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations .tm-info-icon:after {
                            content: attr(title);
                            margin-left: 10px;
                            color: var(--font-color);
                            font-family: Arial, Verdana, Sans-Serif !important;
                            font-size: 14px;
                            font-weight: normal;
                            font-style: normal;
                            line-height: 20px;
                        }

                        .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations .tm-info-icon:last-child {
                            margin-right: 0;
                        }

                        .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations .tm-info-icon:hover {
                            opacity: 1;
                        }

                        .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations .tm-info-icon:before {
                            /* use !important to prevent issues with browser extensions that change fonts */
                            font-family: 'Glyphicons Basic' !important;
                            font-size: 20px;
                            speak: none;
                            font-style: normal;
                            font-weight: normal;
                            font-variant: normal;
                            text-transform: none;
                            line-height: 1;
                            /* Better Font Rendering =========== */
                            -webkit-font-smoothing: antialiased;
                            -moz-osx-font-smoothing: grayscale;
                        }

                        .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations .tm-info-icon.tm-icon-edit:before {
                            content: '\e996';
                        }

                        .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations .tm-info-icon.tm-icon-download:before {
                            content: '\eb21';
                        }

                        .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations .tm-info-icon.tm-icon-copy:before {
                            content: '\eb65';
                        }

                        .tm-dialog .tm-gallery .tm-gallery-item .tm-item-info .tm-info-operations .tm-info-icon.tm-icon-delete:before {
                            content: '\e910';
                        }

    .tm-dialog[resize='2c'] .tm-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .tm-dialog[resize='1c'] .tm-gallery {
        grid-template-columns: 1fr;
    }

    .tm-dialog.chooser .tm-gallery {
        grid-template-columns: 1fr;
    }

        .tm-dialog.chooser .tm-gallery .tm-gallery-item .tm-box-canvas:hover:after {
            content: none;
        }

        .tm-dialog.chooser .tm-gallery .tm-gallery-item .tm-item-info {
            display: none;
        }

div.tm-preview {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    max-width: 100%;
    max-height: 100%;
    z-index: 9999;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 50px;
    padding-top: 75px;
}

    div.tm-preview.active {
        display: block;
    }

    div.tm-preview .tm-preview-toolbar {
        position: fixed;
        top: 25px;
        left: 50%;
        transform: translateX(-50%);
        height: 25px;
        background-color: var(--background-color) !important;
        -webkit-box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
        box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
        border-radius: 6px;
        padding: 6px 12px;
        z-index: 301;
        -webkit-box-orient: horizontal;
        display: flex;
        align-items: center !important;
        pointer-events: auto;
    }

        div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon {
            color: var(--icon-color);
            margin: 0 8px;
            opacity: 0.7;
            cursor: pointer;
        }
            div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon:before {
                /* use !important to prevent issues with browser extensions that change fonts */
                font-family: 'Glyphicons Basic' !important;
                font-size: 20px;
                speak: none;
                font-style: normal;
                font-weight: normal;
                font-variant: normal;
                text-transform: none;
                line-height: 1;
                /* Better Font Rendering =========== */
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
            }

            div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon:hover {
                opacity: 1;
            }

            div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop {
                margin-left: 0;
            }

                div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop:before {
                    content: '\e95d';
                }

                div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop:not(.active) ~ .tm-icon-crop-confirm, div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop:not(.active) ~ .tm-icon-crop-cancel {
                    display: none;
                }

                div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop.active {
                    cursor: default !important;
                    opacity: 0.7 !important;
                    color: var(--primary-color);
                }

                    div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop.active ~ .tm-icon-save, div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop.active ~ .tm-icon-close {
                        display: none;
                    }

            div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop-confirm:before {
                content: '\ebe2';
            }

            div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop-cancel {
                margin-right: 0;
            }

                div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-crop-cancel:before {
                    content: '\ec76';
                }


            div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-save {
                background-image: url(../App_Images/__Save.svg);
                background-size: contain;
                background-repeat: no-repeat;
            }

                div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-save:before {
                    content: '\e9c6';
                    color: transparent;
                }

            div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-close {
                margin-right: 0;
            }

                div.tm-preview .tm-preview-toolbar .tm-preview-toolbar-icon.tm-icon-close:before {
                    content: '\ea74';
                }

    div.tm-preview .tm-preview-container .cropper-container {
        position: relative;
        background: none !important;
    }

        div.tm-preview .tm-preview-container .cropper-container .cropper-face {
            background-color: var(--primary-color);
            opacity: 0.25;
        }

        div.tm-preview .tm-preview-container .cropper-container .cropper-modal {
            opacity: 0.35;
        }

        div.tm-preview .tm-preview-container .cropper-container .cropper-view-box {
            outline-color: var(--primary-color);
        }

        div.tm-preview .tm-preview-container .cropper-container .cropper-dashed {
            border-color: var(--font-color);
            border: 0;
        }

        div.tm-preview .tm-preview-container .cropper-container .cropper-center::before, div.tm-preview .tm-preview-container .cropper-container .cropper-center::after {
            background-color: var(--font-color);
        }

        div.tm-preview .tm-preview-container .cropper-container .cropper-line, div.tm-preview .tm-preview-container .cropper-container .cropper-point {
            background-color: var(--primary-color);
        }
 