@import "variables";

fieldset {
  border: 1px dotted $grey;
  margin-top: 1.4em;
  padding: 0.8em;

  // Remove top border for overview fieldsets.
  &.border-top-none legend > span {
    border-top: none !important;
  }

  &.overview {
    position: relative;
    margin: 0 0 3px;
    padding: 25px 0 0 0;
    border: 0;
    color: #606060;
    text-shadow: 0 1px 1px $white;

    legend {
      font-weight: bold;
      display: block;
      width: 100%;
      // height: 20px;

      > span {
        position: absolute;
        display: block;
        left: 0;
        top: 0;
        color: #444444;
        width: 100%;
        font-size: 12px;
        padding: 5px;
        background: $lightgrey;
        background: linear-gradient($white, $lightgrey);
        text-shadow: 0 1px 1px $white;
        border-bottom: 1px solid $darkgrey;
        border-top: 1px solid $darkgrey;

        &:not(.no-arrow) {
          &:after, &:before {
            top: 100%;
            left: 20px;
            border: solid transparent;
            content: "";
            height: 0;
            width: 0;
            position: absolute;
            pointer-events: none;
            z-index: 100;
          }

          &:after {
            border: 6px solid transparent;
            border-top-color: $lightgrey;
            margin-left: -6px;
          }

          &:before {
            border: 7px solid transparent;
            border-top-color: $darkgrey;
            margin-left: -7px;
          }
        }
      }
    }

    table {
      border: 0;
      background: none;
      box-shadow: none;
    }

    .mainTable {
      .CMDBListElementsOdd,
      .CMDBListElementsEven {
        background-color: $white;
      }

      tr:hover {
        background-color: #f5f5f5;
      }

      tr:first-child:hover {
        background-color: transparent !important;
      }

      td, th {
        padding-left: 7px;
        background: transparent !important;
      }

      td {
        border: 0;
      }

      th {
        border-color: $lightgrey;
        line-height: 15px;

        &.desc {
          background: transparent url('[{$dir_images}]list/desc.gif') no-repeat right center !important;;
        }

        &.asc {
          background: transparent url('[{$dir_images}]list/asc.gif') no-repeat right center !important;
        }

        &:last-child {
          border-right: 0;
        }
      }
    }

    div.list {
      padding-top: 2px;
      position: relative;
    }
  }
}
