/* INDEX
- edit mode
- column display
- specific elements
- content ( wrapped in contextual menu display)
- other specific adaptations of content
- titles and labels
- temporary terms
- lookup terms
- language bar / language component
- inline editor
- Preview mode hack to NOT display contextuals
- Drag & Drop
- Print
*/

/* edit mode */

section.inedit {
    border-left: 1px #c05600 solid;
    border-right: 1px #c05600 solid;
    padding-left: .5rem;
    padding-right: .5rem;
}

section.lil.inedit {
    margin: 0 calc(-.5rem + -1px);
}

/* column display */

.row.columnpresentation {
    margin-bottom: .4rem;
}

/* specific elements */

.iateid {
    color: #003565;
    /* border: 2px #003565 solid; */
    /* padding: 5px; */
    display: inline-block;
    font-size: 1.4rem;
    margin: 0;
    margin-top: .5rem;
}

.more_fields {
    padding-left: 10px;
    margin-left: -12px;
    border-left: 2px #0B76C3 solid;
}

/* content (wrapped in contextual menu display) */

.columnpresentation .textoff {
    font-size: 1.2rem;
    line-height: 1.5rem;
    margin: 0;
    padding: 0;
    color: black;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    display: block;
}

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .columnpresentation .textoff {
        display: inline-block;
    }
}

.columnpresentation app-context-menu p {
    margin: 0;
    overflow: hidden;
}

.columnpresentation app-context-menu .bold {
    font-size: 1rem;
    font-weight: bold;
}

.columnpresentation app-context-menu .required {
    font-style: italic;
    color: #be1e2d;
}

.columnpresentation .missing {
    font-style: italic;
    color: #5c6a6d;
    font-size: 1.2rem;
    line-height: 1.5rem;
}

.columnpresentation p span {
    font-size: 0.625rem;
}

.columnpresentation .is-term app-context-menu, .columnpresentation .is-term .textoff {
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1.8rem;
}

.columnpresentation.primary .off app-context-menu p:not(.missing), {
    font-weight: bold;
    font-size: 1.8rem;
    line-height: 2rem;
    margin-top: -0.4rem;
}

/* other specific adaptations of content */

.columnpresentation.reference .resicon {
    margin-top: 3px;
}

.columnpresentation.reference .resicon.add {
    display: none;
    margin-top: 3px;
    margin-bottom: 20px;
}

.columnpresentation.reference:hover .resicon.add {
    display: block;
}

span.btn.btn-default.btn-secondary.form-control.ui-select-toggle {
    color: #003565;
    background-color: #f8f8f8;
    text-align: center!important;
    font-size: 1.2rem;
    color: #003565;
    font-weight: bold;
    margin: 0;
    padding: 0;
    line-height: 1.5rem;
    margin-bottom: 4px;
}

.btn.ui-select-toggle>.caret.pull-right {
    display: none;
}

.ui-select-match-text.pull-left {
    float: right!important;
}

.ui-select-match-text.pull {
    float: left!important;
}

/* titles and labels */

.columnpresentation h2, .columnpresentation h3 {
    font-size: 1.2rem;
    color: #003565;
    font-weight: normal;
    margin: 0;
    padding: 0;
    line-height: 1.5rem;
    margin-bottom: 4px;
    -ms-word-break: break-all;
    word-break: break-all;
    word-break: break-word;
    word-wrap: break-word;
}

.columnpresentation h2 strong {
    font-weight: bolder;
}

@media only screen and (max-width: 992px) {
    .columnpresentation h2, .columnpresentation h3 {
        text-align: left;
        margin-bottom: 0.3rem;
    }
}

.columnpresentation h3 {
    font-weight: normal;
    font-size: 1.2rem;
}

.columnpresentation h2.section-title {
    font-size: 2rem;
    border-bottom: 2px #0B76C3 solid;
    padding-bottom: 3px;
}

.columnpresentation.primary h2, .columnpresentation h2.primary, .termDiv span.primary {
    color: #c05600;
    font-weight: bold;
    font-size: 1.4rem;
}

/* Temporary terms */

.widget.temporary {
    background-color: #f0f0f0;
    border-style: dashed;
}

/* lookup terms */

.widget.lookup {
    border-color: #c05600;
    border-style: dotted;
    border-width: 1px;
    margin-bottom: 1rem;
    clear: both;
}

.lookuphandler {
    color: #c05600;
    font-weight: bold;
    text-align: center;
}

@media print {
    .lookuphandler {
        display: none !important;
    }
}

/* language bar / language component */

.languagearrowup {
    display: none;
    margin-top: -1px;
    cursor: pointer;
}

.listview app-res-language:hover .languagearrowup {
    display: block;
}

.languagebar {
    margin-top: 10px;
}

.languagebar ul, .languagebar ul li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.languagebar ul li {
    float: left;
    text-align: center;
}

.languagebar ul li span.lang {
    display: block;
    background-color: #ddd;
    color: black;
    font-size: 1.2rem;
    padding: .3rem .1rem;
    min-width: 4rem;
    border-radius: .5rem;
    margin-right: .2rem;
    margin-bottom: .2rem;
    cursor: pointer;
    position: relative;
}

.languagebar ul li span.lang .fa {
    font-size: .9rem;
}

.languagebar ul li span.lang:hover {
    text-decoration: none;
}

.languagebar ul li.exists span.lang {
    background-color: #003565;
    color: #f8f8f8;
}

.languagebar ul li.open span.lang {
    background-color: #0B76C3;
    color: #f8f8f8;
}

.languagebar ul li span.lang .language_tooltip {
    position: absolute;
    bottom: calc(100% + 3px);
    left: 0;
    background-color: #0B76C3;
    color: #FFF;
    padding: .5rem;
    border-radius: .5rem;
    display: none;
    word-break: initial;
}

.languagebar ul li span.lang:hover .language_tooltip {
    display: inline-block
}

app-inline-edit, app-inline-select {
    display: block;
}

.missing {
    background-color: #e5e5e5;
    min-height: 1.4rem;
}

app-context-menu.missing {
    display: block;
}

app-context-menu.unavailable, .unavailable app-context-menu .contextual, .unavailable {
    cursor: not-allowed;
}

.crossrefs .off:hover, app-inline-edit .off:hover, app-context-menu.missing:hover, app-context-menu .missing:hover, .attachment_handler.missing:hover {
    background-color: #ddd;
}

app-inline-edit .on, app-inline-select .on {
    display: block;
    position: relative;
}

app-inline-edit .on p.editorlabel {
    border: 1px #0B76C3 solid;
    border-bottom: none;
    background-color: #f8f8f8;
    color: #0B76C3;
    margin: 0;
    max-width: 60%;
    padding: 2px;
    font-size: 1rem;
    padding-left: 5px;
    border-top-left-radius: 5px;
    padding-right: 2rem;
    border-top-right-radius: 1rem;
    position: absolute;
    bottom: calc(100% - 1px);
    z-index: 1;
}

app-inline-edit .on .tinymce {
    border: 1px solid #be1e2d;
    border-radius: .4rem;
    font-size: 1.2rem;
}

app-inline-edit .on app-iate-html-editor {
    margin: 0 !important;
}

app-inline-edit .off app-resicon {
    float: left;
    margin-right: 10px;
    overflow: hidden;
    display: block;
}

app-inline-edit .off span.textoff {
    /* display: block; */
    overflow: hidden;
    width: 100%;
}

.textoff p {
    margin: 0;
}

app-inline-edit .on .resicon {
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: top;
}

app-inline-edit .on .resicon span, app-inline-edit .on .resicon p {
    line-height: calc( 1.5rem - 2px);
}

.inline-icons {
    float: right;
    margin-top: 5px;
    margin-right: 5px;
}

app-inline-edit .on .subform-subaction-pane {
    background-color: #cccccc;
    margin: 0;
    margin-top: 10px;
    border-radius: .4rem;
    padding: 10px;
}

app-inline-edit .on .tinybtncontainer .mce-tinymce-inline {
    left: 5px !important;
    right: auto !important;
}

.fontawesome {
    font-family: 'FontAwesome', Helvetica;
}

.collapsedhandler p {
    color: #5c6a6d;
    margin: 0;
    font-style: italic;
    text-align: center;
    font-size: 1rem;
    cursor: pointer;
    background-color: #dfdfdf;
    padding: .5rem;
    margin-bottom: .5rem;
}

/* Preview mode hack to NOT display contextuals */

.container.preview app-inline-edit .off:hover {
    background-color: #f8f8f8;
}

.container.preview .angular2-contextmenu {
    display: none;
}

.container.preview app-context-menu>div:hover span.fa {
    display: none;
}

.container.preview app-context-menu>div:hover {
    padding: 0;
}

/* Drag & Drop */

.dnd-drag-start {
    -moz-transform: scale(0.8);
    -webkit-transform: scale(0.8);
    transform: scale(0.8);
    opacity: 0.7;
    border: 2px dashed #000;
}

.dnd-drag-enter {
    opacity: 0.7;
    border: 2px dashed #000;
}

.dnd-drag-over {
    border: 2px dashed #000;
}

.dnd-sortable-drag {
    -moz-transform: scale(0.9);
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
    opacity: 0.7;
    border: 1px dashed #000;
}

div.dragContainer, div.dragGroup {
    display: block;
    position: relative;
}

div.dragContainer {
    border: 1px dotted #cccccc;
    padding: 2rem;
    border-radius: .4rem;
}

div.dragHandler {
    font-size: 1.4rem;
    display: none;
    min-height: 4rem;
    padding: 1rem;
    border: 1px solid #cccccc;
    color: #000;
    border-radius: .4rem;
    /* background-image: url(../img/ddhandle.png);
    background-position: top 1.4rem right 1.4rem; */
    text-align: left;
    background-size: 1.5rem 1.5rem;
    background-repeat: no-repeat;
    cursor: move !important;
    margin-top: 1rem;
    padding-right: 3.5rem;
}

div.dragHandler.lookup {
    border: 1px dotted #c05600;
    color: #c05600;
}

div.dragHandler.draggable {
    display: block;
}

div.termDiv {
    position: relative;
    /* z-index: 1; */
}

.arrow_sort {
    color: #c05600;
    position: absolute;
    right: 1rem;
    top: .8rem;
    font-size: 1.2rem;
}

.arrow_sort .fa:hover {
    color: #003565;
    cursor: default !important;
}

.arrow_sort .fa-arrow-up {
    position: absolute;
    top: 0;
    right: 0;
}

.arrow_sort .fa-arrow-down {
    position: absolute;
    top: 1.5rem;
    right: 0;
}

.haslangpadding {
    padding: 0 calc(1rem + 16px);
}

.inedit .haslangpadding {
    padding: 0 calc(.5rem + 15px);
}

.hastermpadding {
    padding: 0 15px;
}

@media (max-width: 768px) {
    .haslangpadding {
        padding: 0 calc(1rem + 1px);
    }
    .hastermpadding {
        padding: 0;
    }
}

/* print */

@media print {
    .languagebar {
        display: none;
    }
    app-res-domain .widget.bordered {
        border: none;
    }
    app-collapser {
        display: none;
    }
    .noprint {
        display: none;
    }
    app-res-term .widget.temporary {
        display: none;
    }
    app-context-menu.missing {
        display: none;
    }
    .iateid {
        /* clear: both;
        display: block;
        margin-top: 1rem;
        margin-bottom: 1rem; */
    }
    .columnpresentation h2, .columnpresentation h3 {
        font-weight: bold;
    }
}