.wish-composer {
  container: wish-composer / inline-size;
}
.wish-composer .composer-bottom {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 16px;
}
.composer-tools,
.composer-publish {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.composer-tools {
  flex: 1;
}
.composer-publish {
  flex-shrink: 0;
}
.wish-composer .composer-hint {
  white-space: nowrap;
  min-width: 0;
}
.wish-composer .character-count {
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wish-composer .composer-bottom .button {
  max-width: none;
  flex-shrink: 0;
  white-space: nowrap;
}
.wish-composer .composer-bottom .spinner {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.composer-image-tools {
  position: relative;
  flex-shrink: 0;
}
.image-attachment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(166, 121, 150, 0.12);
  border-radius: 11px;
  background: rgba(246, 237, 244, 0.55);
  color: #a17793;
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.image-attachment-button .icon {
  width: 16px;
  height: 16px;
}
.image-attachment-button:hover,
.image-attachment-button.has-image {
  color: var(--rose-deep);
  border-color: rgba(188, 131, 159, 0.25);
  background: rgba(245, 226, 236, 0.68);
}
.image-attachment-button:focus-visible {
  outline-offset: 3px;
}
.composer-image-tooltip {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: calc(100% + 9px);
  width: 224px;
  padding: 10px 12px;
  border: 1px solid rgba(176, 136, 165, 0.14);
  border-radius: 12px;
  background: rgba(255, 251, 254, 0.98);
  box-shadow: 0 6px 22px rgba(103, 62, 91, 0.09);
  color: #987a90;
  font-size: 10px;
  line-height: 1.8;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.composer-image-tools:has(.image-attachment-button:hover) .composer-image-tooltip,
.composer-image-tools:has(.image-attachment-button:focus-visible) .composer-image-tooltip {
  visibility: visible;
  opacity: 1;
}
:is(.wish-composer, .chat-form) .composer-image-preview {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  height: auto;
  min-height: 82px;
  margin: 10px 0 3px;
  padding: 9px;
  border: 1px solid rgba(190, 148, 176, 0.17);
  border-radius: 14px;
  background: rgba(250, 242, 248, 0.73);
  overflow: hidden;
}
:is(.wish-composer, .chat-form) .composer-image-preview > img {
  width: 62px;
  height: 62px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  flex-shrink: 0;
}
.image-attachment-details {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.image-attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #89697f;
  font-size: 11px;
}
.image-attachment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 9px;
  color: #b093a5;
  font-size: 9px;
  line-height: 1.5;
}
:is(.wish-composer, .chat-form) .image-preview-label {
  position: static;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(232, 210, 224, 0.44);
  color: #a47991;
  font-size: 8px;
}
.image-attachment-size {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
:is(.wish-composer, .chat-form) .remove-image {
  position: static;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  margin-left: auto;
  background: transparent;
  color: #b291a7;
  transition:
    background 0.2s,
    color 0.2s;
}
:is(.wish-composer, .chat-form) .remove-image:hover {
  background: rgba(235, 211, 226, 0.48);
  color: var(--rose-deep);
}
.wish-composer .image-review-status {
  padding: 12px 14px;
  margin: 14px 0 0;
  border-radius: 11px;
  background: rgba(245, 231, 240, 0.65);
  line-height: 1.8;
}
.wish-composer > .form-error {
  margin: 14px 0 0;
}
.wish-composer > .button {
  margin-top: 12px;
  font-size: 11px;
}
@container wish-composer (max-width: 480px) {
  .wish-composer .composer-hint {
    display: none;
  }
}
@container wish-composer (max-width: 330px) {
  .wish-composer .composer-bottom,
  .composer-publish {
    gap: 10px;
  }
  .image-attachment-button {
    width: 36px;
    padding: 8px;
  }
  .image-attachment-button > span {
    display: none;
  }
  .wish-composer .composer-bottom .button {
    min-height: 36px;
    padding: 7px 11px;
    gap: 8px;
  }
  .wish-composer .character-count {
    font-size: 8px;
  }
  :is(.wish-composer, .chat-form) .composer-image-preview {
    gap: 9px;
    padding: 7px;
    min-height: 70px;
  }
  :is(.wish-composer, .chat-form) .composer-image-preview > img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }
  .image-attachment-details {
    gap: 5px;
  }
  .image-attachment-name {
    font-size: 10px;
  }
  .image-attachment-meta {
    gap: 4px 6px;
    font-size: 8px;
  }
  :is(.wish-composer, .chat-form) .image-preview-label {
    display: none;
  }
  :is(.wish-composer, .chat-form) .remove-image {
    width: 28px;
    height: 28px;
  }
}

.chat-compose-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.chat-privacy-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b9a1b2;
  font-size: 9px;
}
.chat-privacy-hint .icon {
  width: 10px;
  height: 10px;
}
.chat-form .composer-image-preview {
  margin: 8px 0 12px;
  min-height: 70px;
}
.chat-form .composer-image-preview > img {
  width: 48px;
  height: 48px;
  object-fit: cover;
}
.message .post-image-button {
  display: block;
  width: calc(var(--image-preview-width) + 8px);
  max-width: 260px;
  padding: 4px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0 13px 13px 13px;
  background: #fffafd;
}
.message.outgoing .post-image-button {
  border-radius: 13px 0 13px 13px;
  background: #eedce8;
}
.message .post-image-button img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 9px;
  object-fit: contain;
}
.message .post-image-button + p {
  margin-top: 5px;
}
@media (max-width: 700px) {
  .chat-privacy-hint {
    display: none;
  }
  .message .post-image-button {
    max-width: min(240px, 65vw);
  }
}
