@checkered-background: url(../img/checkered-background.png);

//
// Container styles
// --------------------------------------------------
.umb-property-editor {
    width: 100%;
    position:relative;
}

.umb-property-editor-tiny {
    width: 60px;
    
	&.umb-editor-push {
		width:30%;
		min-width:0;
	}
}

.umb-property-editor-small {
  width: 90px;
}

.umb-modal .umb-property-editor {
  width: 95%;
}

.umb-dialog .umb-property-editor {
  width: 95%;
}
.umb-dialog .umb-control-group .help-block {
  width: 95%;
}

.umb-codeeditor{
  width: 99%; 
}

// displays property inline with preceeding
.umb-property {
	&--pull {
		float:left;
		width:60%;
	}

	&--push {
		float:right;
		width:35%;
	}

	&--pull, &--push {
		.umb-editor {
			min-width:0;
			width:100%;
		}
	}
}

.umb-property .alert {
	border-radius: 3px;
}



//
// Content picker
// --------------------------------------------------
.umb-contentpicker {
    .umb-property-editor--limit-width();
}

.umb-contentpicker li a:hover .hover-hide, .umb-contentpicker li a .hover-show{
  display: none;
}
.umb-contentpicker li a:hover .hover-show{display: inline-block;}

.umb-contentpicker-popover .search-holder {
  padding: 10px;
}

.umb-contentpicker__min-max-help {
    font-size: 13px;
    margin-top: 5px;
    color: @gray-4;
}

.show-validation .umb-contentpicker__min-max-help {
    display: none;
}

.umb-contentpicker small {

  &:not(:last-child) {
    padding-right: 3px;
    border-right: 1px solid @gray-5;
  }

  a {
    color: @gray-3;
  }
}



//
// Color picker
// --------------------------------------------------

/* pre-value editor */
.control-group.color-picker-preval {
    .thumbnail {
        width: 34px;
        height: 34px;
        min-width: auto;
        border: none;
        cursor: move;
        border-radius: 3px;
        margin-top: auto;
        margin-bottom: auto;
        flex: 0 0 auto;
    }

    .handle {
        float: left;
        display: inline-flex;
        margin: 5px 3px 5px 0;
    }

    div.color-picker-prediv {
        display: inline-flex;
        align-items: center;
        max-width: 100%;
        flex: 1;

        pre {
            display: inline-flex;
            font-family: monospace;
            margin-left: 15px;
            margin-right: 15px;
            white-space: nowrap;
            overflow: hidden;
            margin-bottom: 0;
            vertical-align: middle;
            padding: 6px 10px;
            background: #f7f7f7;
            flex: 0 0 auto;
        }

        span {
            margin-left: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }

    input[type="text"] {
        display: flex;
        flex: 1 1 100px;
        margin-top: 1px;
        margin-right: 15px;
        min-width: auto;
        width: auto;
    }

    .sp-replacer {
        display: inline-flex;
        margin-right: 18px;
    }

    label {
        border: 1px solid @white;
        padding: 6px 10px;
        font-family: monospace;
        border: 1px solid #dfdfe1;
        background: #f7f7f7;
        margin: 0 15px 0 3px;
        border-radius: 3px;
    }
}

//
// Image Cropper
// --------------------------------------------------

.umb-prevalues-multivalues.umb-cropsizes{

    max-width: 500px;
    width: 100%;
    min-width: 66.6%;

    @media (min-width: 1101px) and (max-width: 1300px), (max-width: 930px) {
        max-width: none;
    }

    .umb-overlay__form & {
        width: 100%;
    }
}

.umb-cropsizes {

    &__add {
        display: inline-flex;
        align-items: center;
    }

    &__controls {
        margin: 24px 0 0;
        display: flex;
    }

    &__input {
        width: 100%;
        &-wrap{
            flex: 1 1 auto;
            margin-right: 10px;
            &--narrow {
                flex: 0 1 100px;
            }
        }
   }
}


//
// Media picker
// --------------------------------------------------

.umb-mediapicker > div {
    border: 1px solid @inputBorder;
}
.umb-mediapicker-single > div {
    width:144px;
}
.umb-mediapicker-multi > div {
    width:100%;
}


.umb-mediapicker .add-link {
    position: relative;
    display: flex;
    justify-content:center;
    align-items:center;
    //width: 120px;
    text-align: center;
    color: @gray-9;
    border: 2px @gray-9 dashed;
    text-decoration: none;

    transition: all 150ms ease-in-out;

    &:focus,
    &:hover {
        color: @ui-action-discreet-type-hover;
        border-color: @ui-action-discreet-type-hover;
    }
    
    &:focus {
        outline: none;
        .tabbing-active &:after {
            content: '';
            position: absolute;
            z-index: 10000;
            top: -6px;
            bottom: -6px;
            left: -6px;
            right: -6px;
            border-radius: 3px;
            box-shadow: 0 0 2px @blueMid, inset 0 0 2px 1px @blueMid;
        }
    }
}

.umb-mediapicker .label{
    &__trashed{
        background-color: @red;
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 1;
        transform: translate3d(-50%,-50%,0);
        margin: 0;
    }
}

.umb-mediapicker .picked-image {
  position: absolute;
  bottom: 10px;
  right: 10px;
  opacity: 0.5;

  font-size: 24px;
  color: @red;
  background: @white;

  line-height: 36px;
  text-align: center;
  border-radius: 15px;

  height: 32px;
  width: 32px;
  overflow: hidden;
  display: none;
  text-decoration: none;
}

.umb-mediapicker .add-link-square {
  height: 100px;
  width: 100px;
  margin: 10px;
}



.umb-thumbnails {
    position: relative;
    display: flex;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.umb-thumbnails > li.icon {
    width: 14%;
    text-align: center;
}

.umb-thumbnails i{margin: auto;}
.umb-thumbnails a{
  outline: none;
  border:none !important;
  box-shadow:none !important;
}


.umb-sortable-thumbnails {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}


.umb-sortable-thumbnails li {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 5px;
    margin: 5px;
    background: @white;
    //border: 1px solid @gray-10;
    max-width: 100%;
}
.umb-mediapicker {
    
    .umb-sortable-thumbnails li {
        border:none;
    }
    
}



.umb-mediapicker .umb-sortable-thumbnails li {
    flex-direction: column;
}
/*.umb-mediapicker .umb-sortable-thumbnails li.add-wrapper {
    padding: 0px;
}*/

.umb-sortable-thumbnails li:hover a {
    display: flex;
    justify-content: center;
    align-items: center;
}

.umb-sortable-thumbnails li img {
    max-width:100%;
    max-height:100%;
    margin:auto;
    display:block;
    background-image: @checkered-background;
}

.umb-sortable-thumbnails li .trashed {
    opacity:0.3;
}

.umb-sortable-thumbnails li img.noScale {
    max-width: none !important;
    max-height: none !important;
}

.umb-sortable-thumbnails .umb-icon-holder {
    text-align: center;
}

.umb-sortable-thumbnails .umb-icon-holder .icon {
    font-size: 40px;
    line-height: 50px;
    color: @gray-3;
    display: block;
}

.umb-sortable-thumbnails .umb-icon-holder .file-icon > span {
    color: @white;
    background: @gray-4;
    padding: 1px 3px;
    font-size: 10px;
    line-height: 130%;
    display: block;
    margin-top: -30px;
    width: 2em;
}

.umb-sortable-thumbnails .umb-icon-holder .file-icon + small {
    display: block;
    margin-top: 1em;
}


.umb-sortable-thumbnails .umb-sortable-thumbnails__wrapper {
    width: 124px;
    height: 124px;
    overflow: hidden;
    position: relative;
}

.umb-sortable-thumbnails .umb-sortable-thumbnails__loading {
    position: absolute;
    background-color: rgba(255,255,255,0.8);
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.umb-sortable-thumbnails .umb-sortable-thumbnails__actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    text-decoration: none;
    display: flex;
    flex-direction: row;
    opacity: 0;
    visibility: hidden;
}

.umb-sortable-thumbnails.ui-sortable:not(.ui-sortable-disabled) {
    > li:not(.unsortable) {
        cursor: move;
    }
}

.umb-sortable-thumbnails li:hover .umb-sortable-thumbnails__actions  {
    opacity: 1;
    visibility: visible;
}

.umb-sortable-thumbnails .umb-sortable-thumbnails__action {
    font-size: 16px;
    background: @white;
    height: 25px;
    width: 25px;
    border-radius: 15px;
    color: @gray-1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 5px;
    text-decoration: none;
    
    //border-color: @inputBorder;
    .box-shadow(0 1px 2px rgba(0,0,0,0.25));
}

.umb-sortable-thumbnails .umb-sortable-thumbnails__action.-red {
    color: @red;
}

.umb-sortable-thumbnails .umb-sortable-thumbnails__action:hover {
    text-decoration: none;
}


//
// Cropper
// -------------------------------------------------

.umb-cropper{
    position: relative;
}

.umb-cropper img, .umb-cropper-gravity img{
    position: relative;
    max-width: 100%;
    height: auto;
    top: 0;
    left: 0;
 }

 .umb-cropper img {
    max-width: none;
 }

 .umb-cropper .overlay, .umb-cropper-gravity .overlay {
    top: 0;
    left: 0;
    cursor: move;
    z-index: @zindexCropperOverlay;
    position: absolute;
}

.umb-cropper .viewport{
    overflow: hidden;
    position: relative;
    margin: auto;
    max-width: 100%;
    height: auto;
 }

.umb-cropper-gravity .viewport{
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
}


.umb-cropper .viewport:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: @zindexCropperOverlay - 1;
    opacity: .75;
    box-shadow: inset 0 0 0 20px white,inset 0 0 0 21px rgba(0,0,0,.1),inset 0 0 20px 21px rgba(0,0,0,.2);
}

.umb-cropper-gravity .overlay{
    width: 14px;
    height: 14px;
    text-align: center;
    border-radius: 20px;
    background: @pinkLight;
    border: 3px solid @white;
    opacity: 0.8;
}

.umb-cropper-gravity .overlay i {
    font-size: 26px;
    line-height: 26px;
    opacity: 0.8 !important;
}

.umb-cropper .crop-container {
    text-align: center;
}

.umb-cropper .crop-slider-wrapper {
    padding: 10px;
    border-top: 1px solid @gray-10;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    @media (min-width: 769px) {
        padding: 10px 50px 10px 50px;
    }

    i {
        color: @gray-3;
        flex: 0 0 25px;
        padding: 0 5px;
        box-sizing: border-box;

        &:first-of-type {
            text-align: right;
        }
    }

    .crop-slider {
        padding: 50px 15px 40px 15px;
        width: 66.6%;
    }
}

   .umb-cropper-gravity .viewport, .umb-cropper-gravity, .umb-cropper-imageholder {
        display: inline-block;
        max-width: 100%;
    }

    .umb-cropper-imageholder {
        float: left;
    }

    .cropList {
        display: inline-block;
        position: relative;
        vertical-align: top;
    }

    .gravity-container {
        border: 1px solid @gray-8;
        line-height: 0;

        .viewport {
            max-width: 600px;
            background: @checkered-background;

            &:hover {
                cursor: pointer;
            }
        }
    }

    .imagecropper {
        display: flex;
        align-items: flex-start;
        flex-direction: row;

        @media (max-width: 768px) {
            flex-direction: column;
            float: left;
            max-width: 100%;
        }

        .viewport img {
            background: @checkered-background;
        }
    }

    .imagecropper .umb-cropper__container {
        position: relative;
        margin-bottom: 10px;
        max-width: 100%; 
        border: 1px solid @gray-10;

        @media (min-width: 769px) {
            width: 600px;
        }
    }

    .imagecropper .umb-cropper__container .button-drawer {
        display: flex;
        justify-content: flex-end;
        padding: 10px;
        position: relative;

        button {
            margin-left: 4px;
        }
    }

    .umb-close-cropper {
        position: absolute;
        top: 3px;
        right: 3px;
        cursor: pointer;
        z-index: @zindexCropperOverlay + 1;
    }

    .umb-close-cropper:hover {
        opacity: .9;
        background: @gray-10;
    }

    .imagecropper .umb-sortable-thumbnails {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .imagecropper .umb-sortable-thumbnails li {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 8px;
        margin-top: 0;
    }

    .imagecropper .umb-sortable-thumbnails li.current {
        border-color: @gray-8;
        background: @gray-10;
        color: @black;
        cursor: pointer;
    }

    .imagecropper .umb-sortable-thumbnails li:hover,
    .imagecropper .umb-sortable-thumbnails li.current:hover {
        border-color: @gray-8;
        background: @gray-10;
        color: @black;
        cursor: pointer;
        opacity: .95;
    }

    .imagecropper .umb-sortable-thumbnails li .crop-name,
    .imagecropper .umb-sortable-thumbnails li .crop-size {
        display: block;
        text-align: left;
        font-size: 13px;
        line-height: 1;
    }

    .imagecropper .umb-sortable-thumbnails li .crop-name {
        font-weight: bold;
        margin: 10px 0 5px;
    }

    .imagecropper .umb-sortable-thumbnails li .crop-size {
        font-size: 10px;
        font-style: italic;
        margin: 0 0 5px;
    }

    .btn-crop-delete {
        display: block;
        text-align: left;
    }

//
// folder-browser
// --------------------------------------------------
.umb-folderbrowser .add-link {
  display: inline-block;
  height: 120px;
  width: 120px;
  text-align: center;
  border: 1px @gray-10 dashed;
  line-height: 120px
}

//
// File upload
// --------------------------------------------------
.umb-fileupload .preview {
  border-radius: 5px;
  border: 1px solid @gray-6;
  padding: 3px;
  background: @gray-9;
  float: left;
  margin-right: 30px;
  margin-bottom: 30px;
}

.umb-fileupload ul {
  list-style: none;
  vertical-align: middle;
  margin-bottom: 0;

  img {
    background: @checkered-background;
  }
}

.umb-fileupload label {
  vertical-align: middle;
  padding-left: 7px;
  font-weight: normal;
}

.umb-fileupload .preview-file {
  color: @gray-4;
  height: 45px;
  width: 55px;
  text-align: center;
  text-transform: uppercase;
  font-size: 10px;
  padding-top: 27px;
}

.umb-fileupload .file-icon {
  display: inline-block;
  position: relative;
  padding: 5px 0;

  > .icon {
    font-size: 70px;
    line-height: 110%;
    color: @gray-4;
    text-align: center;
  }

  > span {
    color: @white;
    background: @gray-4;
    padding: 1px 3px;
    font-size: 12px;
    line-height: 130%;
    position: absolute;
    top: 45px;
    left: 10px;
  }
}

.umb-fileupload input {
  font-size: 12px;
  line-height: 1;
}

//
// Related links
// --------------------------------------------------
.umb-relatedlinks table > tr > td { word-wrap:break-word; word-break: break-all; border-bottom: 1px solid transparent; }
.umb-relatedlinks .handle { cursor:move; }
.umb-relatedlinks table > tbody > tr.unsortable .handle { cursor:default; }

.umb-relatedlinks table td.col-sort { width: 20px; }
.umb-relatedlinks table td.col-caption { min-width: 200px; }
.umb-relatedlinks table td.col-link { min-width: 200px;  }
.umb-relatedlinks table td.col-actions { min-width: 120px; }

.umb-relatedlinks table td.col-caption .control-wrapper,
.umb-relatedlinks table td.col-link .control-wrapper { display: flex; }

.umb-relatedlinks table td.col-caption .control-wrapper input[type="text"],
.umb-relatedlinks table td.col-link .control-wrapper input[type="text"] { width: auto; flex: 1; }

/* sortable placeholder */
.umb-relatedlinks .sortable-placeholder {
    background-color: @tableBackgroundAccent;
    display: table-row;
}
.umb-relatedlinks .sortable-placeholder > td {
    display: table-cell;
    padding: 8px;
}
.umb-relatedlinks .ui-sortable-helper {
    display: table-row;
    background-color: @white;
    opacity: 0.7;
}
.umb-relatedlinks .ui-sortable-helper > td {
    display: table-cell;
    border-bottom: 1px solid @tableBorder;
}


//
// Tags
// --------------------------------------------------
.umb-tags {
    border: @inputBorder solid 1px;
    padding: 5px;
    min-height: 54px;
    font-size: 13px;
    text-shadow: none;
    box-sizing: border-box;
    .umb-property-editor--limit-width();

    .tag {
        cursor: default;
        margin: 10px;
        padding: 10px 15px;
        background: @blueExtraDark;
        position: relative;
        user-select: all;
        
        .icon-trash {
            position: relative;
            cursor: pointer;
            padding-left: 2px;
            font-size: 15px;
            right: -5px;
            bottom: -1px;
        }

        .umb_confirm-action__overlay.-left{
            top: 6px;
            left: auto;
            right: 15px;
        }
    }

    input {
        border: none;
        background: @white;
    }
    
    .twitter-typeahead {
        margin: 10px;
        margin-top: 16px;
        vertical-align: top;
        input {
            padding-left: 0;
        }
    }
}

//
// Date/time picker
// --------------------------------------------------
.bootstrap-datetimepicker-widget .btn{padding: 0;}
.bootstrap-datetimepicker-widget .picker-switch .btn{ background: none; border: none;}
.umb-datepicker .input-append .add-on{cursor: pointer;}
.umb-datepicker .input-append .on-top {
    position: absolute;
    margin-left: -31px;
    margin-top: 1px;
    display: inline-block;
    height: 22px;
    padding: 5px 6px 3px 6px;
    font-size: @baseFontSize;
    font-weight: normal;
    line-height: @baseLineHeight;
    text-align: center;
    background-color: @white;
    color: @ui-option-type;
    &:hover {
        color: @ui-option-type-hover;
    }
}
.umb-datepicker p {margin-top:10px;}
.umb-datepicker p a{color: @gray-3;}

//
// Code mirror - even though this isn't a proprety editor right now, it could be so I'm putting the styles here
// --------------------------------------------------

.CodeMirror, .CodeMirror-scroll {
	height: 100%;
    min-height:200px;
}

//
// Custom styles of property editors in property preview in document type editor
// -----------------------------------------------------------------------------
.umb-group-builder__property-preview {
    .umb-property-editor {
        .slider {
            .tooltip {
                display: none;
            }
        }
    }
}
