:root {
  --umm-bg: #241316;
  --umm-panel: #fff7f8;
  --umm-panel-strong: #ffffff;
  --umm-text: #241316;
  --umm-muted: #6b5960;
  --umm-line: rgba(225, 29, 72, 0.16);
  --umm-primary: #e11d48;
  --umm-primary-strong: #9f1239;
  --umm-accent: #2563eb;
  --umm-radius: 8px;
}

#unlimarket-messages-root,
#unlimarket-messages-root * {
  box-sizing: border-box;
}

#unlimarket-messages-root {
  position: relative;
  z-index: 99999;
  font-family: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--umm-text);
}

.umm-login {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--umm-primary);
  color: #fff1f2;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(31, 37, 34, 0.22);
}

.umm-launcher {
  position: fixed;
  right: 18px;
  top: 82px;
  z-index: 99999;
  min-width: 58px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--umm-primary);
  color: #fff1f2;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(31, 37, 34, 0.22);
}

.umm-launcher.is-active {
  background: var(--umm-accent);
}

.umm-launcher strong {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #be123c;
  color: #fff;
  font-size: 12px;
}

.umm-drawer {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 99998;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 92px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--umm-line);
  border-radius: var(--umm-radius);
  background: var(--umm-panel);
  box-shadow: 0 24px 60px rgba(31, 37, 34, 0.22);
}

.umm-drawer.is-compact {
  width: min(320px, calc(100vw - 32px));
}

.umm-drawer-head,
.umm-window-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.umm-drawer-head {
  justify-content: space-between;
}

.umm-drawer h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.umm-drawer-head div {
  display: flex;
  gap: 6px;
}

.umm-drawer button,
.umm-compose button {
  border: 0;
  border-radius: var(--umm-radius);
  background: transparent;
  color: var(--umm-primary);
  font-weight: 500;
  cursor: pointer;
}

.umm-drawer-head button {
  min-height: 32px;
  padding: 0 8px;
  background: rgba(225, 29, 72, 0.1);
}

.umm-search {
  display: grid;
  gap: 6px;
}

.umm-search span {
  color: var(--umm-muted);
  font-size: 12px;
  font-weight: 500;
}

.umm-search input,
.umm-compose input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--umm-line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff7f8;
  color: var(--umm-text);
  font: inherit;
  outline: none;
}

.umm-search input:focus,
.umm-compose input:focus {
  border-color: rgba(225, 29, 72, 0.55);
  background: #fff;
}

.umm-filters {
  display: flex;
  gap: 8px;
}

.umm-filters button {
  min-height: 34px;
  padding: 0 12px;
  background: rgba(225, 29, 72, 0.08);
}

.umm-filters button.is-active {
  background: var(--umm-primary);
  color: #fff1f2;
}

.umm-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 4px;
  padding-right: 2px;
}

.umm-row {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 54px;
  padding: 7px;
  text-align: left;
}

.umm-row:hover,
.umm-row.has-unread {
  background: rgba(225, 29, 72, 0.08);
}

.umm-row span:not(.umm-avatar) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.umm-row strong,
.umm-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.umm-row strong {
  font-size: 12.5px;
  font-weight: 400;
}

.umm-row small {
  font-size: 11px;
}

.umm-row small,
.umm-row em,
.umm-empty,
.umm-window-head small,
.umm-bubble small {
  color: var(--umm-muted);
}

.umm-row em {
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
}

.umm-row b {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 18px;
  min-height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--umm-accent);
  color: #fff1f2;
  font-size: 11px;
}

.umm-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--umm-avatar, var(--umm-primary));
  color: #fff1f2;
  font-size: 12px;
  font-weight: 500;
}

.umm-avatar.is-small {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.umm-avatar i {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--umm-panel);
  border-radius: 50%;
  background: #16a34a;
}

.umm-windows {
  position: fixed;
  right: 424px;
  bottom: 12px;
  z-index: 99999;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}

.umm-window {
  width: min(330px, calc(100vw - 24px));
  height: min(462px, calc(100vh - 120px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--umm-line);
  border-radius: var(--umm-radius);
  overflow: hidden;
  background: var(--umm-panel-strong);
  box-shadow: 0 24px 60px rgba(31, 37, 34, 0.24);
  pointer-events: auto;
}

.umm-window.is-minimized {
  height: auto;
  grid-template-rows: auto;
}

.umm-window.is-minimized .umm-window-head {
  border-bottom: 0;
}

.umm-window.is-minimized .umm-thread,
.umm-window.is-minimized .umm-compose {
  display: none;
}

.umm-window-head {
  min-height: 56px;
  padding: 10px;
  border-bottom: 1px solid var(--umm-line);
}

.umm-window-head span:not(.umm-avatar) {
  flex: 1;
  display: grid;
  min-width: 0;
}

.umm-window-head button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(225, 29, 72, 0.16);
  border-radius: 999px;
  background: #fff1f2;
  color: #9f1239;
  padding: 0;
  box-shadow: 0 6px 16px rgba(76, 5, 25, 0.08);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.umm-window-head button:hover {
  border-color: rgba(225, 29, 72, 0.28);
  background: #ffe4e6;
  color: #e11d48;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(76, 5, 25, 0.12);
}

.umm-window-head button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}

.umm-window-head button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(76, 5, 25, 0.1);
}

.umm-window-action svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.umm-thread {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 12px;
  background: #fff1f2;
}

.umm-bubble {
  max-width: 82%;
  justify-self: start;
  display: grid;
  gap: 4px;
}

.umm-bubble span {
  padding: 9px 11px;
  border-radius: 18px 18px 18px 4px;
  background: #ffe4e6;
  line-height: 1.35;
}

.umm-bubble.is-me {
  justify-self: end;
  text-align: right;
}

.umm-bubble.is-me span {
  border-radius: 18px 18px 4px 18px;
  background: var(--umm-primary);
  color: #fff1f2;
}

.umm-compose {
  display: grid;
  grid-template-columns: 36px 1fr 54px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-top: 1px solid var(--umm-line);
}

.umm-compose button {
  min-height: 36px;
  background: rgba(225, 29, 72, 0.1);
}

.umm-compose button[type="submit"] {
  background: var(--umm-primary);
  color: #fff1f2;
}

.umm-empty {
  margin: 12px;
  line-height: 1.45;
}

@media (max-width: 1020px) {
  .umm-windows {
    right: 16px;
    bottom: 72px;
  }

  .umm-window:not(:last-child) {
    display: none;
  }
}

@media (max-width: 620px) {
  .umm-launcher {
    top: auto;
    right: 12px;
    bottom: 18px;
    min-width: 52px;
    max-width: calc(100vw - 24px);
  }

  .umm-drawer {
    inset: 74px 10px 10px;
    width: auto;
    max-height: none;
  }

  .umm-windows {
    inset: auto 10px 10px;
  }

  .umm-window {
    width: calc(100vw - 20px);
    height: min(460px, calc(100vh - 96px));
  }
}
