.radio-player-statistics {
  &, * {
    box-sizing: border-box;
  }

  .statistics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 32px;
    background: #fff;
    margin: 0 0 30px -20px;
    padding: 15px;
    z-index: 1;
    border-bottom: 1px solid #eaeaea;

    .statistics-header-title {
      font-size: 18px;
      font-weight: 600;
      color: #333;
      display: flex;
      align-items: center;

      img {
        margin-right: 10px;
      }

    }

    &-desc {
      margin-left: 10px;
      font-size: 14px;
      font-weight: 400;
    }

    .statistics-range {
      display: flex;
      align-items: center;
      margin-left: auto;

      .date-field-wrap {
        position: relative;
        display: flex;
        margin-right: 10px;
        border: 1px solid #ddd;
        border-radius: 10px;
        overflow: hidden;

        .date-field-prefix {
          display: inline-flex;
          align-items: center;
          font-size: .875rem;
          font-weight: 400;
          background: #EEE;
          color: #333;
          height: inherit;
          padding: 7px;

          span {
            margin-left: 5px;
          }
        }

        .date-field-suffix {
          display: inline-flex;
          align-items: center;
          vertical-align: middle;
          padding: 7px;
          height: inherit;
        }

      }

      input {
        height: 40px;
        border: none;
        border-radius: 0;
        max-width: 100px;

        &:focus {
          outline: none;
          box-shadow: none;
        }
      }

      & > button {
        height: 40px;
      }
    }

    .clear-statistics {
      margin-left: 10px;
      transform: rotate(90deg);
      cursor: pointer;

      &-tooltip {
        opacity: 1;
        padding: 15px;
        border-radius: 10px;
        margin-top: 30px;
        margin-left: 0;
        box-shadow: 0 0 10px rgba(0, 0, 0, .1);
        width: 200px;

        button {
          width: 100%;
        }

        .btn-info {
          margin-bottom: 10px;
        }

        &:after,
        &:before {
          top: 30px;
        }

      }
    }

    @media (max-width: 767px) {
      flex-direction: column;
      position: static;

      .statistics-header-title {
        margin-bottom: 10px;
      }

      .statistics-range {
        flex-wrap: wrap;
        justify-content: center;

        .date-field-wrap {
          width: 47%;
          margin-bottom: 10px;

          &:nth-child(2) {
            margin-right: 0;
          }
        }

      }
    }

  }

  .statistics-boxes {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    .radio-player-statistics-box {
      width: 49%;
      display: flex;
      flex-direction: column;
      background: #fff;
      padding: 30px;
      border-radius: 10px;
      box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    }

    &.top-users {
      .user-wrap {
        display: flex;
        align-items: center;

        img {
          width: 30px;
          height: 30px;
          border-radius: 50%;
          margin-right: 10px;
          border: 1px solid #ddd;
        }
      }
    }

  }

  &-summary {
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 0 30px;

    .summary-item {
      background: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px;
      width: 48%;
      border-radius: 10px;
      box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
      position: relative;

      .summary-item-label {
        display: flex;
        align-items: center;
        font-size: 1.2rem;
        color: #333;
        font-weight: 500;

        img {
          width: 60px;
          margin-right: 10px;
        }

      }

      .summary-item-value {
        font-size: 1.2rem;
        font-weight: bold;
        color: #555;
        margin-right: 10px;
      }

    }
  }

  &-chart {
    display: flex;
    background: #fff;
    padding: 20px;
    flex-flow: column;
    border-radius: 10px;
    margin-right: 20px;
    margin-bottom: 30px;

    .chart-title {
      font-size: 1rem;
      margin-bottom: 10px;
      margin-top: 0;
      display: flex;
      align-items: center;

      img {
        width: 40px;
        height: 40px;
        margin-right: 10px;
      }
    }

    canvas {
      width: 100%;
      height: 400px;
    }
  }

  &-box {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    flex-flow: column;
    margin-right: 20px;

    .box-title {
      font-size: 1rem;
      font-weight: 500;
      color: #333;
      display: flex;
      align-items: center;

      img {
        width: 40px;
        height: 40px;
        margin-right: 10px;
      }

      span {
        margin-right: auto;
      }

      i {
        cursor: pointer;
        border-radius: 50%;
        background: $radio_player_color;
        color: #fff;
        padding: 5px;
        width: auto;
        height: auto;
        margin-left: 15px;
      }

    }

    .table-wrapper {
      width: 100%;
      overflow-y: auto;
      margin: 15px 0;
      max-height: 400px;

      thead {
        position: sticky;
        top: -1px;
      }

      &::-webkit-scrollbar {
        width: 5px;
        border-radius: 10px;
      }

      &::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
        margin-top: 50px;
        visibility: hidden;
      }

      &::-webkit-scrollbar-thumb {
        background: rgba(#2FB44B, .3);
        border-radius: 10px;
        visibility: hidden;
      }

      &::-webkit-scrollbar-thumb:hover {
        background: rgba(#2FB44B, .5);
      }

      &:hover {
        &::-webkit-scrollbar-track {
          visibility: visible;
        }

        &::-webkit-scrollbar-thumb {
          visibility: visible;
        }
      }

    }

    table {
      width: 100%;
      border-collapse: collapse;
      border-spacing: 0;
      font-size: 14px;
      color: #333;
      font-weight: 600;
      border: none;

      thead {
        background: #f5f5f5;
        padding: 10px;

        th:nth-child(1) {
          width: 62px;
        }

        tr {
          th {
            padding: 15px 0;
            font-weight: 600;
            border: none;
            background: $radio_player_color;
            color: #fff;
            font-size: 1rem;

            &:first-child {
              border-top-left-radius: 10px;
              border-bottom-left-radius: 10px;
              text-align: center;
            }

            &:last-child {
              border-top-right-radius: 10px;
              border-bottom-right-radius: 10px;
            }
          }
        }
      }

      tbody {

        &:before {
          content: '_';
          display: block;
          line-height: 1em;
          color: transparent;
        }

        tr {
          background: transparent !important;

          td {
            padding: 15px 5px;
            font-weight: normal;
            border-bottom: 1px dashed rgba(#2FB44B, .2);
            vertical-align: middle;
            font-size: .875rem;

            a {
              color: $radio_player_color_dark;
              text-decoration: none;
              transition: all .2s ease-in-out;

              &:hover {
                color: $radio_player_color;
              }
            }
          }
        }
      }

      .col-sl {
        text-align: center;
      }

      .col-times {
        width: 150px;
      }

    }

    thead th {
      font-weight: bold;
    }

    &.statistics-logs {
      .table-wrapper {
        max-height: 600px;
      }
    }

  }

  @media (max-width: 767px) {
    flex-direction: column;

    .radio-player-statistics-header {
      top: 0;

      .header-title {
        span {
          display: none;
        }
      }

      .dates-filter {
        .form-group {
          flex-direction: column;

          input {
            width: 100px;
          }
        }
      }
    }

    &-summary {
      flex-direction: column;
      margin-right: 15px;

      .summary-item {
        width: 100%;
        margin-bottom: 15px;
      }
    }

    &-players {
      padding: 15px 10px;

      .players-title {
        margin-bottom: 5px;
      }

      table {
        thead {
          tr {
            th {
              font-size: .8rem;
              white-space: nowrap;

              &:first-child {
                width: 30px;
              }
            }
          }
        }

        tbody {
          tr {
            td {
              font-size: .8rem;
              padding: 10px 5px;
            }
          }
        }

      }
    }

  }

}