/* INDEX
- Common styles (native element which has a base style different by the default one)
- Form page layout 
- Checkboxes and radio customisation + management of labels
- custom text editor
- common custom commands styles
- Custom select & autosuggest
- validation color
- colors & focus colors
- error message in form
- titles position
*/

/* common styles */

label {
    font-weight: normal;
}

input, select {
    border: 0;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -o-border-radius: 0;
    border-radius: 0;
    border: 1px solid #0B76C3;
    padding-left: 4px;
}

select:not([multiple]).form-control {
    background-image: url("../img/poparrow1_normal.png");
    background-repeat: no-repeat;
    background-position: right 3px center;
    background-size: 21px 21px;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-indent: 1px;
    text-overflow: '';
    padding-right: 30px;
}

select:not([multiple]).form-control::-ms-expand {
    display: none;
}

select:not([multiple]).form-control:focus {
    background-image: url("../img/poparrow1_rollover.png");
}

select[multiple] {
    font-size: 1.4rem;
}

select[multiple] option {
    margin-bottom: .4rem;
}

input[type=checkbox], input[type=radio] {
    display: none;
}

input[type=checkbox].iatechecks {
    display: inline-block;
    vertical-align: text-bottom;
}

input[type=text], input[type=number] {
    height: 28px;
}

input[type=text]:focus {
    border: 1px #c05600 solid;
    outline: #c05600 auto 2px;
}

.form-control:focus {
    box-shadow: none;
}

/* Form page layout */

.row-header {
    margin-top: .5rem;
}

.row-header.first {
    margin-top: .7rem;
}

/* Checkboxes and radio customisation + management of labels */

label {
    display: inline-block;
    cursor: pointer;
    position: relative;
    padding-left: 25px;
    margin-right: 15px;
}

input[type=radio]+label {
    position: relative;
    background-image: url("../img/radio_normal.png");
    background-size: 16px 16px;
    background-color: transparent;
    background-repeat: no-repeat;
    cursor: pointer;
    height: 16px;
    padding-left: 20px;
    display: inline-block;
}

input[type=radio]:checked+label:after {
    content: ' ';
    background-image: url("../img/radio_selected.png");
    background-size: 16px 16px;
    background-repeat: no-repeat;
    height: 16px;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    color: #cccccc;
    line-height: 1;
    font-size: 1.125rem;
    text-align: center;
}

input[type=radio]+label:hover {
    background-image: url("../img/radio_rollover.png");
    background-size: 16px 16px;
    background-repeat: no-repeat;
}

input[type=checkbox]+label {
    position: relative;
    background-image: url("../img/anchor1_normal.png");
    background-size: 16px 16px;
    background-color: transparent;
    background-repeat: no-repeat;
    cursor: pointer;
    height: 16px;
    padding-left: 20px;
    display: inline-block;
}

input[type=checkbox]+label:hover, input[type=checkbox]+label.focus {
    outline: -webkit-focus-ring-color auto 5px;
    /* border: 1px #0B76C3 solid; */
    background-size: 16px 16px;
    background-repeat: no-repeat;
}

input[type=checkbox]:checked+label:after {
    content: ' ';
    background-image: url("../img/anchor1_selected.png");
    background-size: 16px 16px;
    background-repeat: no-repeat;
    height: 16px;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: 0;
    color: #cccccc;
    line-height: 1;
    font-size: 1.125rem;
    text-align: center;
}

input[type=radio]+label.disabled, input[type=checkbox]+label.disabled {
    color: #5c6a6d;
    cursor: not-allowed;
}

input[type=radio]+label.disabled:after, input[type=checkbox]+label.disabled:after {
    display: none;
}

.language input[type=checkbox]+label.disabled {
    cursor: pointer;
}

/* custom text editor */

.tinybtncontainer {
    position: relative;
}

.tinymce-inline-editing:not(.redborders) a {
    pointer-events: none;
    cursor: text;
}

.tinymce-inline-editing {
    padding: 2px;
    background-size: 18px 18px;
    vertical-align: middle;
}

/* common custom commands styles */

app-iate-html-editor, app-autosuggest, custom-select {
    display: block;
    margin-top: 5px;
}

.widget app-iate-html-editor:first-child {
    margin-top: -25px;
}

.widget app-iate-html-editor[inlineedit=true] {
    margin-top: 0;
}

.mce-content-body p {
    color: #003565;
}

/* Custom select & autosuggest */

.select-box, .custom-select {
    display: inline-block;
    width: 100%;
    user-select: none;
}

.select-box, .custom-select:not(.inline) {
    padding: 0;
    margin: 0;
    border: 1px solid #0B76C3;
    color: #5c6a6d;
    height: 28px;
    border-radius: 0;
    background-color: #f8f8f8;
    background-repeat: no-repeat;
    background-image: url("../img/poparrow1_normal.png");
    background-position: right 5px top 4px;
    background-size: 18px 18px;
}

.custom-select.disabled {
    background-color: #e0e0e0;
    cursor: not-allowed !important;
}

app-autosuggest .custom-select:not(.inline) {
    background-image: none;
    padding: 0;
}

.custom-select:not(.inline).active {
    border: 1px solid #c05600;
}

.custom-select:not(.inline).active:focus {
    outline: #c05600 auto 2px;
}

custom-select, app-autosuggest, .custom-select {
    position: relative;
}

.custom-select:not(.inline) {
    cursor: default;
}

.custom-select .open {
    background-color: #5c6a6d;
    color: white;
    z-index: 5;
    position: absolute;
    width: 100%;
    max-height: 150px;
    overflow: auto;
    margin-top: -1px;
}

app-autosuggest .custom-select .open {
    max-height: 300px;
}

.custom-select .open ul, .custom-select .open li {
    list-style: none;
    margin: 0;
    padding: 0.25rem;
    display: block;
    line-height: 1.5rem;
    font-size: 1.2rem;
    text-align: left;
}

.custom-select .open li:hover, .custom-select .open:not(:hover) li.active {
    color: #5c6a6d;
    background-color: white;
}

.custom-select .selected {
    white-space: nowrap;
    overflow: hidden;
}

.custom-select.select_as_title {
    font-weight: normal;
    font-size: 1.2rem;
    text-align: right;
    font-size: 1.2rem;
    color: #003565;
}

.custom-select input {
    border: none;
    width: 100%;
}

label.for-select {
    padding-top: 1rem;
    text-align: right;
    margin: 0;
}

/* validation colors */

.input-group.validated .form-control, .input-group.validated .input-group-addon, .select-box.validated {
    color: #0B76C3;
}

.select-box:hover, .select-box.validated:hover {
    background-image: url("../img/poparrow1_rollover.png");
}

.input-group:hover .form-control, .input-group:hover .input-group-addon, .select-box:hover, .select-box.validated:hover {
    color: #0B76C3;
    border-color: #0B76C3;
}

.select-box select, .custom-select:not(.inline) .static {
    padding: 5px 8px;
    width: 100%;
    border: none;
    box-shadow: none;
    color: #003565;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: right 28px top 4px;
    padding-right: 50px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select::-ms-expand {
    display: none;
}

select {
    position: relative;
    z-index: 666
}

.ng-pristine, .ng-dirty {
    position: relative;
}

input.tovalidate {
    background-position: right 3px center;
    background-repeat: no-repeat;
    width: 100%;
}

input::-ms-clear {
    /* IE decided to add an X sign to any textbox just because. */
    width: 0;
    height: 0;
}

custom-select.ng-invalid.ng-dirty .custom-select .static, input.tovalidate.ng-dirty.ng-invalid {
    /*background-image: url(../img/invalid.png);*/
    border-color: #be1e2d;
    background-size: 18px 18px;
}

custom-select.ng-invalid.ng-dirty .custom-select {
    border-color: #be1e2d;
}

app-iate-html-editor.ng-invalid.ng-dirty app-rich-text-editor>.textarea {
    /*background-image: url(../img/invalid.png);*/
    border-color: #be1e2d;
    background-size: 18px 18px;
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 20px;
}

/* error message in form */

.error {
    display: inline-block;
    position: relative;
    width: 100%;
    border-top: 1px #be1e2d solid;
    margin-bottom: 2rem;
}

.error.warning {
    border-top: 1px #c05600 solid;
}

.error.standalone {
    margin-top: .5rem;
    /* margin-bottom: 5px; */
    border: none;
}

.error span {
    display: inline-block;
    position: absolute;
    top: 100%;
    right: 0;
    width: auto;
    min-width: 60%;
    background-color: #be1e2d;
    font-weight: bold;
    color: #f8f8f8;
    font-size: 1rem;
    padding: .2rem .8rem;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    margin: 0;
}

.error.warning span {
    background-color: #c05600;
}

.error.standalone span {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.columnpresentation .error span {
    width: 100%;
    left: 0;
    margin-bottom: 5px;
    position: static;
}

/* colors & focus colors */

.form-control, .form-control:focus {
    border: 1px solid #0B76C3;
}

.input-group.focus .form-control, .input-group.focus .input-group-addon, .select-box.focus {
    border-color: #c05600;
    color: #5c6a6d;
}

.select-box select:focus {
    outline: none;
}

/* titles position */

.widget.rounded .overborder .clearfix.row-header {
    margin-top: -4.4rem;
}

.widget.rounded .overborder.static {
    margin-top: -4rem;
}

app-domain .widget.rounded .overborder.static {
    margin-top: -5.5rem;
}

.widget.rounded .overborder.static h3, .widget.rounded .overborder .clearfix.row-header h3, app-language:not(.nobold) h3, app-multi-language h3, .orangeTitle {
    color: #c05600;
    margin: 0;
    margin-top: .4rem;
    font-size: 1.5rem;
    font-weight: bold;
    /* padding: .2rem 1rem; */
}

.widget.rounded .overborder.static h3 .mandatory-mark, .widget.rounded .overborder .clearfix.row-header h3 .mandatory-mark, app-language h3 .mandatory-mark, app-multi-language h3 .mandatory-mark {
    color: #c05600;
}

app-cross-reference h3.notalone, .widget app-reference h3:not(.mandatory) {
    color: #0B76C3;
    font-size: 1.2rem;
    font-weight: normal;
}

app-cross-reference h3.notalone .mandatory-mark, .widget app-reference h3:not(.mandatory) .mandatory-mark {
    font-size: 1.2rem;
}

.input-group-btn>.btn {
    position: relative;
    height: 28px;
    line-height: 1rem;
}

.input-group-btn>a.btn {
    line-height: 18px;
}

.multiselect>li:not(:first-child).empty {
    display: none;
}