/* Previews stay inside their message, including the compact call chat. */
.image-message {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  margin: 8px 0;
  max-width: 100%;
  cursor: zoom-in;
}
.image-message img {
  display: block;
  max-width: 100%;
  width: auto;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
}
#image-viewer {
  width: min(1000px, 96vw);
}
#image-viewer-content {
  display: block;
  max-width: 100%;
  max-height: 72dvh;
  object-fit: contain;
  margin: 12px auto;
}
#image-viewer-title {
  overflow-wrap: anywhere;
}
.platform-banner {
  display: flex;
  /* Home content must not squeeze the permission prompt or its actions. */
  flex: 0 0 auto;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: #33212c;
  border: 1px solid #7c364b;
  padding: 12px 16px;
  border-radius: 12px;
  margin: 10px;
  font-size: 13px;
}
.platform-banner > span {
  flex: 1;
  min-width: 150px;
}
#support-widget {
  position: fixed;
  z-index: 200;
  left: 80px;
  bottom: 18px;
  width: min(720px, calc(100vw - 98px));
  max-height: 85dvh;
  color: #eeeaf0;
  background: #1d1d25;
  border: 1px solid #593040;
  border-radius: 18px;
  box-shadow: 0 24px 80px #0009;
  overflow: hidden;
}
#support-widget > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #29212a;
}
#support-close {
  font-size: 24px;
  border: 0;
  background: transparent;
}
.support-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  max-height: calc(85dvh - 60px);
}
.support-layout > aside {
  overflow: auto;
  padding: 12px;
  border-right: 1px solid #39313b;
}
.support-layout > section {
  padding: 16px;
  overflow: auto;
  min-width: 0;
}
.support-ticket {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 8px;
  margin: 5px 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  overflow-wrap: anywhere;
}
.support-ticket small {
  display: block;
  color: #b5a5b0;
  margin-top: 4px;
}
.support-ticket.selected {
  border-color: #c73c61;
  background: #382430;
}
.support-pages {
  display: flex;
  gap: 6px;
}
#support-widget input,
#support-widget textarea {
  width: 100%;
  margin: 6px 0 12px;
  padding: 10px;
  font: inherit;
  color: #eeeaf0;
  background: #28232d;
  border: 1px solid #654353;
  border-radius: 10px;
}
#support-widget label {
  display: block;
}
#support-messages {
  height: min(330px, 40dvh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px 0;
}
.support-message {
  padding: 10px 13px;
  border-radius: 12px;
  background: #322331;
  margin: 8px 0 8px 28px;
  overflow-wrap: anywhere;
}
.support-message.staff {
  background: #282c39;
  margin: 8px 28px 8px 0;
}
.support-message small {
  color: #bdaebd;
  font-size: 11px;
}
.support-message p {
  margin: 5px 0 0;
  white-space: pre-wrap;
}
#support-reply-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
#support-error {
  color: #ffadbf;
}
#tour-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
#tour-dialog::backdrop {
  background: #08080d80;
  backdrop-filter: none;
}
#tour-spotlight {
  position: fixed;
  border: 2px solid #ff618a;
  border-radius: 12px;
  box-shadow:
    0 0 0 5px #ff618a22,
    0 0 40px #ff618a55;
  pointer-events: none;
  animation: tour-pulse 1.8s ease-in-out infinite;
}
#tour-spotlight > span {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  color: #ff85a3;
  font-size: 32px;
}
#tour-card {
  position: fixed;
  width: 330px;
  max-width: calc(100vw - 24px);
  padding: 22px;
  background: #24202b;
  border: 1px solid #834257;
  border-radius: 18px;
  box-shadow: 0 20px 70px #0009;
}
#tour-card h2 {
  font-size: 21px;
  margin: 14px 0;
}
#tour-card p {
  color: #d6cbd7;
  line-height: 1.65;
  font-size: 14px;
}
.tour-top,
#tour-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.tour-top {
  color: #ff9ab4;
  font-size: 12px;
}
.tour-top button {
  background: none;
  border: 0;
  font-size: 22px;
}
@keyframes tour-pulse {
  50% {
    box-shadow:
      0 0 0 9px #ff618a11,
      0 0 45px #ff618a77;
  }
}
@media (max-width: 760px) {
  #tour-card {
    bottom: 20px;
    width: calc(100vw - 24px);
  }
  #support-widget {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
  }
  .support-layout {
    grid-template-columns: 1fr;
  }
  .support-layout > aside {
    max-height: 135px;
    border-right: 0;
    border-bottom: 1px solid #39313b;
  }
  #support-tickets {
    display: flex;
    gap: 6px;
  }
  .support-ticket {
    min-width: 145px;
  }
  #support-messages {
    height: 28dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  #tour-spotlight {
    animation: none;
  }
}
.reduce-motion #tour-spotlight {
  animation: none;
}
