/*
  Devices and device-related styles
*/

/* The "add new device" combobox on the devices list page */
#addNewDeviceTitle {
  span {
    /* This is currently the only plain text on the tool bar. Everything else are buttons or form elements,
       so this gets special treatment. */
    font-size: 110%;
    padding-right: 5px;
  }

  select {
    padding: 5px;
  }

  option {
    padding: 5px;
  }
}

.devicePurchaseDate select {
  /* Three combo boxes on the same row, don't make them full-width */
  width: auto;
}

/* Device reset information */
.deviceReset {
  border: 5px solid #f00;
  background: #b00;
  color: #fff;
  width: 50%;
  margin-left: 10px;

  header {
    font-size: 140%;
    font-weight: bold;
    color: #ff0;
    text-align: center;
    background: #f00;
    padding: 0 5px 5px 5px;
  }

  ul {
    list-style-type: none;
    margin: 10px;
    padding: 0;
  }

  code {
    font-size: 120%;
  }
}

/* Hardware infos on device "show" pages */
.hardwareInfo {
  .timestamp {
    font-size: 110%;
    padding: 0.5em 0.25em 1em 0.25em;
    margin: 0;
  }

  .infoTable {
    border: 1px solid $hwInfoBorder;
    border-collapse: collapse;

    th {
      border: 1px solid $hwInfoBorder;
      padding: 7px;
      text-align: right;
      width: 150px;
    }

    tr {
      /* forcibly disable alternating row colors */
      background: transparent !important;
    }

    .main {
      text-align: center;
      vertical-align: middle;
      background: $hwInfoTitleBack;
    }

    td {
      border: 1px solid $hwInfoBorder;
      padding: 7px;
    }

    .sectionEnd {
      border-bottom: 1px solid $hwInfoBorder;
    }

    ol {
      padding-left: 1.5em;
      margin: 0;
    }

    pre {
      margin: 0;
    }
  }
}

.smart {
  width: auto !important;

  th {
    text-align: left !important;
    padding: 2px 10px !important;
    width: auto !important;
  }

  td {
    padding: 2px 5px !important;
  }
}

/* Desktop image statistics on Device Statistics pages */
.imageStats {
  width: 100%;
  border: none;

  th {
    background: $listHeadingBack;
  }

  .border {
    border-left: 1px solid #000;
  }

  .header {
    color: $deviceStatsImageHeaderFore;
    background: $deviceStatsImageHeaderBack;
    border: none;
    cursor: pointer;

    &:hover {
      background: $listRowHoverBack;
    }

    .releaseName {
      color: $deviceStatsReleaseName;
      margin-left: 0.5em;
      font-weight: bold;
    }

    .barCol {
    }

    .barOuter {
      background: $deviceStatsPercentageBack;
      border: 1px solid $deviceStatsPercentageBorder;
      display: block;
      width: 100%;
      height: 100%;
    }

    .barInner {
      background: $deviceStatsPercentageFore;
      display: block;
      height: 100%;
    }
  }

  .deviceListRow {
    ul {
      border-left: 5px solid $deviceStatsDeviceListBorder;
      margin: 0 0 0 20px;
      padding: 0;
    }

    li {
      margin-left: 2em;
      padding: 0;
    }
  }
}

span.release-other { }
span.release-stretch { color: $deviceStatsReleaseStretch; }
span.release-buster { color: $deviceStatsReleaseBuster; }
span.release-bullseye { color: $deviceStatsReleaseBullseye; }
span.release-bookworm { color: $deviceStatsReleaseBookworm; }

.releaseName {
  color: $deviceStatsReleaseName;
  font-weight: bold;
}

h1 span.fqdn {
  font-size: 50%;
  font-weight: normal;
}
