@import "../_variables";

.usageContainer {
  padding: 0 2rem;
  .titleContainer {
    h1 {
      color: var(--primary-text);
      font-size: nth($fontSize, 8);
      font-weight: 700;
    }

    p {
      color: var(--secondary-text);
      font-size: nth($fontSize, 3);
      font-weight: 600;
    }
  }

  .usageContent {
    position: relative;
    .calender {
      right: 0;
      top: -85px;
      position: absolute;
      color: var(--primary-text);
      font-size: nth($fontSize, 5);
      font-weight: 700;
      margin: 1.5rem 0;
      border: 1px solid var(--border-color-100);
      border-radius: 4px;
      padding: 0.5rem 1rem;

      .arrowIcon {
        z-index: 4;
        cursor: pointer;
        font-size: 1rem;

        &:hover {
          opacity: 0.7;
        }
      }

      .monthPickerContainer {
        position: relative;
        width: 6rem;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1rem;

        .monthPicker {
          position: absolute;
          left: 50%;
          top: 50%;
          transform: translate(-50%, -50%);
          width: 8rem;
          opacity: 0;
          z-index: 3;
        }
      }

      :global {
        .ant-picker {
          background: none;
          border: 2px solid var(--primary-grey);

          .ant-picker-input {
            // width: 10rem;
            height: 2rem;
            input {
              color: var(--primary-text) !important;
            }
            input::placeholder {
              color: var(--secondary-text) !important;
            }
            .ant-picker-suffix {
              color: var(--primary-text) !important;
            }
          }

          .anticon-close-circle {
            color: var(--primary-text) !important;
            background-color: var(--secondary-bg);
          }
        }
      }
    }

    .chartWrapper {
      border-radius: 4px;
      padding: 1.5rem;
      border: 1px solid var(--border-color-100);

      .label {
        color: var(--primary-text);
        font-size: nth($fontSize, 3);
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 1rem;
      }

      .noData {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding-top: 1rem;
        height: 100%;
        font-weight: 700;
        align-items: center;
        justify-content: center;
        color: var(--secondary-text);
      }

      .usageChart {
        height: 15rem;
        width: 55rem;

        :global {
          .recharts-wrapper {
            .recharts-legend-wrapper {
              margin: -2rem 0;
            }
            .recharts-default-legend {
              display: flex;
              justify-content: space-evenly;
            }
          }

          .recharts-cartesian-grid-horizontal {
            line {
              stroke: var(--border-color-100);
            }
          }
        }
      }
    }
  }

  .statBox {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-color-100);

    .statLabel {
      color: var(--primary-text);
      font-size: nth($fontSize, 3);
      font-weight: 700;
      margin-bottom: 1rem;
    }

    .statValue {
      color: var(--primary-text);
      font-size: nth($fontSize, 3);
      font-weight: 700;

      span {
        margin-left: 0.1rem;
        color: var(--secondary-text-500);
        font-size: nth($fontSize, 1);
        font-weight: 500;
      }
    }
  }

  .statBar {
    width: 100%;
    height: 6px;
    margin: 0.5rem 0;
    border-radius: 1px;
    background-color: #333;

    .statBarFill {
      height: 100%;
      z-index: 99;
      border-radius: 1px;
    }
  }
}

.goldTransactionTable {
  margin-bottom: 2rem;
  padding: 2rem 2rem 0 2rem;
  border-radius: 4px;
  border: 1px solid var(--border-color-100);

  .label {
    color: var(--primary-text);
    font-size: nth($fontSize, 3);
    font-weight: 700;
  }

  :global {
    .ant-table {
      background-color: inherit;
      overflow: auto;
      color: var(--secondary-text);

      .ant-table-container {
        thead tr th {
          font-weight: 500;
          border-radius: 0 !important;
        }

        .ant-table-content {
          .ant-table-thead {
            tr {
              border-radius: 0 !important;
              .ant-table-cell {
                background-color: var(--secondary-bg) !important;
                color: var(--primary-text) !important;
                font-size: nth($fontSize, 3);
                border: none;
                font-weight: 400;

                &::before {
                  display: none;
                }
              }
            }
          }

          .ant-table-tbody {
            .ant-table-cell-row-hover {
              background-color: var(--primary-bg) !important;
            }

            .ant-table-cell {
              background-color: var(--secondary-bg);
              cursor: text;
            }

            .ant-table-placeholder {
              background-color: var(--secondary-bg) !important;
              .ant-table-cell {
                background-color: inherit;
                border: none;
                .ant-empty {
                  color: var(--primary-text) !important;
                }
              }
            }
          }

          .ant-table-tbody > tr > td {
            cursor: pointer;
            font-size: nth($fontSize, 3);
            border: none;
          }

          .ant-table-tbody > tr > td {
            border-radius: 0;
          }
        }
      }
    }

    .ant-table-pagination {
      .ant-pagination-prev,
      .ant-pagination-next {
        // background-color: var(--primary-text);
        background: none;

        span {
          color: var(--bugbase-green);
        }
      }

      .ant-pagination-disabled {
        background: none;

        span {
          color: var(--bugbase-green);
        }
      }

      .ant-pagination-item {
        a {
          color: var(--secondary-text);
        }
      }

      .ant-pagination-item-active {
        background: none;
        border: 1px solid var(--border-color-100);

        a {
          color: var(--primary-text);
        }
      }
    }
  }
}
