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

.root {
  position: relative;
}

.container {
  display: flex;
  flex-direction: column;

  @media (--viewportLarge) {
    flex-direction: row;
    max-width: 1156px; /* 1060 + (paddingLeft + paddingRight) */
    margin: 0 auto 57px auto;
    padding: 0 48px;
  }
}

.saleInfo {
  margin-bottom: 210px;

  @media (--viewportLarge) {
    max-width: 538px;
    margin-right: 108px;
    margin-bottom: 0;
  }
}

.nowrap {
  white-space: nowrap;
}

.imageWrapperMobile {
  /* Layout */
  display: block;
  width: 100%;
  position: relative;

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

.aspectWrapper {
  padding-bottom: 66.6667%; /* 3:2 Aspect Ratio */
  background-color: var(--matterColorNegative); /* Loading BG color */
}

.aspectWrapperMobile {
  @media (--viewportLarge) {
    display: none;
  }
}

.aspectWrapperDesktop {
  display: none;

  @media (--viewportLarge) {
    display: block;
  }
}

.rootForImage {
  /* Layout - image will take space defined by aspect ratio wrapper */
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
}

.title {
  margin: 22px 24px 0 24px;

  @media (--viewportMedium) {
    max-width: 80%;
  }

  @media (--viewportLarge) {
    max-width: 100%;
    margin: 42px 0 0 0;
  }
}

.infoText {
  margin: 18px 24px 0 24px;

  @media (--viewportMedium) {
    margin: 23px 24px 0 24px;
  }
  @media (--viewportLarge) {
    margin: 23px 0 0 0;
  }
}

.messagesError {
  color: var(--failColor);
  margin: 13px 0 0 0;
}

.actionError {
  @apply --marketplaceH5FontStyles;
  color: var(--failColor);
  margin: 0 0 11px 0;

  @media (--viewportMedium) {
    margin: 0 0 10px 0;
  }
  @media (--viewportLarge) {
    margin: 0;
  }
}

.actionErrors {
  width: 100%;
  text-align: center;

  @media (--viewportLarge) {
    position: absolute;
    top: 25px;
  }
}

.avatarMobile {
  /* Position (over the listing image)*/
  margin-top: -31px;
  margin-left: 24px;

  /* Bring on top of image */
  position: relative;

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

.avatarDesktop {
  display: none;

  @media (--viewportLarge) {
    display: flex;
    margin-top: 119px;
  }
}

.breakdown {
  margin: 14px 0 0 0;

  @media (--viewportMedium) {
    margin: 18px 0 0 0;
  }
  @media (--viewportLarge) {
    margin: 14px 0 0 0;
  }
}

.breakdownContainerMobile {
  margin: 47px 24px 0 24px;

  @media (--viewportMedium) {
    margin-top: 44px;
  }
  @media (--viewportLarge) {
    display: none;
  }
}

.desktopAside {
  display: none;

  @media (--viewportLarge) {
    display: block;
    margin: 116px 0 0 0;
  }
}

.breakdownContainerDesktop {
  position: sticky;
  top: 24px;
  background-color: var(--matterColorLight);
  border: 1px solid var(--matterColorNegative);
  border-radius: 2px;
  width: 409px;
}

.breakdownImageWrapper {
  /* Layout */
  display: block;
  width: 100%;
  position: relative;
}

.breakdownTitleMobile {
  /* Font */
  color: var(--matterColorAnti);
  margin: 0;

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

.breakdownTitleDesktop {
  margin: 48px 48px 50px 48px;
  color: var(--matterColorAnti);
}

.breakdownDesktop {
  margin: 48px 48px 0 48px;
}

.feedContainer {
  margin: 46px 24px 0 24px;

  @media (--viewportMedium) {
    margin: 46px 24px 0 24px;
  }
  @media (--viewportLarge) {
    margin: 43px 0 0 0;
  }
}

.feedContainerWithInfoAbove {
  @media (--viewportLarge) {
    margin: 36px 0 0 0;
  }
}

.feedHeading {
  color: var(--matterColorAnti);
  margin: 0;

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

.feed {
  margin-top: 17px;

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

.sendMessageForm {
  position: relative;
  margin-top: 46px;
  width: 100%;

  @media (--viewportMedium) {
    margin-top: 49px;
  }
  @media (--viewportLarge) {
    margin-top: 47px;
  }
}

.sendMessageFormFixed {
  position: fixed;
  bottom: 0;
  box-shadow: var(--boxShadowBottomForm);

  @media (--viewportLarge) {
    position: relative;
    box-shadow: none;
  }
}

.sendMessageFormFocusedInMobileSafari {
  position: absolute;

  @media (--viewportLarge) {
    position: relative;
  }
}

.actionButtons {
  /* Position action button row above the footer */
  z-index: 9;
  position: fixed;
  bottom: 0;
  width: 100%;
  padding: 18px 24px 18px 24px;

  /* Contain repainting to this component only */
  /* 3D painting container helps scrolling */
  transform: translate3d(0, 0, 0);

  box-shadow: var(--boxShadowTop);
  background-color: white;

  @media (--viewportLarge) {
    z-index: unset;
    position: static;
    box-shadow: none;
    width: auto;
    margin: 0 48px 48px 48px;
    padding: 50px 0 0 0;
  }
}

.mobileActionButtons {
  display: block;

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

.desktopActionButtons {
  display: none;

  @media (--viewportLarge) {
    display: block;
  }
}

.actionButtonsWithFormFocused {
  display: none;

  @media (--viewportLarge) {
    display: block;
  }
}

.actionButtonWrapper {
  width: 100%;
  display: flex;
  flex-direction: row;

  @media (--viewportLarge) {
    flex-direction: column;
  }

  & button:first-child {
    margin: 0 12px 0 0;

    @media (--viewportLarge) {
      margin: 8px 0 0 0;

      /* Switch order in desktop layout with accept button being on the top */
      order: 1;
    }
  }
}
