/* Compose Area Styles */
.compose-area {
  display: none;
  padding: 12px 12px 12px 4px;
  gap: 2px;
  transition: padding-left 0.3s ease;
  align-items: stretch;
  min-height: 68px;
  max-height: 200px;
}

.compose-area[style*="display: flex"],
.compose-area[style*="display:flex"] {
  display: flex !important;
}

.compose-area.sidebar-hidden {
  padding-left: calc(320px + 80px);
}

.compose-input-wrapper {
  flex: 1;
  position: relative;
}

#compose-mode-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  flex-shrink: 0;
  align-self: stretch;
}

#compose-mode-toggle svg {
  width: 28px;
  height: 28px;
  margin: 0 !important;
  padding: 0 !important;
}

#compose-mode-toggle img {
  width: 28px;
  height: 28px;
  margin: 0 !important;
  padding: 0 !important;
}

#message-input {
  width: 100%;
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  resize: none;
  font-family: inherit;
  max-height: 120px;
  overflow-y: auto;
  box-sizing: border-box;
}

#message-input:focus {
  border-color: #9333ea;
}

#send-btn {
  position: absolute;
  right: 8px;
  bottom: 4px;
  padding: 6px 6px;
  background: #1ea600;
  color: white;
  border: 1px solid #1ea600;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  flex-shrink: 0;
}

#send-btn svg,
#send-btn img {
  margin-left: 2px;
  width: 26px;
  height: 26px;
  display: block;
}

#send-btn:disabled {
  background: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  #message-input {
    font-size: 16px;
    margin-bottom: 14px;
  }
  
  .compose-area {
    margin-bottom: 8px;
    padding: 8px 16px;
  }
  
  #compose-mode-toggle {
    margin-bottom: 14px;
  }
  
  #send-btn {
    margin-bottom: 20px;
    height: 28px;
    min-width: 20px;
    padding: 4px 8px;
  }
  
  #send-btn svg {
    width: 24px;
    height: 24px;
  }
}

@media (min-width: 769px) {
  .compose-area {
    margin-bottom: 0;
    margin-left: 0;
  }
}

body.dark-mode .compose-area {
  background: transparent;
}

body.dark-mode #message-input {
  background: #1c1c1e;
  border-color: #38383a;
  color: #fff;
}

body.dark-mode #compose-mode-toggle {
  color: #fff;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Reply Thread Banner */
.reply-thread-banner {
  background: #374151;
  padding: 6px 12px;
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px 8px 0 0;
  margin: 0 12px;
  margin-bottom: -8px;
  position: relative;
  z-index: 1;
}

.reply-thread-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-thread-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  margin-left: 8px;
  flex-shrink: 0;
}

.reply-thread-close:hover {
  color: #fff;
}

body.dark-mode .reply-thread-banner {
  background: #2d3748;
  color: #a0aec0;
}

body.dark-mode .reply-thread-close {
  color: #a0aec0;
}

body.dark-mode .reply-thread-close:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .reply-thread-banner {
    margin: 0 16px;
    margin-bottom: -8px;
  }
}
