.host-details {
  display: flex;
  flex-wrap: wrap;
  flex-grow: 1;
  align-content: flex-start;
  padding-bottom: 50px;
  min-width: 0;
  background-color: $ui-off-white;
  gap: $pad-large;

  .section {
    flex: 100%;
    display: flex;
    flex-direction: column;
    background-color: $core-white;
    border-radius: 16px;
    border: 1px solid $ui-fleet-blue-15;
    padding: $pad-xxlarge;
    box-shadow: 0px 3px 0px rgba(226, 228, 234, 0.4);

    &__header {
      font-size: $medium;
      font-weight: bold;
      margin: 0 0 $pad-large 0;
    }

    .info {
      display: flex;

      &__item {
        font-size: $x-small;
        display: flex;
        flex-direction: column;
        white-space: nowrap;

        &--title {
          margin-right: $pad-xxlarge;
        }
      }

      &__header {
        color: $core-fleet-black;
        font-weight: $bold;
      }

      &__no-team {
        color: $ui-fleet-black-50;
      }
    }

    .list {
      list-style: none;
      padding: 0;
      margin: 0;

      &__item {
        margin-bottom: 12px;
        display: flex;

        &:last-child {
          margin-bottom: 0;
        }
      }
    }

    .results {
      margin: 0;
      width: 350px;

      &__header {
        margin: 0 0 $pad-medium 0;
        font-size: $small;
        color: $core-fleet-black;
        font-weight: $bold;
      }

      &__data {
        margin: 0;
        font-size: $x-small;
      }
    }
  }

  .title {
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 1px solid $ui-fleet-blue-15;
    margin: 0;

    &__inner {
      padding-bottom: $pad-medium;
    }

    .hostname-container {
      display: flex;
      align-items: flex-end;
      margin-bottom: $pad-large;
    }

    .hostname {
      font-size: $large;
      font-weight: $bold;
    }

    .last-fetched {
      font-size: $xx-small;
      color: $core-fleet-black;
      margin: 0;
      padding-left: $pad-small;
    }

    .refetch {
      display: flex;

      .refetch-btn {
        color: $core-vibrant-blue;
        cursor: default;
        font-size: $x-small;
        display: inline;
        margin: 9px 0 0 0; // aligns with spinner

        &::before {
          display: inline-block;
          position: relative;
          padding: 5px 0 0 0; // centers spin
          content: url(../assets/images/icon-refetch-12x12@2x.png);
          transform: scale(0.5);
          vertical-align: bottom;
          height: 20px;
        }

        &:hover {
          cursor: pointer;
        }
      }

      .refetch-offline {
        opacity: 25%;

        &:hover {
          cursor: default;
        }
      }

      .refetch-spinner {
        color: $core-vibrant-blue;
        cursor: default;
        font-size: $x-small;
        display: inline;
        opacity: 50%;
        filter: saturate(100%);

        &::before {
          display: inline-block;
          position: relative;
          top: 7px; // aligns with text
          padding: 5px 0 0 0; // centers spin
          display: inline-block;
          content: url(../assets/images/icon-refetch-12x12@2x.png);
          transform: scale(0.5);
          animation: spin 2s linear infinite;
        }

        @keyframes spin {
          0% {
            transform: scale(0.5) rotate(0deg);
            transform-origin: center center;
          }
          100% {
            transform: scale(0.5) rotate(360deg);
            transform-origin: center center;
          }
        }
      }
    }
  }

  .about,
  .osquery {
    .info {
      &__item {
        &--about {
          margin-right: 92px;
          flex-direction: row;
        }
      }

      &__block {
        display: flex;
        flex-direction: column;
        margin-right: $pad-xxlarge;
      }
      &__data {
        margin-bottom: $pad-medium;

        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }

  .col-50 {
    flex: 2;
  }

  .col-25 {
    flex: 1;
  }

  .status {
    color: $core-fleet-black;
    text-transform: capitalize;

    &--online {
      &:before {
        background-color: $ui-success;
        border-radius: 100%;
        content: " ";
        display: inline-block;
        height: 8px;
        margin-right: $pad-small;
        width: 8px;
      }
    }

    &--offline {
      &:before {
        background-color: $ui-fleet-black-25;
        border-radius: 100%;
        content: " ";
        display: inline-block;
        height: 8px;
        margin-right: $pad-small;
        width: 8px;
      }
    }
  }

  &__action-button-container {
    display: flex;
    align-items: flex-start;
  }

  &__query-button,
  &__transfer-button {
    margin-right: $pad-small;
  }

  &__modal {
    p {
      font-size: $small;
    }
  }

  &__modal-buttons {
    display: flex;
    flex-direction: row-reverse;

    .button--alert {
      margin-left: 15px;
    }
  }

  &__tooltip-text {
    font-size: $x-small;
    display: flex;
    justify-content: center;
    text-align: center;
  }

  &__wrapper {
    border: solid 1px $ui-fleet-blue-15;
    border-radius: 6px;
    margin-top: $pad-small;
    overflow: scroll;
    box-shadow: inset -8px 0 17px -10px #e8edf4;
  }

  &__table {
    width: 100%;
    border-collapse: collapse;
    color: $core-fleet-black;
    font-size: $x-small;
  }
  tr {
    border-bottom: 1px solid $ui-fleet-blue-15;

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

  thead {
    background-color: $ui-off-white;
    color: $core-fleet-black;
    text-align: left;
    border-bottom: 1px solid $ui-fleet-blue-15;

    th {
      padding: $pad-medium 27px;
      white-space: nowrap;
      border-right: 1px solid $ui-fleet-blue-15;

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

  .section--software {
    th {
      &:first-child {
        border-right: none;
        width: 16px;
        padding-right: 0px;
      }
    }
    tr {
      td {
        &:first-child {
          padding-right: 0px;
        }
      }
    }
  }

  tbody {
    td {
      padding: 12px 27px;
      white-space: nowrap;
    }
  }

  &__back-link {
    display: flex;
    align-items: center;
    height: 16px;
    font-size: $x-small;
    color: $core-vibrant-blue;
    font-weight: $bold;
    text-decoration: none;
  }

  #back-chevron {
    width: 16px;
    margin-right: $pad-small;
  }

  .accordion {
    border-radius: 2px;
  }

  .accordion__item + .accordion__item {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .accordion__button {
    background-color: #fff;
    color: $core-fleet-black;
    cursor: pointer;
    text-align: left;
    font-size: $x-small;
    font-weight: bold;
    border: none;
    padding: 17px 12px;
  }

  .accordion__button:hover {
    background-color: $ui-vibrant-blue-10;
  }

  .accordion__button:after {
    display: block;
    content: url("../assets/images/icon-chevron-purple-9x6@2x.png");
    text-align: center;
    top: 50%;
    float: right;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transform: scale(0.5) translate(-50%, -60%);
  }

  .accordion__button[aria-expanded="true"]::after,
  .accordion__button[aria-selected="true"]::after {
    background-color: $core-vibrant-blue;
    content: url("../assets/images/icon-accordion-collapse-16x16@2x.png");
  }

  [hidden] {
    display: none;
  }

  .accordion__panel {
    padding: 20px;
    animation: fadein 0.35s ease-in;
  }

  /* -------------------------------------------------- */
  /* ---------------- Animation part ------------------ */
  /* -------------------------------------------------- */

  @keyframes fadein {
    0% {
      opacity: 0;
    }

    100% {
      opacity: 1;
    }
  }
}
