// Listview
// -------------------------

.umb-listview {
    min-height: 100px;
}

.umb-listview table {
	border: 1px solid @gray-8;
}

.umb-listview table caption {
  background: @white;
  text-align: left;
  vertical-align: middle;
}

.umb-sub-header {
  padding: 0 0 20px 0;
}

.umb-sub-header .header-content-right {
  float: right;
}

/* listview search */
.form-search {
    .inner-addon {
        position: relative;

        [class^="icon-"], [class*=" icon-"] {
            position: absolute;
            padding: 5px 8px;
            pointer-events: none;

            &i {
                top: 2px;
            }
        }

        input[type="text"] {
            width: 190px;
        }
    }

    /* align icon */
    .left-addon [class^="icon-"], .left-addon [class*=" icon-"] { left: 0; right: inherit; }
    .right-addon [class^="icon-"], .right-addon [class*=" icon-"] { right: 0; left: inherit; }

    /* add padding */
    .left-addon input[type="text"]  { padding-left: 30px !important; padding-right: 6px; }
    .right-addon input[type="text"] { padding-right: 30px; padding-left: 6px !important; }

    &__label-icon{
        width: 30px; 
        height: 30px; 
        position: absolute; 
        top: -1px; 
        left:0; 
        margin:0
      }
}

.umb-listview table form {
  position: relative;
  margin: 0;
}

.umb-listview table input[type="text"] {
  background: none;
  transition: all .5s;
  width: 60px;
  padding: 4px 0 4px 20px;
  border: 1px solid @gray-8;
}

.umb-listview table input::-webkit-input-placeholder,
.umb-listview table input:-moz-placeholder,
.umb-listview table input::-moz-placeholder,
.umb-listview table input:-ms-input-placeholder {
  color: @gray-3;
}

.umb-listview table input[type="text"]:focus {
  width: 200px;
  border: 1px solid @gray-8;
  background: @white;
  color: @black
}

.umb-listview table thead a {
    cursor: default;
}
.umb-listview table thead a:hover {
    text-decoration: none;
}

.umb-listview table thead a.sortable {
    cursor: pointer;
}
.umb-listview table thead a.sortable span:hover {
    text-decoration: underline;
}

.umb-listview .icon-star {
  color: @gray-8;
}

.umb-listview .selected i.icon, .umb-listview tbody tr:hover i.icon{display: none}
.umb-listview .selected input[type="checkbox"],
.umb-listview tr:hover input[type="checkbox"]{display: inline-block !important;}
.umb-listview .inactive{color: @gray-8;}

.umb-listview .selected td{font-weight: bold;}

.umb-listview table thead {
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  background-color: @white;
}

.umb-listview table tfoot {
	background: @gray-10;
}

.umb-listview table tfoot td:last-child {
  border-left: none
}

.umb-listview table tfoot th {
	padding: 0 20px;
}

.umb-listview .label {
  color: @black;
  text-shadow:none;
  background: @gray-10;
  border: 1px solid @gray-8;
  font-size: 12px;
  font-weight: normal;
}

.umb-listview .table-striped tbody > tr:nth-child(even) > td, .umb-listview .table-striped tbody > tr:nth-child(even) > th {
  background-color: @gray-10;
}

.table-striped tbody > tr:nth-child(odd) > td, .table-striped tbody > tr:nth-child(odd) > th {
  background: none
}

/* TEMP */

.umb-minilistview {
    .umb-table-row.not-allowed {
      cursor: not-allowed;
      .umb-minilistview__fade-not-allowed {
        opacity: 0.6;
      }
    }

    div.umb-mini-list-view__breadcrumb {
        margin-bottom: 10px;
    }

    div.no-display {
        display: none
    }

    div.umb-table-cell-padding {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    div.umb-table-cell .form-search {
        width: 100%;
        margin-right: 0;

        input {
            width: 100%;
        }

        .icon-search {
            font-size: 14px;
        }
    }
}

.umb-listview .table-striped tbody td {
  position: relative
}


.umb-listview  .table-striped thead input[type="checkbox"] {
  margin-left: 7px;
}

.umb-listview  .table-striped tbody input[type="checkbox"] {
  display: none;
  margin-left: 7px;
  z-index: 5;
}

.umb-listview .table-striped tbody i {
  display: block;
  top: 10px;
  left:6px;
  padding: 0 0 0 4px;
  z-index: 6;
  background: @white;
  width: 20px;
  height: 20px;
}

.umb-listview .table-striped tbody > tr:nth-child(even) > td i, .umb-listview .table-striped tbody > tr:nth-child(even) > th i{
  background-color: @gray-10;
}

/* don't hide all icons, e.g. for a sortable handle */
.umb-listview .table-striped tbody i:not(.handle):hover {
  display: none !important
}

/* Sticky sub header with correct focus ordering */
.umb-listview .umb-listview__container {
  display: flex;
  flex-direction: column;
}

.umb-listview .umb-listview__container .umb-editor-sub-header {
  order: -1;
}

/* ---------- LAYOUTS ---------- */

.list-view-layout {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: @gray-10;
    margin-bottom: 1px;

    &__sort-handle {
        font-size: 14px;
        color: @gray-8;
        margin-right: 15px;
    }

    &__name {
        flex: 5;
        font-weight: bold;
        margin-right: 15px;
        display: flex;
        align-content: center;
        flex-wrap: wrap;
        line-height: 1.2em;
    }

    &__name-text {
        margin-right: 3px;
    }

    &__system {
        font-size: 10px;
        font-weight: normal;
    }

    &__path {
        flex: 10;
        margin-right: 15px;
    }

    &__icon-wrapper {
        margin-right: 10px;
    }

    &__icon {
        font-size: 18px;
        vertical-align: middle;
        border: 1px solid @gray-8;
        background: @white;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
    }

    &__remove {
        position: relative;
        cursor: pointer;
    }

    input[type="text"] {
        margin-bottom: 0;
    }
}

.list-view-add-layout {
    &:extend(.umb-node-preview-add);
}

.list-view-add-layout:hover {
    &:extend(.umb-node-preview-add:hover);
}
