.activity-modal-open {
  overflow: hidden;
}

.activity-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.activity-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.activity-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.58);
}

.activity-modal-panel {
  position: relative;
  width: min(100%, 492px);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  border: 1.5px solid #151515;
  border-radius: 8px;
  background: #111111;
  box-shadow: none;
  overflow: hidden;
  transform: translateY(4px);
  transition: transform .18s ease;
}

.activity-modal.is-open .activity-modal-panel {
  transform: translateY(0);
}

.activity-modal-panel:focus {
  outline: none;
}

.activity-modal-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 0;
  background: #111111;
}

.activity-modal-head > div {
  grid-column: 2;
  min-width: 0;
  justify-self: center;
}

.activity-modal-title {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
}

.activity-modal-close {
  grid-column: 3;
  justify-self: end;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.activity-modal-close svg {
  width: 17px;
  height: 17px;
}

.activity-modal-close:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.activity-modal-close:active {
  transform: translateY(0);
}

.activity-modal-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.34);
  outline-offset: 2px;
}

.activity-modal-list {
  display: grid;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  padding: 6px 0 0;
  overflow: hidden;
  background: #111111;
}

.activity-modal-list.has-scroll {
  max-height: min(204px, calc(100dvh - 112px));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.activity-modal-list.has-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
}

.activity-modal-list.has-scroll::-webkit-scrollbar-track {
  background: transparent;
  border: 0;
}

.activity-modal-list.has-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 0;
  border: 0;
}

.activity-log-item {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid #252525;
  background: #111111;
}

.activity-log-item:hover {
  background: #171717;
}

.activity-log-item:last-child {
  border-bottom: none;
}

.activity-log-icon {
  align-self: stretch;
  width: 42px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-right: 10px;
  border: none;
  border-right: 1px solid #303030;
  border-radius: 0;
  background: transparent;
  color: #f4f4f4;
}

.activity-log-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.9;
}

.activity-log-content {
  min-width: 0;
}

.activity-log-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.activity-log-title {
  min-width: 0;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.activity-log-time {
  flex: 0 0 auto;
  color: #a7a7a7;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
}

.activity-log-message {
  margin: 2px 0 0;
  color: #c6c6c6;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.activity-log-message a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.activity-log-message a:hover,
.activity-log-message a:focus-visible {
  color: #ffffff;
  text-decoration-style: solid;
  outline: none;
}

.activity-modal-state {
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 20px 18px;
  color: #c6c6c6;
  font-size: 14px;
  text-align: center;
}

.activity-modal-state.is-error {
  color: #ff9b9b;
}

@media (max-width: 640px) {
  .activity-modal {
    place-items: center;
    padding: 12px;
  }

  .activity-modal-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }

  .activity-modal-head {
    min-height: 54px;
    padding: 10px 12px;
  }

  .activity-modal-title {
    font-size: 17px;
  }

  .activity-modal-list.has-scroll {
    max-height: min(204px, calc(100dvh - 96px));
  }

  .activity-log-item {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px 14px;
  }

  .activity-log-icon {
    width: 38px;
    min-height: 40px;
    padding-right: 9px;
  }

  .activity-log-title {
    font-size: 12px;
  }

  .activity-log-message {
    font-size: 11.5px;
  }

  .activity-log-time {
    font-size: 9.5px;
  }
}
