.mpm-product-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(102, 84, 163, 0.46);
  border-radius: 999px;
  background: #fff;
  color: #6654a3;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: none;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.mpm-product-button:hover,
.mpm-product-button:focus {
  border-color: #6654a3;
  background: #6654a3;
  color: #fff;
  text-decoration: none;
}

.mpm-product-button .material-icons {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 18px;
}

.wk-mp-block .wk_menu_item ul li {
  font-size: 12px !important;
  font-weight: 600;
  line-height: 20px;
}

.wk-mp-block .wk_menu_item ul li a {
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.wk-mp-block .wk_menu_item ul li a .material-icons {
  display: inline-block;
  width: 19.2px;
  min-width: 19.2px;
  height: 19.2px;
  margin-right: 4px;
  font-size: 19.2px;
  line-height: 19.2px;
  vertical-align: middle;
}

.wk-mp-block .wk_menu_item ul li .mpm-seller-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-top: 1px;
  line-height: 20px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.wk-mp-block .wk_menu_item ul li .mpm-seller-menu-badge[hidden],
.mpm-badge[hidden] {
  display: none !important;
}

.mpm-inbox {
  --mpm-thread-height: clamp(520px, calc(100vh - 280px), 760px);

  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  height: var(--mpm-thread-height);
  min-height: 0;
  align-items: stretch;
}

.mpm-inbox,
.mpm-inbox *,
.mpm-inbox *::before,
.mpm-inbox *::after {
  box-sizing: border-box;
}

.mpm-inbox__list,
.mpm-inbox__thread {
  min-width: 0;
  min-height: 0;
}

.mpm-inbox__list {
  max-height: var(--mpm-thread-height);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.mpm-inbox__list h2,
.mpm-thread__head h2 {
  margin: 0 0 14px;
  font-size: 20px;
  color: #6654a3;
}

.mpm-thread-link {
  display: block;
  position: relative;
  padding: 14px 42px 14px 14px;
  margin-bottom: 10px;
  color: #232323;
  text-decoration: none;
  border: 1px solid #e6e2ef;
  border-radius: 6px;
  background: #fff;
}

.mpm-thread-link:hover,
.mpm-thread-link--active {
  color: #232323;
  border-color: #6654a3;
}

.mpm-thread-link strong,
.mpm-thread-link small {
  display: block;
}

.mpm-thread-link small {
  margin-top: 5px;
  color: #777;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mpm-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  line-height: 22px;
  text-align: center;
  color: #fff;
  background: #6654a3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.mpm-thread {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: var(--mpm-thread-height);
  overflow: hidden;
  border: 1px solid #e6e2ef;
  border-radius: 6px;
  background: #fff;
}

.mpm-thread__head {
  flex: 0 0 auto;
  padding: 18px 20px;
  border-bottom: 1px solid #eee;
}

.mpm-thread__head p {
  margin: 0;
  color: #777;
}

.mpm-moderation-banner {
  flex: 0 0 auto;
  padding: 10px 20px;
  color: #6f5800;
  background: #fff8df;
  border-bottom: 1px solid #f0df9d;
  font-size: 13px;
  font-weight: 600;
}

.mpm-is-hidden {
  display: none !important;
}

.mpm-thread__messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.mpm-message {
  max-width: 78%;
  margin-bottom: 14px;
}

.mpm-message--mine {
  margin-left: auto;
}

.mpm-message__body {
  padding: 12px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #232323;
  background: #f6f4fb;
  border-radius: 6px;
}

.mpm-message--mine .mpm-message__body {
  color: #fff;
  background: #6654a3;
}

.mpm-message__sender {
  display: block;
  margin: 0 0 4px;
  color: #6654a3;
  font-size: 12px;
  text-transform: uppercase;
}

.mpm-message--admin .mpm-message__body {
  background: #eef7f9;
  border: 1px solid #c7e4ea;
}

.mpm-message--system {
  max-width: 100%;
  margin: 12px auto;
  text-align: center;
}

.mpm-message--system .mpm-message__body {
  display: inline-block;
  padding: 7px 12px;
  color: #666;
  background: #f2f2f2;
  border-radius: 999px;
  font-size: 12px;
}

.mpm-message--system time {
  text-align: center;
}

.mpm-message time {
  display: block;
  margin-top: 4px;
  color: #888;
  font-size: 12px;
}

.mpm-message--mine time {
  text-align: right;
}

.mpm-thread__form {
  display: block;
  flex: 0 0 auto;
  padding: 16px 20px;
  border-top: 1px solid #eee;
  background: #fff;
}

.mpm-thread__form textarea {
  display: block;
  width: 100%;
  max-height: 120px;
  min-height: 74px;
  resize: vertical;
}

.mpm-thread__blocked {
  margin-bottom: 10px;
  padding: 9px 12px;
  color: #8a4b00;
  background: #fff3dc;
  border: 1px solid #f2d2a4;
  border-radius: 6px;
  font-size: 13px;
}

.mpm-thread__form textarea:disabled {
  cursor: not-allowed;
  background: #f7f7f7;
}

.mpm-thread__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.mpm-enter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #6654a3;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.mpm-enter-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #6654a3;
  cursor: pointer;
}

.mpm-enter-toggle span {
  display: inline-flex;
  align-items: center;
}

.mpm-thread__status + .mpm-enter-toggle {
  margin-left: auto;
}

.mpm-sound-toggle {
  color: #6f667d;
}

.mpm-thread__status,
.mpm-muted,
.mpm-empty-state {
  color: #777;
}

.mpm-empty-state {
  padding: 28px;
  border: 1px dashed #d8d1e8;
  border-radius: 6px;
  background: #fff;
}

@media (max-width: 767px) {
  .mpm-inbox {
    --mpm-thread-height: clamp(460px, calc(100vh - 210px), 640px);
    --mpm-thread-height: clamp(460px, calc(100dvh - 210px), 640px);

    grid-template-columns: 1fr;
    height: auto;
    gap: 16px;
  }

  .mpm-inbox__list {
    max-height: 220px;
  }

  .mpm-thread {
    height: var(--mpm-thread-height);
    max-height: var(--mpm-thread-height);
  }

  .mpm-message {
    max-width: 92%;
  }

  .mpm-thread__actions {
    flex-wrap: wrap;
  }

  .mpm-thread__status {
    flex: 1 0 100%;
  }

  .mpm-enter-toggle {
    margin-left: 0;
  }
}
