#box_main {
  width: 1020px;
  padding-top: 14px;
  padding-left: 20px;
}

.box_title {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#box_trader_selection {
  background-color: #ffffff;
  padding: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

#box_trader_selection span {
  color: var(--color-greyMedium);
}

#box_trader_selection #saved_traders {
  width: 160px;
  background-color: transparent;
  border: 0px;
  cursor: pointer;
  padding-right: 16px;
  color: var(--color-black);
}

#box_trader_selection #input_address {
  width: 380px;
  height: 40px;
  border-radius: 8px;
  border: 1px var(--color-greyLight) solid;
  background-color: transparent;
}

#box_trader_selection #btn_search {
  height: 40px;
  border-radius: 8px;
  border: 0px;
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 0px 16px;
  font-size: 14px;
}

#box_trader_info {
  background-color: #ffffff;
  padding: 32px;
  border-radius: 12px;
}

#box_trader_info #trader_info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 48px;
}

#box_trader_info .error_msg {
  color: var(--color-red);
}

#box_trader_info h4 {
  margin-bottom: 24px;
}

#box_trader_info #trader_description {
  font-size: 14px;
  margin-bottom: 24px;
}

#box_trader_info .info_row {
  display: flex;
  gap: 16px;
  align-items: center;
}

#box_trader_info .info_row .name {
  font-size: 14px;
  color: var(--color-greyMedium);
  white-space: nowrap;
}

#box_trader_info .info_row .value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#box_trader_info #trader_position {
  padding-top: 32px;
  border-top: 1px var(--color-greyLight) solid;
}

#box_trader_info #box_position {
  overflow: auto;
  max-height: 360px;
}

#box_trader_info #trader_position .table_title,
#box_trader_info #trader_position .table_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: nowrap;
}

#box_trader_info #trader_position .table_row h6,
#box_trader_info #trader_position .table_row p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#box_trader_info #trader_position .token {
  width: 100px;
  min-width: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#box_trader_info #trader_position .entryPx {
  width: 120px;
  min-width: 120px;
}

#box_trader_info #trader_position .size {
  width: 120px;
  min-width: 120px;
}

#box_trader_info #trader_position .liquidationPx {
  width: 120px;
  min-width: 120px;
}

#box_trader_info #trader_position .position {
  width: 120px;
  min-width: 120px;
}

#box_trader_info #trader_position .unrealizedPnl {
  width: 160px;
  min-width: 160px;
}

#box_trader_info #trader_position .table_title h6 {
  font-size: 14px;
  color: var(--color-greyMedium);
}

#box_trader_info #trader_position img {
  height: 24px;
}

#box_trader_info #trader_open_order {
  padding-top: 32px;
  border-top: 1px var(--color-greyLight) solid;
}

#box_trader_info #box_open_order {
  overflow: auto;
  max-height: 360px;
}

#box_trader_info #box_open_order .table_title,
#box_trader_info #box_open_order .table_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: nowrap;
}

#box_trader_info #box_open_order .table_row h6,
#box_trader_info #box_open_order .table_row p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#box_trader_info #box_open_order .token {
  width: 120px;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#box_trader_info #box_open_order .side {
  width: 80px;
  min-width: 80px;
}

#box_trader_info #box_open_order .price {
  width: 120px;
  min-width: 120px;
}

#box_trader_info #box_open_order .size {
  width: 200px;
  min-width: 200px;
}

#box_trader_info #box_open_order .table_title h6 {
  font-size: 14px;
  color: var(--color-greyMedium);
}

#box_trader_info #box_open_order img {
  height: 24px;
}

#box_trader_info #trader_history {
  padding-top: 32px;
  border-top: 1px var(--color-greyLight) solid;
}

#box_trader_info #box_history {
  overflow: auto;
  max-height: 360px;
}

#box_trader_info #box_history .table_title,
#box_trader_info #box_history .table_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: nowrap;
}

#box_trader_info #box_history .table_row h6,
#box_trader_info #box_history .table_row p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#box_trader_info #box_history .time {
  width: 140px;
  min-width: 140px;
  font-size: 14px;
}

#box_trader_info #box_history .token {
  width: 120px;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#box_trader_info #box_history .dir {
  width: 140px;
  min-width: 140px;
}

#box_trader_info #box_history .price {
  width: 120px;
  min-width: 120px;
}

#box_trader_info #box_history .size {
  width: 120px;
  min-width: 120px;
}

#box_trader_info #box_history .closedPnl {
  width: 160px;
  min-width: 160px;
}

#box_trader_info #box_history .table_title h6 {
  font-size: 14px;
  color: var(--color-greyMedium);
}

#box_trader_info #box_history img {
  height: 24px;
}

/******** RWD ********/

@media (max-width: 1300px) {
  #box_main {
    width: 588px;
    padding-left: 0px;
  }

  .box_title {
    display: none;
  }

  #box_trader_selection {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 24px;
  }

  #box_trader_selection span {
    display: none;
  }

  #box_trader_info #trader_position .table_title h6 {
    font-size: 12px;
  }

  #box_trader_info #trader_position .table_row h6,
  #box_trader_info #trader_position .table_row p {
    font-size: 14px;
  }

  #box_trader_info #trader_position .token {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #trader_position .entryPx {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #trader_position .size {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #trader_position .liquidationPx {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #trader_position .position {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #trader_position .unrealizedPnl {
    width: 120px;
    min-width: 120px;
  }

  #box_trader_info #box_open_order .table_row h6,
  #box_trader_info #box_open_order .table_row p {
    font-size: 14px;
  }

  #box_trader_info #box_open_order .token {
    width: 100px;
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #box_trader_info #box_open_order .side {
    width: 60px;
    min-width: 60px;
  }

  #box_trader_info #box_open_order .price {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #box_open_order .size {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #box_open_order .table_title h6 {
    font-size: 12px;
  }

  #box_trader_info #box_history .table_row h6,
  #box_trader_info #box_history .table_row p {
    font-size: 14px;
  }

  #box_trader_info #box_history .time {
    width: 120px;
    min-width: 120px;
    font-size: 12px !important;
  }

  #box_trader_info #box_history .token {
    width: 100px;
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #box_trader_info #box_history .dir {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #box_history .price {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #box_history .size {
    width: 100px;
    min-width: 100px;
  }

  #box_trader_info #box_history .closedPnl {
    width: 140px;
    min-width: 140px;
  }

  #box_trader_info #box_history .table_title h6 {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  #box_main {
    width: 350px;
  }

  #box_trader_selection #input_address {
    width: 210px;
  }

  #box_trader_info {
    padding: 16px;
  }

  #box_trader_info h4 {
    font-size: 20px;
    margin-bottom: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #box_trader_info #trader_description {
    font-size: 12px;
    margin-bottom: 16px;
  }

  #box_trader_info .info_row .name {
    font-size: 12px;
  }

  #box_trader_info .info_row .value {
    font-size: 14px;
  }
}

/* -------- Dark mode -------- */

body.dark-mode #box_trader_selection {
  background-color: var(--color-black);
}

body.dark-mode #box_trader_selection span {
  color: var(--color-greyLightMedium);
}

body.dark-mode #box_trader_selection #saved_traders {
  color: var(--color-white);
}

body.dark-mode #box_trader_selection #input_address {
  border: 1px var(--color-greyMedium) solid;
  color: var(--color-white);
}

body.dark-mode #box_trader_selection #btn_search {
  background-color: var(--color-white);
  color: var(--color-black);
}

body.dark-mode #box_trader_info {
  background-color: var(--color-black);
}

body.dark-mode #box_trader_info .info_row .name {
  color: var(--color-greyLightMedium);
}

body.dark-mode #box_trader_info #trader_position .table_title h6 {
  color: var(--color-greyLightMedium);
}

body.dark-mode #box_trader_info #trader_history .table_title h6 {
  color: var(--color-greyLightMedium);
}

body.dark-mode #box_trader_info #trader_open_order .table_title h6 {
  color: var(--color-greyLightMedium);
}

body.dark-mode .table {
  color: var(--color-white);
}
