
/* ============================================
   composer.css — Bereich: composer
   ============================================ */
#chat_input_area{
  position: relative;
}

.chat-input-area{
  flex-shrink: 0;
  position: relative;
  padding: 12px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-input-area.dragover{
  outline: 2px dashed var(--primary);
  outline-offset: -4px;
}

.chat-mention-dropdown{
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 100%;
  margin-bottom: 4px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 40;
}

.chat-mention-dropdown[hidden]{
  display: none;
}

.chat-mention-item{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  color: var(--text);
}

.chat-mention-item--active{
  background: var(--border-light);
}

.chat-mention-item__avatar{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--inverse-text);
  font-weight: 600;
  font-size: 14px;
}

.chat-mention-item__name{
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-mention-item__handle{
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.chat-input-row{
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input-row input[type="text"]{
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-round);
  font-size: 15px;
  outline: none;
}

.chat-input-row input[type="text"]:focus{
  border-color: var(--primary);
}

.attach-btn{
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attach-btn:hover{
  background: var(--border-light);
  color: var(--text);
}

.mic-btn{
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mic-btn:hover{
  background: var(--border-light);
  color: var(--text);
}

.mic-btn:disabled{
  opacity: 0.4;
  cursor: not-allowed;
}

.mic-btn.is-listening{
  background: var(--danger);
  color: var(--inverse-text);
  animation: mic-pulse 1.4s ease-in-out infinite;
}

@keyframes mic-pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.dictation-hint{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
}

.dictation-hint[hidden]{
  display: none;
}

.dictation-hint__icon{
  color: var(--danger);
  animation: mic-pulse 1.4s ease-in-out infinite;
  font-size: 13px;
}

.dictation-hint__text{
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dictation-hint__cancel{
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dictation-hint__cancel:hover{
  background: var(--border);
  color: var(--text);
}

.dictation-hint__accept{
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: var(--inverse-text);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dictation-hint__accept:hover{
  background: var(--primary-dark);
}

.voice-recorder{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
}

.voice-recorder[hidden]{
  display: none;
}

.voice-recorder__dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: mic-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

.voice-recorder__timer{
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  min-width: 42px;
}

.voice-recorder__stop{
  width: 28px;
  height: 28px;
  margin-left: auto;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: var(--inverse-text);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-recorder__stop:hover{
  background: var(--primary-dark);
}

.voice-recorder__cancel{
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-recorder__cancel:hover{
  background: var(--border);
  color: var(--text);
}

.voice-recorder__error{
  color: var(--danger);
  font-size: 13px;
}

.voice-recorder__error[hidden]{
  display: none;
}

.chat-attachments{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-attachment{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  max-width: 220px;
}

.chat-attachment__thumb{
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 20px;
}

.chat-attachment__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-attachment__meta{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-attachment__name{
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.chat-attachment__size{
  font-size: 11px;
  color: var(--text-muted);
}

.chat-attachment__remove{
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--text-muted);
  color: var(--inverse-text);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-attachment__remove:hover{
  background: var(--text);
}

.chat-input-error{
  font-size: 13px;
  color: #e74c3c;
}

.chat-upload-progress{
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-upload-progress[hidden]{
  display: none;
}

.chat-upload-progress__track{
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border-light);
  overflow: hidden;
}

.chat-upload-progress__bar{
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--primary);
  transition: width 0.15s ease;
}

.chat-upload-progress__label{
  font-size: 12px;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}

.chat-upload-progress__cancel{
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-upload-progress__cancel:hover{
  background: var(--border);
  color: var(--text);
}

.send-btn{
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--primary);
  color: var(--inverse-text);
  border: none;
  border-radius: var(--radius-round) 0 0 var(--radius-round);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.send-btn:hover{
  background: var(--primary-dark);
}

.send-wrap{
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.send-btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

.send-btn__caret{
  width: 28px;
  height: 40px;
  padding: 0;
  background: var(--primary);
  color: var(--inverse-text);
  border: none;
  border-radius: 0 var(--radius-round) var(--radius-round) 0;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.send-btn__caret:hover{
  background: var(--primary-dark);
}

.send-menu{
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 220px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 40;
}

.send-menu[hidden]{
  display: none;
}

.send-menu__item{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  color: var(--text);
  text-decoration: none;
}

.send-menu__item i{
  width: 18px;
  color: var(--text-muted);
}

.send-menu__item:hover{
  background: var(--border-light);
}

.chat-reply-bar{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
}

.chat-reply-bar[hidden]{
  display: none;
}

.chat-reply-bar__quote{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-reply-bar__name{
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.chat-reply-bar__text{
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-bar__cancel{
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-reply-bar__cancel:hover{
  background: var(--border-light);
  color: var(--text);
}

.chat-blocked-notice{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}