.chat-thread-panel {
  position: relative;
  --thread-composer-height: 52px;
  --thread-keyboard-offset: 0px;
  --thread-safe-bottom: 0px;
}

.thread-composer-shell {
  position: absolute;
  right: 0;
  bottom: var(--thread-keyboard-offset);
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-top: 1px solid rgba(45, 59, 82, 0.48);
  background: rgba(24, 33, 47, 0.98);
  overscroll-behavior: none;
  overflow-anchor: none;
  touch-action: none;
}

.thread-composer-shell[hidden] {
  display: none !important;
}

.composer-form {
  position: relative;
  flex: 0 0 auto;
  padding: 2px calc(9px + var(--safe-right)) 5px calc(9px + var(--safe-left));
  background: transparent;
  box-shadow: none;
  overscroll-behavior: none;
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 36px;
}

.composer-control {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: stretch;
}

.rt-control-textarea-field.composer-field-surface {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 0;
  justify-content: center;
  padding: 0 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rt-control-textarea-field.composer-field-surface:hover,
.rt-control-textarea-field.composer-field-surface:focus-within,
.rt-control-textarea-composer,
.rt-control-textarea-composer:hover,
.rt-control-textarea-composer:focus,
.rt-control-textarea-composer:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.rt-control-textarea-composer {
  display: block;
  min-height: 32px;
  padding: 7px 0 5px;
  border-radius: 0;
  resize: none;
  font-size: 13.5px;
  line-height: 1.28;
  overflow-y: hidden;
  overscroll-behavior: contain;
  touch-action: none;
}

@media (max-width: 719px) {
  .preview-shell.is-product .thread-composer-shell {
    position: absolute !important;
    right: 0 !important;
    bottom: var(--thread-keyboard-offset) !important;
    left: 0 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  .preview-shell.is-product .thread-composer-shell,
  .preview-shell.is-product .rt-control-textarea-composer {
    touch-action: none !important;
    overscroll-behavior: none !important;
  }

  .preview-shell.is-product .rt-control-textarea-composer {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: none;
  }
}

.rt-control-textarea-composer::placeholder {
  color: rgba(138, 152, 176, 0.82);
  font-weight: 500;
}

.rt-control-button-send {
  flex: 0 0 38px;
  min-width: 38px;
  min-height: 38px;
  height: 38px;
  padding: 0;
  align-self: flex-end;
  border-radius: 50%;
  border-color: rgba(94, 125, 168, 0.72);
  background: transparent;
  color: #dfe9f9;
  box-shadow: none;
  backdrop-filter: none;
  touch-action: manipulation;
}

.rt-control-button-send:hover,
.rt-control-button-send:focus-visible {
  border-color: rgba(122, 161, 214, 0.88);
  background: rgba(24, 38, 60, 0.18);
}

.rt-control-button-send:disabled {
  border-color: rgba(66, 83, 108, 0.86);
  background: transparent;
  color: rgba(131, 149, 176, 0.62);
  opacity: 1;
}

.rt-control-button-send .send-icon {
  display: block;
  width: 20px;
  height: 20px;
  overflow: visible;
  pointer-events: none;
}

.rt-control-button-send .send-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-feedback {
  min-height: 0;
  margin-top: 4px;
}

.composer-feedback[hidden] {
  display: none !important;
}

.thread-jump-control-wrap {
  position: absolute;
  right: calc(9px + var(--safe-right));
  bottom: calc(var(--thread-composer-height) + var(--thread-keyboard-offset) + 8px);
  z-index: 3;
  pointer-events: auto;
}

.thread-jump-control-wrap .rt-control-button-thread-jump {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  width: 38px; min-width: 38px; min-height: 38px; height: 38px;
  padding: 0; border-radius: 50%; touch-action: manipulation;
}

.thread-jump-control-wrap .thread-jump-icon { width: 20px; height: 20px; flex: 0 0 auto; }

.thread-jump-control-wrap .thread-jump-count {
  position: absolute; top: -2px; right: -2px;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(56, 98, 155, 0.94); color: #f7fbff;
  font-size: 9px; font-weight: 700; line-height: 1;
}

@media (min-width: 720px) {
  .chat-thread-panel {
    --thread-composer-height: 56px;
  }

  .composer-form {
    padding: 3px calc(12px + var(--safe-right)) 6px calc(12px + var(--safe-left));
  }
}

