@import (reference) '~assets/styles/shared';
@import '~modules/market/components/common/market-common.styles.less';

.MarketCard__topcontent {
  border-bottom: 1px solid @color-lightgray;
  padding-bottom: 0.3125rem;
}

.MarketCard__header {
  margin-left: 0.4rem;
}

.MarketCard__headertext {
  display: inline-block !important;

  > span:first-of-type > div {
    margin-bottom: 1.25rem;
  }
}

.MarketCard__headertext h1 {
  margin: 0;
}

.MarketCard__topstats {
  overflow: hidden;
  position: relative;
}

.MarketCard__leftstats {
  bottom: 0;
  display: flex;
  margin-left: 0.5rem;
  position: absolute;

  span {
    align-items: flex-end;
    display: flex;
  }
}

.MarketCard__stat {
  display: flex;
  flex-direction: row;
}

.MarketCard__statlabel {
  .MarketCommon__small-label();
}

.MarketCard__statvalue {
  bottom: -0.165rem;
  font-size: 1.5rem;
  margin-right: 0.208em;
  position: relative;
}

.MarketCard__statunit {
  color: @color-purple;
  font-size: 0.875rem;
  margin-right: 3.375rem;
  text-transform: uppercase;

  @media @breakpoint-1-0 {
    margin-right: 10%;
  }
}

.MarketCard__expiration {
  float: right;
  margin-right: 1%;
  text-align: right;
}

.MarketCard__expirationlabel {
  .MarketCommon__small-label();

  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
  margin-right: 0;
}

.MarketCard__expirationvalue {
  color: @color-darkpurple;
  display: block;
  font-size: 1rem;
}

.MarketCard__expiration--mobile {
  display: none;
}

.MarketCard__tablesection {
  overflow: hidden;
  padding: 1.5rem 2rem;

  &:first-of-type {
    padding-bottom: 0;
  }

  &:last-of-type {
    padding-top: 0;
  }
}

.MarketCard__action-container {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: flex-end;
}

.MarketCard__tablesection-footer {
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
  padding: 1.5rem 2rem;
}

.MarketCard__tablesection-footer-light {
  background-color: @color-lightgray-2;
  justify-content: flex-start;
  padding: 1rem 2rem;
}

.MarketCard__light-text {
  font-size: @font-size-large;
}

.MarketCard__heavy-text {
  font-size: @font-size-large;
  font-weight: 500;
  padding: 0 1rem;
}

.MarketCard__proceeds-text {
  font-size: @font-size-small;
  margin-right: 0.2rem;
}

.MarketCard__proceeds-text-small {
  font-size: @font-size-small;
  margin-right: 1rem;
}

.MarketCard__headingcontainer {
  align-items: center;
  clear: both;
  cursor: pointer;
  display: flex;
  flex-flow: row nowrap;
  outline: none;
  text-align: left;
  width: 100%;
}

.MarketCard__headingcontainer-footer {
  align-items: center;
  clear: both;
  display: flex;
  flex: 1;
  flex-flow: row nowrap;
  justify-content: flex-end;
}

.MarketCard__headingcontainer-footer-light {
  display: flex;
}

.MarketCard__tableheading {
  color: @color-darkpurple;
  flex: 1;
  float: left;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: unset;
  margin: 0 0 0.5rem;
  padding-left: 0.5rem;
  text-transform: uppercase;
}

.MarketCard__tabletoggle {
  float: right;
}

.MarketCard__action {
  margin-right: 2rem;

  &:extend(.button--purple all);
}

.MarketCard__action-footer {
  display: flex;
  margin-right: 2rem;

  &:extend(.button--purple all);
}

.MarketCard__action-footer-light {
  display: flex;
  padding: 0 1em;
  &:extend(.button--offWhite all);
}

.MarketCard__proceeds-container {
  align-items: center;
  display: flex;
}

.MarketCard__proceeds-clock {
  display: inline-block;
  margin-right: 1rem;
}

@media @breakpoint-mobile {
  .MarketCard__topcontent {
    border-bottom: 1px solid @color-lightest-gray;
    padding: 1rem 1rem 0.625rem;
  }

  .MarketCard__header {
    margin: 0;
  }

  .MarketCard__header h1 {
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
  }

  .MarketCard__statusicon {
    height: 1rem;
    position: relative;
    right: -8px;
    top: -8px;
    width: 1rem;
  }

  .MarketCard__leftstats {
    display: flex;
    justify-content: space-between;
    margin: 0;
    position: relative;

    span {
      display: unset;
      vertical-align: bottom;
    }
  }

  .MarketCard__stat {
    display: inline-block;
    height: 2.375rem;
    min-width: 5rem;
    overflow: hidden;
    position: relative;
  }

  .MarketCard__statunit {
    margin: 0;
  }

  .MarketCard__statunit,
  .MarketCard__statvalue {
    bottom: auto;
    font-size: 1.125rem;
    position: static;
  }

  .MarketCard__statlabel {
    bottom: 0;
    font-size: 0.625rem;
    margin: 0;
    position: absolute;
    white-space: nowrap;
  }

  .MarketCard__expiration {
    display: none;
  }

  .MarketCard__expiration--mobile {
    color: @color-darkpurple;
    display: block;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
  }

  .MarketCard__tablesection {
    padding: 1rem 0.25rem;
  }

  .MarketCard__headingcontainer {
    padding: 0 0.5rem;
  }

  .MarketCard__tablesection-footer {
    border-top: 1px solid @color-lightgray;
    display: flex;
    flex-flow: row-reverse nowrap;
    padding: 0.25rem;
  }

  .MarketCard__headingcontainer-footer {
    display: flex;
  }

  .MarketCard__action {
    display: none;
  }

  .MarketCard__action-footer {
    display: flex;
  }

  .MarketCard__tableheading {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.625rem;
    padding: 0;
  }
}

.MarketCard__table-header {
  > li {
    &:first-child {
      padding-left: 0.5rem;
    }
  }
}

.MarketCard__hide {
  visibility: hidden;
}
