code {
  text-wrap: wrap;
  word-break: break-word;
}

table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}

td {
  border: 1px solid var(--theme-secondary);
  padding: 5px;
}

tr:nth-child(even) {
  background-color: var(--theme-backdrop);
}

tbody tr {
  color: var(--theme-text-description);
}

#application-modal {
  overflow: hidden;
  background-color: transparent;
}

#application-modal > div {
  display: none;
}

pre,
.profile-container {
  width: 100%;
  margin: auto;
  padding: 5px;
  border-radius: 3px;
  background-color: var(--theme-secondary);
}

.profile-container {
  display: flex;
}

.profile-layer {
  width: 118px;
  cursor: pointer;
  height: 98px;
  margin: auto;
  position: relative;
  user-select: none;
}

.profile-removal {
  top: 58px;
  width: 97%;
  height: 24px;
  margin: 0 2px;
  position: absolute;
  background-color: #333;
}

.profile-member {
  flex: 1;
  height: 130px;
  resize: vertical;
  display: flex;
  overflow: hidden;
  max-height: 50vh;
  min-height: 130px;
  font-family: "Roboto", sans-serif;
  background-color: var(--theme-backdrop);
}

.profile-side {
  display: flex;
  padding: 4px;
  flex-direction: column;
}

.profile-detail {
  flex: 1;
  overflow: hidden auto;
}

.profile-data {
  color: var(--theme-text-title);
  display: flex;
  position: relative;
  font-size: 12px;
  margin-top: 4px;
  align-items: center;
  font-weight: bold;
  vertical-align: top;
}

.profile-item:not(:nth-of-type(1)):before {
  content: ", ";
}

.profile-vr {
  color: var(--theme-primary);
  width: 20px;
  cursor: pointer;
  height: 20px;
  display: inline-flex !important;
  font-size: 14px;
  transition: var(--element-transition);
  align-items: center;
  margin-right: 4px;
  border-radius: 3px;
  justify-content: center;
  background-color: var(--theme-text-title);
}

.profile-vr:hover {
  filter: brightness(1.2);
}

.profile-vr.fa-circle {
  color: var(--theme-highlight);
}

.profle-vr.fa-play {
  color: var(--theme-primary);
}

.profile-status {
  margin-left: auto;
  margin-right: 5px;
}

.profile-container[data-status="online"] .profile-status {
  color: var(--theme-active);
  font-size: 12px;
  border-radius: 50%;
  background-color: var(--theme-primary);
}

.profile-container[data-status="online"] .profile-status::before {
  content: "\f111"; /* fa-solid fa-circle */
  display: block;
  margin-bottom: -0.5px;
}

.profile-container[data-status="app"] .profile-status {
  color: var(--brand-chatango);
  font-size: 16px;
  border-radius: 3px;
  background-color: var(--theme-primary);
}

.profile-container[data-status="app"] .profile-status::before {
  margin: 0 -1px;
  content: "\f3cf"; /* fa-solid fa-mobile-screen */
  display: block;
}

.profile-container[data-status="idle"] .profile-status {
  color: var(--theme-passive);
  font-size: 14px;
  transform: rotateY(180deg);
  border-radius: 50%;
  background-color: var(--theme-primary);
}

.profile-container[data-status="idle"] .profile-status::before {
  margin: -0.5px 2.5px -0.5px 0.5px;
  content: "\f186"; /* fa-solid fa-moon */
  display: block;
}

.profile-container[data-status="offline"] .profile-status {
  color: var(--theme-highlight);
  display: none;
  font-size: 12px;
  border-radius: 50%;
  background-color: var(--theme-primary);
}

.profile-container[data-status="offline"] .profile-status {
  display: block;
}

.profile-container[data-status="offline"] .profile-status::before {
  content: "\f011"; /* fa-solid fa-power-off */
  display: block;
  margin-bottom: -0.5px;
}

.profile-avatar {
  width: 40px;
  cursor: pointer;
  height: 40px;
  align-items: center;
  user-select: none;
  justify-content: center;
  background-color: #999;
}

.profile-view {
  color: var(--theme-text-title);
  width: 40px;
  border: 0;
  cursor: pointer;
  height: 20px;
  margin: 3px 0;
  display: flex;
  transition: var(--element-transition);
  align-items: center;
  font-weight: bold;
  user-select: none;
  border-radius: 3px;
  justify-content: center;
  background-color: var(--theme-highlight);
}

.profile-view:hover,
.profile-view:focus {
  color: var(--theme-backdrop);
  background-color: var(--theme-passive);
}

.profile-view:active {
  color: var(--theme-text-title);
  background-color: var(--theme-active);
}

.profile-badge {
  width: 40px;
  cursor: pointer;
  height: 40px;
  display: flex;
  z-index: 1;
  position: relative;
  font-size: 30px;
  margin-top: 5px;
  align-items: center;
  border-radius: 3px;
  justify-content: center;
  background-color: var(--theme-primary);
}

.profile-badge::before {
  left: 120%;
  color: var(--theme-text-title);
  width: max-content;
  filter: drop-shadow(0 0 4px black);
  content: attr(data-badge);
  display: none;
  padding: 5px;
  position: absolute;
  font-size: 14px;
  max-width: 131px;
  white-space: break-spaces;
  border-radius: 3px;
  background-color: var(--theme-secondary);
}

.profile-badge::after {
  left: 95%;
  border: 5px solid;
  content: "";
  display: none;
  position: absolute;
  border-color: transparent var(--theme-secondary) transparent transparent;
}

.profile-badge:hover::before,
.profile-badge:hover::after {
  display: inline;
}

.profile-about {
  display: flex;
  position: relative;
  flex-wrap: wrap;
  font-size: 13px;
  word-break: break-word;
  white-space: pre-wrap;
  margin-right: 5px;
}

.profile-about:has(> span:only-child) {
  display: flex;
}

.profile-about a {
  color: var(--brand--chatango);
}

.profile-about p {
  width: 100%;
  margin-top: 0;
}

.profile-about span {
  flex: 1;
}

.modal-image-view {
  color: var(--theme-text-description);
  width: calc(100vw - 4vw);
  display: flex;
  align-items: center;
  user-select: none;
  justify-content: center;
}

.modal-image-cycle {
  cursor: pointer;
  font-size: 24px;
  transition: var(--element-transition);
}

.modal-image-cycle:hover {
  color: var(--theme-text-title);
}

.modal-image-cycle:first-child {
  margin: auto auto auto 5px;
}

.modal-image-cycle:last-child {
  margin: auto 5px auto auto;
}

.modal-image-content {
  display: none;
  position: relative;
  text-align: center;
}

.modal-image-view:has(.modal-image-content:only-child) .modal-image-cycle {
  display: none;
}

.modal-image-wrapper {
  position: relative;
}

.modal-image-source {
  color: var(--theme-text-description);
  display: block;
  text-align: left;
  transition: var(--element-transition);
  font-weight: normal;
  text-decoration: none;
}

.modal-image-source:hover {
  color: var(--theme-text-title);
}

.modal-link-view {
  width: 65vw;
  height: 45vh;
  display: flex;
  overflow: hidden auto;
  border-radius: 3px;
  flex-direction: column;
  background-color: var(--theme-primary);
}

.modal-link-header {
  color: var(--theme-backdrop);
  padding: 10px;
  font-weight: bold;
  background-color: var(--theme-passive);
}

.modal-link-content {
  color: var(--theme-text-title);
  height: 100%;
  display: flex;
  padding: 10px;
  word-break: break-word;
  align-items: center;
  font-weight: bold;
  flex-direction: column;
  justify-content: center;
}

.modal-link-item {
  color: var(--theme-text-description);
  font-weight: normal;
  white-space: pre-wrap;
}

.modal-link-footer {
  display: flex;
  margin-top: 5px;
}

.modal-link-footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.modal-link-button {
  color: var(--theme-text-title);
  width: 100%;
  border: 0;
  cursor: pointer;
  height: 30px;
  font-size: 14px;
  transition: var(--element-transition);
  font-weight: bold;
  background-color: var(--theme-highlight);
}

.modal-link-button:hover {
  color: var(--theme-backdrop);
  background-color: var(--theme-passive);
}

.window-button-divide {
  border: 1px solid var(--theme-secondary);
  margin: 5px;
  border-radius: 1px;
}

[data-tab="messages"] {
  gap: 0;
}

.chat-message {
  width: 100%;
  margin: auto;
  outline: 0;
  padding: 4px 0 8px 8px;
  position: relative;
  word-break: break-word;
  border-bottom: 1px solid var(--theme-secondary);
}

.chat-message:hover .chat-message-option {
  display: flex;
}

.chat-message-mask {
  top: 0;
  left: 0;
  color: var(--theme-text-description);
  right: 0;
  bottom: 0;
  cursor: pointer;
  display: flex;
  z-index: 1;
  position: absolute;
  align-items: center;
  justify-content: center;
  background-color: var(--theme-primary);
}

.chat-message-mask ~ .chat-message-wrapper .chat-message-option {
  display: none;
}

.chat-message.application-chat-send {
  border-top: 1px solid var(--theme-secondary);
  border-bottom: 0;
}

.chat-message:has(.chat-message-content[contenteditable]) .chat-message-option {
  display: flex;
}

.chat-message .sidebar-group-avatar {
  width: 40px;
  border: 0;
  height: 40px;
  border-radius: 0;
}

.chat-message audio {
  display: none;
}

.chat-message-background {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  position: absolute;
}

.chat-message-channel {
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  position: absolute;
}

.chat-message-wrapper {
  display: flex;
  position: relative;
}

.chat-message-avatar {
  width: 40px;
  cursor: pointer;
  height: 40px;
  align-items: center;
  user-select: none;
  justify-content: center;
  background-color: #999;
}

.chat-message-icon {
  display: flex !important;
  font-size: 38px;
  background-color: transparent;
}

.chat-message-icon.fa-hands-holding-dollar {
  font-size: 34px;
}

.chat-message-container {
  flex: 1;
  margin: 0 5px;
}

.chat-message-separator {
  opacity: 0;
  position: absolute;
}

.chat-header-item {
  margin-left: 5px;
}

.chat-message-username {
  color: var(--theme-text-title);
  font-weight: bold;
  letter-spacing: 1px;
}

.chat-message-badge {
  font-size: 110%;
}

.chat-badge-item {
  cursor: pointer;
  position: relative;
  margin-left: 5px;
}

.chat-badge-item:first-child {
  margin: 0;
}

.chat-badge-label {
  left: 10px;
  bottom: 30px;
  filter: drop-shadow(2px 2px 4px black);
  display: none;
  padding: 5px;
  z-index: 2;
  position: absolute;
  font-size: 16px;
  transform: translateX(-50%);
  font-family: "Rubik", verdana, system-ui;
  font-weight: normal;
  white-space: nowrap;
  border-radius: 3px;
  background-color: var(--theme-secondary);
  -webkit-text-fill-color: var(--theme-text-title);
}

.chat-badge-label::after {
  top: 100%;
  left: 50%;
  border: 5px solid;
  content: "";
  position: absolute;
  margin-left: -6.5px;
  border-color: var(--theme-secondary) transparent transparent transparent;
}

.chat-badge-item:hover .chat-badge-label {
  display: block;
}

.chat-message-timestamp {
  color: var(--theme-backdrop);
  filter: invert(0.3) grayscale(1);
  font-size: 80%;
  margin-top: 2px;
  font-family: "Rubik", verdana, system-ui;
}

.chat-message-ip {
  font-size: 80%;
  margin-top: 2px;
  visibility: hidden;
  font-family: "Rubik", verdana, system-ui;
}

.chat-message:hover .chat-message-ip {
  visibility: visible;
}

.chat-message-content {
  color: var(--theme-text-description);
  outline: 0;
  font-size: 100%;
  font-family: sans-serif;
}

.chat-message-content[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  transition: var(--element-transition);
  pointer-events: none;
}

.chat-message-content.chat-send-message {
  padding: 0;
}

.chat-message-content a {
  color: inherit;
}

.chat-message-content p {
  margin: 0;
}

.chat-message-option {
  top: -15px;
  color: var(--theme-passive);
  right: 0;
  filter: drop-shadow(2px 2px 4px black);
  margin: -15px 15px;
  display: none;
  z-index: 1;
  position: absolute;
  font-size: 18px;
  border-radius: 3px;
  background-color: var(--theme-secondary);
}

.application-chat:has(.application-context-visible) .application-chat-send .chat-message-option {
  display: none;
}

.chat-message-item {
  cursor: pointer;
  padding: 5px 7px;
  position: relative;
  transition: var(--element-transition);
}

.chat-message-item:hover,
.chat-message-item:focus {
  color: var(--theme-highlight);
  background-color: var(--theme-backdrop);
}

.chat-message-item:first-child {
  border-radius: 3px 0 0 3px;
}

.chat-message-item:last-child {
  border-radius: 0 3px 3px 0;
}

.chat-message-item::before {
  color: var(--theme-text-title);
  bottom: 130%;
  content: attr(data-action);
  display: none;
  padding: 5px;
  position: absolute;
  transform: translateX(-40%);
  white-space: nowrap;
  border-radius: 3px;
  background-color: var(--theme-secondary);
}

.chat-message-item::after {
  right: 30%;
  border: 5px solid;
  bottom: 95%;
  content: "";
  display: none;
  position: absolute;
  border-color: var(--theme-secondary) transparent transparent transparent;
}

.chat-message-item:hover::before,
.chat-message-item:hover::after {
  display: inline;
}

.detail-container {
  gap: 15px;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.detail-item {
  display: grid;
  padding: 5px;
  grid-gap: 5px;
  transition: var(--element-transition);
  border-radius: 3px;
  background-color: var(--theme-backdrop);
  grid-template-columns: auto 1fr;
}

.detail-item:hover {
  background-color: var(--theme-secondary);
}

.detail-title {
  text-align: end;
}

.detail-row {
  display: contents;
}

.detail-key {
  color: var(--theme-text-description);
  white-space: nowrap;
}

.detail-value {
  word-break: break-all;
}

[data-tab="uploads"] img {
  cursor: pointer;
  max-height: 200px;
}

.display-block {
  display: block;
}