/**
 * Layout.
 */
main.page-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "header header"
    "header-menu header-menu"
    "sub-menu sub-menu"
    "transactions transactions"
    "messages messages"
    "price price";
}

.header-menu {
  grid-area: header;
}

.dropdown-menu {
  grid-area: header-menu;
}

.internal-sub-menu {
  grid-area: sub-menu;
}

.transactions-section {
  grid-area: transactions;
}

.messages-section {
  grid-area: messages;
}

.price-section {
  grid-area: price;
}

.sections-split {
  margin-top: 48px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--bmweb-gray);
}

/**
 * Transactions section.
 */
.transactions-section {
  margin-top: 84px;
}

@media only screen and (max-width: 950px) {
  .transactions-section {
    margin-top: 32px;
  }
}

.transactions-section .section-title-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 28px;
}

.transactions-section .section-title-row h2 {
  margin: 0;
}

.transactions-section .section-title-row .view-all-button {
  border-bottom: 2px solid var(--bmweb-lavender);
  text-decoration: none;
  grid-column-start: none;
}

@media only screen and (max-width: 950px) {
  .transactions-section .section-title-row {
    padding: 0 16px;
  }

  .transactions-section .section-title-row .view-all-button {
    display: none;
  }
}

.transactions-table {
  background: var(--bmweb-white);
  border: 1px solid var(--bmweb-light-gray);
}

.transactions-table tbody,
.transactions-table .header-row {
  border: none;
}

.transactions-table .date-column {
  width: 10%;
}
.transactions-table .amount-column {
  width: 40%;
}
.transactions-table .price-column {
  width: 15%;
}
.transactions-table .sum-column {
  width: 15%;
}
.transactions-table .type-column {
  width: 10%;
}
.transactions-table .status-column {
  width: 10%;
}

@media only screen and (max-width: 600px) {
  .transactions-table .header-row {
    display: none;
  }

  .transactions-table .price-column,
  .transactions-table .sum-column,
  .transactions-table .status-column {
    display: none;
  }

  .transactions-table .date-column {
    width: 20%;
  }
  .transactions-table .amount-column {
    width: 60%;
  }
  .transactions-table .type-column {
    width: 20%;
  }
}

@media only screen and (max-width: 950px) {
  .transactions-table .status-column {
    display: none;
  }

  .transactions-table .date-column {
    width: 20%;
  }
  .transactions-table .amount-column {
    width: 25%;
  }
  .transactions-table .price-column {
    width: 15%;
  }
  .transactions-table .sum-column {
    width: 15%;
  }
  .transactions-table .type-column {
    width: 15%;
  }
}

.transactions-table .header-row,
.transactions-table .content-row {
  border-bottom: 1px solid var(--bmweb-light-gray);
}

.transactions-table .content-row:last-child {
  border-bottom: none;
}

.transactions-table th {
  padding: 12px 16px;
  border-top: none;
  text-align: left;
  font-family: var(--bmweb-font-family);
  font-size: var(--bmweb-font-size-base);
  font-weight: 500;
  line-height: 24px;
}

.transactions-table td {
  padding: 12px 16px;
  font-family: var(--bmweb-font-family);
  font-size: var(--bmweb-font-size-base);
  font-weight: 500;
  line-height: 24px;
  text-align: left;
}

.transactions-table td.border-right {
  border-right: 1px solid var(--bmweb-light-gray);
}

.transactions-table td.border-left {
  border-left: 1px solid var(--bmweb-light-gray);
}

.buy-type {
  display: flex;
  align-items: center;
  background: var(--bmweb-buy-light-green);
  padding: 4px 12px;
  border-radius: 4px;
}

.buy-type span {
  font-family: var(--bmweb-font-family);
  font-size: var(--bmweb-font-size-base);
  font-weight: 500;
  line-height: 24px;
  margin-right: 8px;
}

.buy-type .arrow-icon {
  fill: var(--bmweb-buy-dark-green);
}

.sell-type {
  display: flex;
  align-items: center;
  background: var(--bmweb-light-lavender);
  padding: 4px 12px;
  border-radius: 4px;
}

.sell-type span {
  font-family: var(--bmweb-font-family);
  font-size: var(--bmweb-font-size-base);
  font-weight: 500;
  line-height: 24px;
  margin-right: 8px;
}

.sell-type .arrow-icon {
  fill: var(--bmweb-lavender);
}

/**
 * Messages section.
 */
.messages-section {
  margin-top: 46px;
}

.messages-section .section-title-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 28px;
}

.messages-section .section-title-row h2 {
  margin: 0;
}

.messages-section .section-title-row .view-all-button {
  border-bottom: 2px solid var(--bmweb-lavender);
  text-decoration: none;
  grid-column-start: none;
}

@media only screen and (max-width: 950px) {
  .messages-section .section-title-row {
    padding: 0 16px;
  }

  .messages-section .section-title-row .view-all-button {
    display: none;
  }
}

.message-wrapper {
  background-color: var(--bmweb-white);
  border: 1px solid var(--bmweb-light-gray);
  padding: 16px 0px 16px 0px;
  margin-bottom: 16px;
}

.message-wrapper.show .message-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bmweb-light-gray);
}
.message-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 16px 0 24px;
  margin: 0;
  border: none;
}

.message-topic {
  display: inline-block;
  font-size: 1rem;
  font-weight: 400;
  line-height: 28px;
  margin: 0;
  margin-right: 6px;
  padding-right: 12px;
  border-right: 1px solid var(--bmweb-light-gray);
}
.message-topic.active {
  color: var(--bmweb-lavender);
}

.message-date {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  padding-bottom: 5px;
  vertical-align: middle;
}
.message-date.mobile {
  display: none;
}

.message-wrapper.show .message-count {
  display: none;
}
.message-count {
  font-size: var(--bmweb-font-size-base);
  line-height: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--bmweb-dark-1);
}
.message-count::before {
  content:"\2022";
  font-size: 20px;
  padding-right: 8px;
  color: var(--bmweb-gray-2);
}
.message-count.active::before {
  color: var(--bmweb-engage);
}

.toggle-messages {
  cursor: pointer;
  background-color: var(--bmweb-light-1);
  border: none;
  border-radius: 4px;
  padding: 9px 16px 8px;
}
.toggle-messages.show {
  background-color: var(--bmweb-dark-1);
}
.toggle-messages.show svg {
  transform: rotate(-180deg);
}
.toggle-messages.show svg > path {
  fill: var(--bmweb-white);
}

.message-wrapper.show .chat-wrapper {
  display: flex;
  flex-direction: column;
}
.chat-wrapper {
  display: none;
  padding: 20px 16px 0 16px;
}

.chat-wrapper > p {
  margin: 0;
  margin-left: 8px;
  color: var(--bmweb-dark-gray-3);
}

.chat-wrapper .text-wrapper {
  max-width: 49%;
  position: relative;
}
.chat-wrapper .text-wrapper.to {
  align-self: flex-end;
}
.chat-wrapper .text-wrapper.from {
  align-self: flex-start;
}

.read-more-wrapper {
  display: none;
}

.text-wrapper .text-date {
  position: absolute;
  bottom: -24px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}
.text-wrapper.to .text-date {
  right: 0;
}
.text-wrapper.from .text-date {
  left: 0;
}

.text {
  border-radius: 12px;
  margin: 0;
  padding: 12px 16px;
  font-size: var(--bmweb-font-size-base);
  font-weight: 500;
  line-height: 24px;
}
.text.text-to {
  background-color: var(--bmweb-dark-1);
  color: var(--bmweb-white);
}
.text.text-from {
  background-color: var(--bmweb-light-1);
  color: var(--bmweb-dark-1);
}

.chat-form {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--bmweb-light-gray);
  margin-top: 24px;
  padding-top: 8px;
}
.chat-form input {
  background-color: var(--bmweb-white);
  color: var(--bmweb-dark-1);
  font-size: var(--bmweb-font-size-base);
  font-family: inherit;
  font-weight: 500;
  line-height: 24px;
  margin-right: 12px;
}
.chat-form input:focus-visible {
  outline: none;
}
.chat-form button {
  cursor: pointer;
  background-color: var(--bmweb-lavender);
  border: none;
  border-radius: 8px;
  color: var(--bmweb-white);
  font-family: inherit;
  font-size: var(--bmweb-font-size-base);
  font-weight: 600;
  line-height: 24px;
  padding: 10px 34px 10px 36px;
}

@media only screen and (max-width: 950px) {
  .messages-content {
    padding: 0 16px 48px;
  }

  .messages-section {
    margin: 185px 0 16px 0;
    padding-bottom: 40px;
    flex-direction: column;
  }

  @media only screen and (max-width: 950px) {
    .messages-section {
      margin: 16px 0 16px 0;
      padding-bottom: 0;
    }
  }

  .messages-section header h3 {
    font-size: var(--bmweb-font-size-header-3);
    line-height: 28px;
    margin-bottom: 48px;
  }
  .messages-section header p {
    display: none;
  }

  #messages-form {
    padding: 0;
  }

  .messages {
    padding: 0;
  }
  .messages h3 {
    font-size: var(--bmweb-font-size-header-3);
    line-height: 24px;
    margin-bottom: 40px;
  }

  .message-wrapper .message-count,
  .message-wrapper.show .message-count {
    display: inline-block;
    min-width: 150px;
  }
  .message-header {
    padding: 0 16px;
  }

  .message-topic {
    width: 100%;
    border-right: none;
    padding: 0;
    margin-right: 0;
  }

  .message-date {
    display: none;
  }
  .message-date.mobile {
    display: inline-block;
    border-left: 1px solid var(--bmweb-light-gray);
    padding-bottom: 0;
    padding-left: 12px;
  }

  .toggle-messages {
    display: none;
  }

  .chat-wrapper .text-wrapper {
    max-width: 100%;
    margin-bottom: 16px;
  }

  .text-wrapper .text-date {
    display: none;
  }

  .text {
    padding: 12px;
  }

  .chat-form {
    margin-top: 20px;
  }
  .chat-form button {
    padding-left: 24px;
    padding-right: 24px;
  }

  .read-more-wrapper {
    border-top: 1px solid var(--bmweb-gray-2);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 16px 16px 0 16px;
    padding-top: 8px;
    padding-right: 8px;
  }
  .read-more-wrapper.show {
    display: none;
  }
  .read-more-wrapper .read-more {
    display: flex;
    align-items: center;
    cursor: pointer;
  }
  .read-more-wrapper .read-more p {
    margin: 0 8px 0;
    font-size: var(--bmweb-font-size-base);
    font-weight: 600;
    line-height: 24px;
  }
}

/* Responsive Image Section */
.responsive-image-section {
    margin: 1em 0; /* Margin around the section */
}

figure {
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
}

img {
    width: 100%; /* Make image responsive */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below the image */
}

/* Style the caption if provided */
figcaption {
    font-size: 0.9rem; /* Smaller font size for caption */
    color: #555; /* Darker gray color for caption text */
    text-align: center; /* Center-align caption text */
    margin-top: 0.5em; /* Space between image and caption */
}

buy-price-24,
sell-price-24 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 8px;
  padding: 12px 20px;
  align-items: center;
}

buy-price-24 {
  grid-area: buy-price;
  background: var(--bmweb-buy-light-green);
}

sell-price-24 {
  grid-area: sell-price;
  background: var(--bmweb-light-lavender);
}

@media only screen and (max-width: 950px) {
  sell-price-24 {
    margin-top: 6px;
  }
}

buy-price-24 > p,
sell-price-24 > p {
  text-align: right;
}
