/*
 * Asset tooltips
 */

.tooltip-inner p {
    margin-bottom: 0;
}

/*
 * Asset popovers
 */

.popover {
    max-width: inherit;
}

.popover p {
    margin-top: 5px;
}

.popover .list-unstyled {
    margin-bottom: 0;
}

/*
 * Asset status widgets
 */

.equipment-content .statuses {
    text-align: start;
}

.asset-statuses {
    margin-top: 20px;
}

.panel-title {
    font-weight: 300;
}

.asset-modal-loading {
    margin: 0;
    padding: 20px;
}

.panel-heading + .list-group .list-group-item:first-child {
    border-top-width: 1px;
}

.list-item-content .status-label.last {
    margin-right: 0;
}

#yard-list .content-header {
    position: relative;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #4f4f4f;
}

.list-item-content  .content-header {
    margin: 10px 0;
}

.list-item-content .content-header:after {
    content: "";
    background: linear-gradient(to right,  rgba(0,0,0,0) 0%, rgba(147,147,147,1) 50%, rgba(0,0,0,0) 100%);
    height: 2px;
    width: 100%;
    display: block;
    position: absolute;
    top: 22px;
}

@media(min-width: 400px) {
    .status-label {
        display: inline-block;
        width: 145px;
        margin-right: 10px;
    }

    .status-label:last-child {
        margin-right: 0;
    }

    .asset-statuses {
        margin-top: 0;
    }

    .equipment-content .statuses {
        display: inline-block;
    }
}

/*
 * Asset modal dialogs
 */

.status-modal .last-seen {
    margin-bottom: 0;
}

.status-modal .extra-footer {
    line-height: 34px;
    vertical-align: middle;
}

.assets-modal .filters {
    padding: 10px 15px;
}

.assets-modal .asset-last-comment {
    margin-top: 10px;
    margin-bottom: 0;
}

.assets-modal .asset-last-comment .comment-body {
    margin-top: 5px;
    margin-bottom: 0;
}

.assets-modal .asset-last-comment header > em {
    display: block;
}

.assets-modal .asset-last-comment .comment-body > p {
    margin-bottom: 0;
}

.assets-modal .modal-body .list-group-item > header {
    position: relative;
}

.assets-modal .modal-body .list-group-item > header > .value {
    line-height: 1.5;
    font-size: 13px;
    right: 15px;
    top: 3px;
    position: absolute;
    color: #919191;
}

.assets-modal .modal-body .list-group-item > .list-group-item-text {
    font-size: 13px;
}

@media (min-width: 768px) {
    .assets-modal .modal-body .list-group-item > .kept-with,
    .assets-modal .modal-body .list-group-item > .status {
        display: inline-block;
    }

    .assets-modal .modal-body .list-group-item .status:before {
        content: '\25cf';
        color: #919191;
        font-size: 10px;
        width: 25px;
        display: inline-block;
        text-align: center;
        vertical-align: middle;
        margin-bottom: 3px
    }
}

.status-modal .modal-body {
    padding: 0;
}

.status-modal .list-group {
    margin-bottom: 0;
}

.status-modal .list-group-item:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.status-modal .list-group-item:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.status-modal .modal-body > .list-group,
.alarms-modal .modal-body {
    max-height: 300px;
    overflow-y: scroll;
}

.status-modal .list-inline {
    margin-bottom: 0;
}


@media(min-height: 700px) {
    .status-modal .modal-body > .list-group,
    .alarms-modal .modal-body {
        max-height: 500px;
    }
}

@media(min-height: 900px) {
    .status-modal .modal-body > .list-group,
    .alarms-modal .modal-body {
        max-height: 600px;
    }
}

@media(min-width: 768px) {
    .status-modal > .modal-dialog {
        width: auto;
        margin: 10px;
    }

    .assets-modal .asset-last-comment .comment-body {
        padding-left: 15px;
    }
}

@media(min-width: 900px) {
    .status-modal > .modal-dialog {
        width: auto;
        max-width: 900px;
        margin: 30px auto;
    }
}

/*
 * Asset summaries
 */

.asset-summary-icon {
    margin-left: 10px;
    border-color: #BCBCBC;
}

.asset-summary-icon:hover {
    cursor: pointer;
    background-color: #F2F2F2;
}

.asset-summary {
    margin-bottom: 0;
}

/*
 * Collapsible yard list dashboard styles
 */

.place-group.list-group {
    margin-bottom: 0;
}

.list-item-header .header-content .alarms-status {
    margin-left: 10px;
}

/* Stretch nested groups to fit neatly inside their parents list groups */
.list-group-collapse .list-group-item > .place-group {
    margin: 11px -15px -11px;
}

.list-group-collapse .list-group-item > .place-group .list-group-item:first-child {
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.list-group-collapse .list-group-item > .place-group .list-group-item:last-child {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.list-group-collapse .list-inline {
    margin-bottom: 0;
    min-height: 14px;
}

.list-group-collapse .list-inline li {
    margin-bottom: 3px;
    margin-top: 3px;
}

.list-item-header a {
    text-decoration: none;
}

.list-item-content {
    padding-left: 35px;
    text-align: center;
}

.list-group-collapse .toggle-icon {
    margin-right: 5px;
    display: inline-block;
    min-width: 12px;
}

.list-item-header .equipment-here {
    padding: 0;
    font-size: 12px;
    margin-left: 20px;
    display: block;
    text-decoration: none;
}

.list-group-collapse .toggle-icon .fa {
    cursor: pointer;
}

.asset-counter {
    padding: 3px;
    font-size: 9pt;
    border-bottom: 1px solid lightgrey;
    border-left: 1px solid lightgrey;
    border-bottom-left-radius: 3px;
    position: absolute;
    top: 0;
    right: 0;
    min-width: 70px;
    text-align: center;
    background-color: #f4f4f4;
}

/* Level indicator for nested list items one deep */
.list-group-collapse > .list-group-item > .place-group > .list-group-item:before {
    content: "";
    border: 3px solid lightgrey;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    margin-left: -16px;
    margin-top: -10px;
    position: absolute;
    height: 100%;
}

/* Level indicator for nested list items two deep */
.list-group-collapse > .list-group-item > .place-group > .list-group-item > .place-group > .list-group-item:before {
    content: "";
    border: 5px solid darkgrey;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    margin-left: -16px;
    margin-top: -10px;
    position: absolute;
    height: 100%;
}

@media(min-width: 768px) {

    .list-item-content {
        padding-left: 15px;
        margin-bottom: -5px;  /* Offset the margin of the status labels */
        min-height: 53px;
    }

    .list-item-header {
        white-space: nowrap;
        position: relative;
        height: 48px;
    }

    .row .list-item-header .header-content{
        position: absolute;
        top: 50%;
        -webkit-transform: translateY(-50%);
        -moz-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
        -o-transform: translateY(-50%);
        transform: translateY(-50%);
    }

    .list-group-collapse .list-inline li {
        margin-top: 3px;
    }

    .place-group > .list-group-item {
        padding-top: 10px;
    }

    .list-group-collapse .list-group-item > .place-group > .list-group-item:before {
        content: none;
    }

    .list-group-collapse .list-group-item > .place-group .list-group-item > .place-group > .list-group-item:before {
        content: none;
    }

    /* Level indicator for nested list items one deep */
    .list-group-collapse .list-group-item > .place-group .list-item-header {
        padding-left: 39px;
        white-space: nowrap;
    }

    /* Level indicator for nested list items two deep */
    .list-group-collapse .list-group-item > .place-group .list-group-item > .place-group .list-item-header {
        padding-left: 65px;
        white-space: nowrap;
    }

    .row.has-statuses .list-item-content:before {
        content: "";
        background: linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(117,117,117,1) 50%,  rgba(0,0,0,0) 100%);
        height: 100%;
        width: 1.3px;
        display: block;
        position: absolute;
        left: 0;
    }
}
