@import "../../variables.scss";

.hidden {
  position: absolute;
  visibility: hidden;
  display: none;
  pointer-events: none;
}

.mobile-status {
  margin: 0 10px;
  cursor: pointer;
}

.torrent-table-container {
    display: flex;
    flex-direction: column;
    overflow: scroll;
}

.p-virtualscroller-item {
  background: $bg-color-light; 
}

.dark-theme {
  .torrent-card-view {
    border-color: $dark-default;
  }

  .p-virtualscroller-item {
    background: $bg-surface-0;
  }
}

mat-card.torrent-card-view {
  display: flex;
  flex-direction: column;

  border: solid 1px $my-app-default;
  cursor: pointer;
  height: 95%;

  margin: 0;
  padding: 15px 0;

  mat-card-content.torrent-card-view-content {
    display: flex;
    flex-direction: column;

    height: 100%;
    padding: 0 16px;
  }

  p {
    margin-bottom: 5px;
  }
}


mat-spinner {
    align-self: center;
    margin: 5% auto 10px auto;
}

/** Progress bar components */
.custom_progress_bar {
    width: 100%;

    .p-progressbar.p-progressbar-determinate {
      .p-progressbar-label {
        .white_label {
          color: white
        }
        font-weight: 600;
      }
      // #9DAFB8
      .dark-theme .p-progressbar-value{
        background: #9DAFB8;
      }
      .p-progressbar-value {
        background: #03A9F4;
      }
    }
}

.custom_progress_bar.white_label {
  .p-progressbar.p-progressbar-determinate {
    .p-progressbar-label {
      color: white
    }
  }
}

.dark-theme .custom_progress_bar {
  .p-progressbar.p-progressbar-determinate {
    .p-progressbar-value {
      background: #7abf7d;
    }
  }
}

#loading_p {
    width: 50px;
    align-self: center;
    margin: 10px auto 10px auto;
}

/** Sizes of each column */
.table-col   {
  &.table-col-select     { width: 40px; }
}

i.pi {
  font-size: 15px;
}

.p-datatable .p-datatable-thead > tr > th {
  background: white;
  color: rgba(0,0,0,.54);
  border-color: #E0E0E0;

  font-size: 12px;
}

.p-datatable .p-datatable-tbody > tr.torrent-table-row {
  cursor: pointer;

  background: white;
  color: $table-black-color;

  font-size: 13.5px;

  transition: background-color 0.15s ease;

  &:hover {
    background: $row-hover-light;
  }

  &.selected {
    background: $row-hover-light;
  }
}

.p-datatable .p-datatable-tbody > tr > td {
  border-color: #E0E0E0;
}

// Hacky fix :(
.p-datatable-scrollable-header-box {
  background: white;
}

.dark-theme {
  .p-datatable .p-datatable-thead > tr > th {
    background: $table-surface-2;
    color: hsla(0,0%,100%,.7);
    border-color: $table-surface-1;

    &:hover {
      background: $row-hover-dark;
      color: white;
    }
  }

  .p-datatable .p-datatable-tbody > tr.torrent-table-row {
    background: $table-surface-2;
    color: white;

    &:hover {
      background: $row-hover-dark;
    }

    &.selected {
      background: $row-hover-dark;
    }
  }

  .p-datatable .p-datatable-tbody > tr > td {
    border-color: $table-surface-1;
  }

  // Hacky fix
  .p-datatable-scrollable-header-box {
    background: $table-surface-2;
  }
}