
.post-composer-embed-preview {
  position: relative;
}

.post-composer-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
}

.post-composer-video-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
}

.post-composer.bottom-sheet {
  padding-bottom: 0;
  overflow: visible;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
}

@media (min-width: 800px) {
  .post-composer.bottom-sheet {
    max-width: 600px;
    max-height: calc(100dvh - 64px);
    touch-action: auto;
    overflow: hidden;
  }
}

.post-composer-content {
  padding-top: 16px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.post-composer-scroll-area-content {
  padding: 0 16px;
}

.post-composer-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

@media (min-width: 800px) {
  .post-composer-content {
    padding-top: 10px;
    padding-bottom: 0;
  }

  .post-composer-scroll-area-content {
    padding: 0 10px;
  }
}

.post-composer-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: color-mix(in srgb, var(--highlight-color) 15%, transparent);
  border: 2px dashed var(--highlight-color);
}

.post-composer-drop-overlay span {
  color: var(--text-color);
  font-size: 18px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px;
  background-color: var(--background-color);
}

.post-composer::backdrop {
  background-color: var(--overlay-color-medium);
  animation: fade-in 0.2s ease-out;
}

.post-composer-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 16px;
}

@media (min-width: 800px) {
  .post-composer-top-bar {
    padding: 0 10px;
  }
}

.post-composer-drafts-button {
  margin-left: auto;
  margin-right: 8px;
}

.post-composer-body {
  display: flex;
  gap: 13px;
  margin-top: 16px;
  margin-left: 12px;
}

.post-composer .reply-to {
  margin-left: 12px;
}

.post-composer-body-left {
  flex-shrink: 0;
}

.post-composer-body-right {
  flex: 1;
  min-width: 0;
}

.post-composer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  margin-top: 16px;
  padding: 8px 16px calc(var(--safe-area-inset-bottom) + 8px);
  position: sticky;
  bottom: 0;
  background-color: light-dark(var(--white), var(--mid-gray));
}

/* workaround for iOS Safari subpixel rounding */
.post-composer-bottom-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--post-border-color);
  transform: scaleY(0.5);
  transform-origin: top;
}

@media (min-width: 800px) {
  .post-composer-bottom-bar {
    padding: 8px 10px;
    position: relative;
  }
}

.post-composer-bottom-bar-left {
  display: flex;
  align-items: center;
}

.post-composer-post {
  position: relative;
  transition: opacity 0.15s;
}

.post-composer-post.is-inactive {
  opacity: 0.5;
}

/* Threads stack several inputs, so each gets a shorter starting height */
.post-composer-scroll-area-content:has(
    .post-composer-post + .post-composer-post
  )
  .rich-text-input {
  min-height: 60px;
}

.post-composer-remove-post-button {
  z-index: 1;
  position: absolute;
  right: 8px;
  top: 0;
  border-radius: var(--circular-button-border-radius);
  color: var(--text-color);
  border: none;
  background: none;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.post-composer-remove-post-button .close-icon {
  width: 16px;
  height: 16px;
}

.post-composer-bottom-bar-right {
  display: flex;
  align-items: center;
}

.post-composer-add-post-button {
  padding: 6px;
}

@media (hover: hover) {
  .post-composer-add-post-button:not(:disabled):hover {
    background-color: var(--background-color-secondary);
  }
}

.post-composer-add-post-button .icon {
  width: 24px;
  height: 24px;
  color: var(--highlight-color);
}

.post-composer .rich-text-input {
  width: 100%;
  min-height: 120px;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 16px;
  font-family: inherit;
  resize: none;
  outline: none;
}

.post-composer-emoji-wrapper {
  display: flex;
  align-items: center;
}

.post-composer-emoji-button {
  padding: 6px;
  color: var(--highlight-color);
}

@media (hover: hover) {
  .post-composer-emoji-button:not(:disabled):hover {
    background-color: var(--background-color-secondary);
  }
}

.post-composer-emoji-button .emoji-icon {
  width: 24px;
  height: 24px;
}

