@import '../../marketplace.css';

.topbar {
  z-index: 1; /* ensure that Topbar shadow overlays content background */
}

.mobileTopbar {
  /* Size */
  width: 100%;
  height: var(--topbarHeight);

  /* Layout for child components */
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;

  /* fill */
  background-color: var(--matterColorLight);

  /* shadows */
  box-shadow: none;

  @media (--viewportMedium) {
    display: none;
  }
}

.desktopTopbar,
.mobileTopbar {
  box-shadow: none;

  @media (--viewportLarge) {
    box-shadow: var(--boxShadowLight);
  }
}

.navigation {
  /* Layout */
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 29px 24px 0 24px;

  border-top-width: 1px;
  border-top-color: var(--matterColorNegative);
  border-top-style: solid;
  background-color: var(--matterColorLight);
  box-shadow: var(--boxShadow);

  @media (--viewportMedium) {
    padding: 24px 24px 0 24px;
  }

  @media (--viewportLarge) {
    padding: 113px 0 82px 15vw;
    flex-direction: column;
    justify-content: flex-start;
    border: none;
    box-shadow: none;
    background-color: transparent;
  }

  @media (--viewportXLarge) {
    padding-left: 25vw;
  }
}

.title {
  /* Font */
  @apply --marketplaceH1FontStyles;
  color: var(--matterColor);

  /* Layout */
  margin-top: 0;
  margin-bottom: 0;

  @media (--viewportMedium) {
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 0;
  }

  @media (--viewportLarge) {
    padding-bottom: 0;
  }
}

.tabs {
  padding-top: 2px;

  display: flex;
  flex-direction: row;
  overflow-x: auto;

  @media (--viewportMedium) {
    padding-top: 12px;
    padding-top: 20px;
  }

  @media (--viewportLarge) {
    padding-top: 53px;
    flex-direction: column;
  }
}

.tab {
  margin-left: 16px;

  &:first-child {
    margin-left: 0;
  }

  @media (--viewportLarge) {
    margin-left: 0;
  }
}

.error {
  color: var(--failColor);
  margin: 23px 24px 24px 24px;

  @media (--viewportLarge) {
    margin-top: 18px;
  }
}

.noResults {
  margin-left: 24px;
  margin-right: 24px;
  margin-top: 1px;

  @media (--viewportLarge) {
    margin-top: 6px;
  }
}

.itemList {
  margin: 0;
  padding: 0;
}

.listItem {
  /* Layout */
  margin-bottom: 10px;
  padding-bottom: 12px;

  border-bottom-style: solid;
  border-bottom-width: 1px;
  border-bottom-color: var(--matterColorNegative);

  &:last-child {
    border-bottom: none;
  }

  @media (--viewportLarge) {
    margin-bottom: 21px;
    padding-bottom: 18px;
  }
}

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

.itemLink {
  flex: 1;

  /* Layout */
  display: flex;

  /* Remove text underline from this link */
  text-decoration: none;
  &:hover {
    text-decoration: none;
  }

  &:hover .itemUsername {
    /* Hightlight the username when the whole item is hovered */
    color: var(--marketplaceColor);
  }
}

.itemAvatar {
  margin-right: 8px;

  @media (--viewportLarge) {
    margin-top: 2px;
    margin-right: 15px;
  }
}

.rowNotificationDot {
  width: 6px;
  height: 6px;
  margin-top: 10px;
  margin-right: 8px;

  @media (--viewportLarge) {
    margin-right: 13px;
    width: 9px;
    height: 9px;
  }
}

.notificationDot {
  color: var(--matterColorLight);

  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--failColor);
}

.itemInfo {
  @apply --marketplaceH5FontStyles;
  font-weight: var(--fontWeightSemiBold);

  /* Layout */
  flex-grow: 1;
  flex: 1;
  flex-direction: column;

  margin-top: 5px;
  margin-bottom: 0;

  @media (--viewportMedium) {
    margin-top: 3px;
    margin-bottom: 0;
  }

  color: var(--matterColor);
}

.itemUsername {
  /* Font */
  @apply --marketplaceH4FontStyles;
  color: var(--matterColor);
  line-height: 18px;

  margin-top: 0;
  margin-bottom: 0;

  @media (--viewportMedium) {
    margin-top: 0;
    margin-bottom: 0;
  }
}

.bookingInfo {
  font-size: 14px;
  line-height: 14px;
  margin-top: 3px;

  @media (--viewportMedium) {
    margin-top: 8px;
    line-height: 16px;
  }
}

.itemTimestamp {
  /* Font */
  @apply --marketplaceH5FontStyles;

  margin-top: 0px;
  margin-bottom: 0px;
  @media (--viewportMedium) {
    margin-top: 4px;
    margin-bottom: 0;
  }
}

.itemPrice {
  &::before {
    font-size: 10px;
    margin: 0 6px;
    display: inline-block;
    content: '\25CF'; /* middot */
  }
}

.itemState {
  /* Font */
  @apply --marketplaceH5FontStyles;

  font-weight: var(--fontWeightMedium);
  margin-top: 6px;
  margin-bottom: 0px;

  @media (--viewportMedium) {
    margin-top: 0;
    margin-bottom: 0;
  }
}

.lastTransitionedAt {
  text-align: right;
  color: var(--matterColor);
}

.pagination {
  margin: auto 24px 0 24px;
}

/* Transaction status affects to certain font colors and weights */

.nameEnquired,
.namePending {
  font-weight: var(--fontWeightBold);

  /* baseline alignment fixes */
  margin-top: -1px;
  margin-bottom: 1px;
}

.stateName {
  /* This class is empty on purpose, it is used below for banned users */
}

.stateEnquired,
.stateRequested,
.statePending {
  font-weight: var(--fontWeightSemiBold);
  color: var(--attentionColor);
}

.stateAccepted {
  font-weight: var(--fontWeightSemiBold);
  color: var(--successColor);
}

.stateCanceled,
.stateDeclined,
.stateDelivered {
  color: var(--matterColorAnti);
}

.nameEnquiredOrder,
.nameRequested,
.nameDeclined,
.nameCanceled,
.nameAccepted,
.nameDelivered {
  font-weight: var(--fontWeightMedium);
}

.bookingEnquired,
.bookingPending {
  color: var(--matterColor);
  margin-top: 4px;

  @media (--viewportMedium) {
    margin-top: 9px;
  }
}

.bookingRequested,
.bookingCanceled,
.bookingDeclined,
.bookingAccepted,
.bookingDelivered {
  color: var(--matterColorAnti);
}

.lastTransitionedAtEnquired,
.lastTransitionedAtPending,
.lastTransitionedAtRequested {
  color: var(--matterColor);
  font-weight: var(--fontWeightMedium);
}

.lastTransitionedAtCanceled,
.lastTransitionedAtAccepted,
.lastTransitionedAtDeclined,
.lastTransitionedAtDelivered {
  color: var(--matterColorAnti);
}

.bannedUserLink {
  & .itemUsername,
  &:hover .itemUsername,
  & .bookingInfo,
  & .stateName,
  & .lastTransitionedAt {
    color: var(--matterColorAnti);
  }
}
