.chat-modal-open {
  overflow: hidden;
}

.chat-modal-host {
  position: relative;
  z-index: 2000;
}

.chat-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 25, 0.45);
}

.chat-modal-backdrop[hidden],
.chat-modal-shell[hidden] {
  display: none !important;
}

.chat-modal-shell {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(720px, calc(100vw - 2rem));
  max-height: min(86vh, 920px);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #eceae5;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.chat-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f0efeb;
}

.chat-modal-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a19;
}

.chat-modal-close {
  border: 1px solid #eceae5;
  border-radius: 5px;
  background: #ffffff;
  color: #6b6a66;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
}

.chat-modal-content {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-modal-timeline {
  flex: 1;
  min-height: 220px;
  overflow-y: auto;
  padding: 14px;
  border-bottom: 1px solid #f0efeb;
}

.chat-modal-composer-region {
  padding: 12px 14px;
  background: #ffffff;
}

.chat-modal-composer-region textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  border: 1px solid #eceae5;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.chat-modal-composer-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-modal-composer-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-modal-composer-actions button[data-chat-modal-send="true"] {
  border: none;
  border-radius: 5px;
  background: #1a1a19;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
}

.chat-modal-upload {
  border: 1px solid #eceae5;
  border-radius: 5px;
  background: #ffffff;
  color: #6b6a66;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .chat-modal-shell {
    top: 1vh;
    left: 1vw;
    width: 98vw;
    max-height: 98vh;
    height: 98vh;
    transform: none;
    border-radius: 8px;
  }
}
