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

.root {
  position: relative;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

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

.txInfo {
  margin-bottom: 210px;

  @media (--viewportLarge) {
    flex-basis: 538px;
    flex-grow: 0;
    flex-shrink: 1;
    margin-right: 56px;
    margin-bottom: 0;
  }
}

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

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

/* Firefox doesn't support image aspect ratio inside flexbox */
.aspectWrapper {
  padding-bottom: 66.6667%; /* 3:2 Aspect Ratio */
  background-color: var(--matterColorNegative); /* Loading BG color */
}

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

  @media (--viewportLarge) {
    border-radius: 2px 2px 0 0;
  }
}

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

  /* Rendering context to the same lavel as listing image */
  position: relative;

  /* Layout */
  display: block;
}

.avatarWrapperCustomerDesktop {
  composes: avatarWrapperMobile;

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

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

.avatarWrapperProviderDesktop {
  display: none;

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

.headingOrder {
  margin: 29px 24px 0 24px;

  @media (--viewportMedium) {
    margin: 25px 24px 0 24px;
    max-width: 80%;
  }

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

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

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

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

.mainTitle {
  display: block;
}

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

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

.transitionDate {
  white-space: nowrap;
}

.breakdownMobile {
  margin-top: 47px;

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

.asideDesktop {
  margin: 1px 0 0 0;

  @media (--viewportLarge) {
    margin-top: 123px;
    margin-left: 0;
    margin-right: 0;
  }
}

.detailCard {
  display: none;

  position: sticky;
  top: -200px; /* This is a hack to showcase how the component would look when the image isn't sticky */
  width: 409px;
  background-color: var(--matterColorLight);
  border: 1px solid var(--matterColorNegative);
  border-radius: 2px;

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

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

.detailCardHeadings {
  display: none;

  @media (--viewportLarge) {
    display: block;
    margin-left: 48px;
    margin-right: 48px;
    margin-bottom: 37px;
  }
}

.detailCardTitle {
  margin-bottom: 10px;

  @media (--viewportLarge) {
    margin-top: 14px;
    margin-bottom: 0;
  }
}

.detailCardSubtitle {
  @apply --marketplaceH5FontStyles;
  color: var(--matterColorAnti);

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

  @media (--viewportLarge) {
    margin-top: 1px;
    margin-bottom: 0;
  }
}

.bookingBreakdownTitle {
  /* Font */
  color: var(--matterColorAnti);

  margin: 0 24px 0 24px;

  @media (--viewportLarge) {
    margin: 37px 48px 26px 48px;
  }
}

.breakdown {
  margin: 14px 24px 0 24px;

  @media (--viewportMedium) {
    margin: 18px 24px 0 24px;
  }
  @media (--viewportLarge) {
    margin: 14px 48px 47px 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: 38px 0 0 0;
  }
}

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

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

.feed {
  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;
  }
}

.requestToBookButton {
  @apply --marketplaceButtonStylesPrimary;

  text-decoration: none;
}

.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 0 48px;
    padding: 0;
  }
}

.mobileActionButtons {
  display: block;

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

.desktopActionButtons {
  display: none;

  @media (--viewportLarge) {
    display: block;
    margin-bottom: 48px;
  }
}

.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;
    }
  }
}

.messageError {
  color: var(--failColor);
  margin: 13px 0 22px 0;

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

  @media (--viewportLarge) {
    margin: 12px 0 23px 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: 151px;
  }
}
