/*
 * =============================
 * @author: 	Peter Slagter
 * @module: 	mod_library2
 * @about: 		Main CSS-file for the library 2
 * =============================
 */

/* Defaults */
/* Vertical flow */

form#l2-sel-filter,
div#l2-doc-image {
    margin: 0 0 0.8em 0;
    position: relative;
}

div#l2-doc-image img {
    position: relative;
    margin: 0 auto;
}

div.probase_tree {
    margin-bottom: 0 !important;
    padding-bottom: 1.5em;
}

form#l2-sel-filter input,
.l2-filterContent select,
.l2-doc-link-value {
    border-color: hsl(200deg 0% 75% / 60%);
    background: #fff;
}

/*
 * =============================
 * Document selection (search, tree or labels)
 * =============================
 */

/*
    Search field
    --------------------------------------------------
*/
form#l2-sel-filter {
    visibility: visible;
    background-color: transparent;
}

form#l2-sel-filter div.field {
    margin: 0;
}

form#l2-sel-filter div.fieldinput {
    position: relative;
    margin: 0;
    padding: 0;
}

form#l2-sel-filter input {
    width: 100%;
    box-sizing: border-box;
}

.l2-sel-filter-clear {
    position: absolute;
    right: 0.5em;
    top: 7px;
    width: 16px;
    height: 16px;
    text-indent: -999em;
    cursor: pointer;
    background: transparent url(../img/icon-clear.png) no-repeat 0 0;
    background-size: 16px;
}

form#l2-sel-filter .field_sep {
    display: none;
}

/*
    ProBase Tree
    --------------------------------------------------
*/

.module-tabs--library .all_workspace_switch,
.module-tabs--library .probase_tree {
    margin-bottom: 1em;
    padding-bottom: 0;
}

.all_workspace_switch .probase_tree {
    margin-bottom: 0;
}

/*
    Label selection
    --------------------------------------------------
*/
div#l2-sel-labels {
    overflow: hidden;
}

div#l2-sel-labels div {
    float: left;
    margin: 0 20px .5em 0;
}

div#l2-sel-labels h3,
div#l2-sel-labels h4 {
    white-space: nowrap;
}

div#l2-sel-labels h3 {
    margin-bottom: .25em;
}

div#l2-sel-labels h4 {
    margin-bottom: .25em;
    font-weight: normal;
    color: #757575;
}

div#l2-sel-labels ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

div#l2-sel-labels li {
    display: inline-block;
    margin-bottom: 0.3rem;
}

div#l2-sel-labels li:first-child {
    margin-left: 0;
}

.l2-tag {
    margin-right: 3px;
    cursor: pointer;
}

div#l2-sel-labels li a,
.l2-tag {
    position: relative;
    background: #fbfbfb;
    padding: 0.3em 0.8em;
    display: inline-block;
    border-radius: 30px;
    text-decoration: none;
    color: #444;
}

div#l2-sel-labels li a:hover,
.l2-tag:hover {
    border-color: #d8d8d8;
    color: #000;
    background-color: #fff;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
}

div#l2-sel-labels li.active a,
.l2-tag--active {
    padding-right: 12px;
}

div#l2-sel-labels li.active a {
    border-color: #ccc;
    color: #4e4e4e;
    background: #d5d5d5;
    box-shadow: inset 0 1px 3px 0 rgba(0,0,0,0.15);
}

div#l2-sel-labels li.active a:after,
.l2-tag:after {
    position: absolute;
    display: block;
    content: "";
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: url(../img/remove-tags.png) no-repeat 0 0;
}

.l2-tag:hover:after,
div#l2-sel-labels li.active a:hover:after {
    background-position: 0 -19px;
}

/*
 * =============================
 * DataGrid
 * =============================
 */

.l2-contentHeader {
    padding: 15px 10px 5px;
    background: #f2f2f2;
}

.l2-contentHeader h2 {
    margin-block: 0 0.5em;
}

div#mt-main {
    padding: 0 3px;
}

div.col-2 div#mt-main {
    padding: 0 0 0 3px;
}

.l2-libraryDashboard {
    margin: 0 !important;
    background: #fff !important;
    border: 0;
}

.l2-libraryDashboard .dg-footer {
    border-bottom: 0;
}

/*
    QuickLinks layout
    --------------------------------------------------
*/

.l2-dashboardActions {
    margin-bottom: 0 !important;
}

/*
    DataGrid optionals
    --------------------------------------------------
*/

.l2-libraryDashboard .dg-header {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    border-bottom: 0;
}

.l2-libraryDashboard div.dg-optionals {
    padding: 7px 0 7px 10px;
    border-top: 0;
    border-bottom: 1px solid #e5e5e5;
    background-color: #f2f2f2;
}

div.dg-optionals img.icon {
    padding: 1px;
}

div.dg-optionals a.selected img.icon {
    background: #ddd;
}

/** Active filters */
.l2-activeFilters strong {
    display: block;
    margin-bottom: 5px;
}

.l2-activeFilters ul {
    margin: 0;
    padding: 0 300px 0 0;
    list-style: none;
    clear: left;
}

.l2-activeFilters li,
.l2-filterContent,
.l2-filterLabel {
    display: inline-block;
    margin-right: 5px;
}

/*
    DataGrid filters
    --------------------------------------------------
*/

.dg-filter-container {
    padding: 0;
    box-sizing: border-box;
}

/*
    Library 2 header
    --------------------------------------------------
*/

.l2-workspaceNotice {
    position: absolute;
    right: 4em;
    top: 3px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 3em;
}

.l2-workspaceNotice span {
    padding: .15em .5em;
    border-radius: 5px;
    line-height: 16px;
    color: #000;
    background-color: #FFEEAC;
    cursor: help;
}

.l2-workspaceNotice img {
    margin-right: 3px;
}

.l2-trashNotice {
    line-height: 1.5 !important;
}

/*
    DataGrid category view
    --------------------------------------------------
*/

.dg-header ul.dg-tools li.dg-l2-category {
    width: 24px;
    margin-left: 5px;
}

.dg-header ul.dg-tools li.dg-l2-category,
.dg-header ul.dg-tools li.dg-l2-categories {
    background: transparent url(../img/library2-sprite.png?v=2) no-repeat 0 -150px;
}

.dg-header ul.dg-tools li.dg-l2-categories {
    background-position: -24px -150px;
}

.dg-header ul.dg-tools li.dg-l2-category:hover {
    background-position: -98px -150px;
}

.dg-header ul.dg-tools li.dg-l2-categories:hover {
    background-position: -122px -150px;
}

.dg-header ul.dg-tools li.dg-l2-category-active,
.dg-header ul.dg-tools li.dg-l2-category-active:hover {
    background-position: -48px -150px;
}

.dg-header ul.dg-tools li.dg-l2-categories-active,
.dg-header ul.dg-tools li.dg-l2-categories-active:hover {
    background-position: -73px -150px;
}

/*
    DataGrid filter
    --------------------------------------------------
*/

/* defaults */
div.dg-filter {
    padding-bottom: 1px;
}

form.dg-filter,
div.dg-filter {
    background-position: right -50px;
}

form.dg-ft-moving {
    background: #fff;
    opacity: .65;
}

form.dg-ft-moving h3,
form.dg-ft-moving h3 a {
    background: #eee;
}

h3.dg-filtertitle a {
    font-weight: bold;
    color: #222;
}

h3.dg-filtertitle a:hover {
    color: #4091bf;
    text-decoration: underline;
}

form.dg-filter-active span.dg-label {
    text-indent: 5px;
}

span.dg-col-resize {
    height: 41px;
}

form.dg-filter-drop span.dg-col-resize {
    height: 20px;
}

/*
    DataGrid table
    --------------------------------------------------
*/

table.dg-table td {
    padding: 0.75em 10px 0.75em 14px;
    line-height: 16px;
}

table.dg-table tr.even td {
    background-color: transparent;
}

/*
    DataGrid table footer
    --------------------------------------------------
*/

ol.dg-table-footer li {
    padding: 0;
}

/*
    DataGrid list
    --------------------------------------------------
*/

body.mod-library div.datagrid-list form.dg-filter,
body.mod-editor div.datagrid-list form.dg-filter {
    border-right: 0;
}

/*
    DataGrid footer
    --------------------------------------------------
*/

div.dg-footer {
    border: 0;
    color: #666;
    background-color: #fff;
}

/*
 * =============================
 * Document specs & information
 * =============================
 */

/*
    Document title
    --------------------------------------------------
*/

.l2-doc-title {
    font-size: 15px;
    margin-bottom: 0.5em;
}

/*
    Document image
    --------------------------------------------------
*/
div#l2-doc-image {
    position: relative;
    overflow: hidden;
}

div#l2-doc-image > a {
    position: relative;
    display: block;
    padding-bottom: 66%;
    overflow: hidden;
    background-color: #e8e8e8;
}

div#l2-doc-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

div#l2-doc-image img[src*='.svg'] {
    width: calc(100% - 40px);
    padding: 20px;
}

div#l2-doc-image img,
div#l2-doc-image a {
    border-radius: 3px;
}

div#l2-doc-image > a::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, .7) url(../img/icon-zoom.png) no-repeat 50% 50%;
    background-size: 48px;
    transition: opacity .2s ease-out;
}

div#l2-doc-image > a:hover::after {
    opacity: 1;
}

.l2-doc-icon {
    margin-bottom: 0.8em;
}

.l2-doc-icon-block {
    display: block;
    padding: 3em;
    border-radius: 4px;
    text-align: center;
    background-color: #e8e8e8;
}

.l2-doc-icon .icon {
    transition: transform .2s ease-out;
}

.l2-doc-icon:hover a .icon {
    transform: scale(1.1);
}

/*
    Document link
    --------------------------------------------------
*/

.l2-doc-link {
    position: relative;
    display: block;
    margin-bottom: 2em;
}

.l2-doc-link-value {
    position: relative;
    width: 100%;
    padding-right: 93px;
    box-sizing: border-box;
}

.l2-doc-link-copied {
    position: absolute;
    top: 5px;
    left: 50%;
    padding: 0.2em 1.2em;
    border-radius: 30px;
    text-align: center;
    white-space: nowrap;
    visibility: hidden;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.85);
    transform: translate(-50%, 0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s ease 0.3s;
    opacity: 0;
    z-index: 1;
}

.l2-doc-link-copied--visible {
    transform: translate(-50%, -10px);
    transition-delay: 0s;
    visibility: visible;
    opacity: 1;
}

.l2-doc-link-button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 91px;
    height: 26px;
    margin-right: 0;
    padding: 1px 6px;
    white-space: nowrap;
}

/*
    Document specs / information - definition list
    --------------------------------------------------
*/
dl#l2-doc-specs {
    width: 100%;
    height: 100%;
    margin: 0;
}

dl#l2-doc-specs dt,
dl#l2-doc-specs dd {
    display: block;
}

dl#l2-doc-specs dt {
    font-weight: normal;
    color: #757575;
}

dl#l2-doc-specs dd {
    margin: 0 0 .5em;
}

/*
    Document tag component
    --------------------------------------------------
*/
.multiple-tags-note {
    margin-top: 30px;
}

.multiple-tags-note span.alert {
    color: red;
    font-weight: bold;
}

/*
    Document upload page
    --------------------------------------------------
*/
div.multi-upload-thumbnail {
    display: inline-block;
    margin: 0 auto;
    width: 48px;
    height: 48px;
    line-height: 48px;
    padding: 10px;
    vertical-align: middle;
    text-align: center;
}

div.multi-upload-thumbnail.--image {
    width: 200px;
    height: 110px;
    line-height: 100px;
}

div.multi-upload-thumbnail img {
    max-width: 100%;
    max-height: 100%;
}

/*
    .datagrid-fullscreen
    CSS for fullscreen modus of DataGrid
*/
div.datagrid-fullscreen {
    background-color: #fff;
}

/*
    Document choose page - drag & drop
    --------------------------------------------------
*/

#upload_section {
    position: relative;
    width: 720px;
    margin: 0;
}

#upload_section legend {
    position: absolute;
    top: 210px;
    width: 100%;
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

#docIds:after {
    content: '';
    position: absolute;
    left: 120px;
    right: 120px;
    top: 257px;
    height: 42px;
    border: 1px solid #efefef;
    border-radius: 4px;
    background: rgba(0,0,0,0.01);
    pointer-events: none;
}

#docIds:before {
    content: '';
    position: absolute;
    top: 90px;
    left: calc(50% - 40px);
    width: 80px;
    height: 80px;
    background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20448%20512%22%3E%3Cpath%20d%3D%22M44%20480c-24%200-44-20-44-44v-72c0-7%205-12%2012-12h8c7%200%2012%205%2012%2012v72c0%207%205%2012%2012%2012h360c7%200%2012-5%2012-12v-72c0-7%205-12%2012-12h8c7%200%2012%205%2012%2012v72c0%2024-20%2044-44%2044H44Zm24-327L216%205c4-5%2012-5%2017%200l148%20148c4%205%204%2012%200%2017l-8%207c-4%205-12%205-17%200L241%2061v312c0%207-5%2012-12%2012h-10c-7%200-12-5-12-12V61L92%20177c-5%205-13%205-17%200l-7-7c-5-5-5-12%200-17Z%22%20style%3D%22fill-rule%3Anonzero%22%2F%3E%3C%2Fsvg%3E") no-repeat center;
    pointer-events: none;
    opacity: 0.15;
    z-index: 1;
}

#docIds .Upload__fileInput {
    padding: 260px 130px 100px;
    border-color: #ddd;
}

#docIds .Upload__fileInput::before {
    content: none;
}

#docIds .Upload__fileInput::after {
    top: 268px;
    left: 155px;
}

/** Edge - remove drag & drop hint, because of no support */
@supports (-ms-ime-align:auto) and (-webkit-mask: url()) {
    #docIds {
        border: none;
    }

    .Upload--isDragging input#docIds__fileInput {
        border: none;
        margin: 0;
        padding: 0;
        background-color: #ffff;
        background-image: none;
    }
}

/** IE, remove drag & drop hint, because of no support */
@media screen and (min-width:0\0) and (min-resolution:+72dpi), \0screen\,screen\9 {
    #docIds {
        border: none;
    }

    .Upload--isDragging input#docIds__fileInput {
        border: none;
        margin: 0;
        padding: 0;
        background-color: #ffff;
        background-image: none;
    }
}

/*
    Meta data
    --------------------------------------------------
*/

#metadata legend {
    position: absolute;
    left: -999em;
}

#metadata td {
    border: 0;
    padding: 0;
}

#metadata .form-column.first {
    border-radius: 5px;
    background: #f2f2f2;
}

#metadata .form-column.first .fieldinput {
    padding: 1em;
    min-height: 110px;
    line-height: 110px;
    vertical-align: middle;
    text-align: center;
}

#metadata .form-column.first .field {
    display: flex;
    flex-direction: column;
}

#metadata .form-column.first .subtitle {
    order: 1;
    margin-top: 0.3em;
    text-align: center;
    color: #757575;
}

#metadata .form-column.last {
    padding-left: 2em;
}

#metadata .form-column.last label.field {
    float: none;
    width: auto;
}

#metadata .form-column.last div.field {
    border-top: 0;
}

#metadata .form-column.last .fieldinput {
    margin-left: 0;
}

#metadata .form-column.last textarea {
    height: 3.2em;
}

#metadata .form-element-image-point-container {
    width: 200px;
    margin: 0 auto;
}

#metadata .proFormText {
    width: 60%;
}

#metadata .multilingualtext .fe-language-selector {
    margin-top: 3px;
}

#metadata .multilingualtext .fe-language-selector:first-of-type {
    margin-left: 2px;
}
