.overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.overlayOpen {
  transform: translateX(0);
}

[data-theme='dark'] .overlay {
  background: #1b1b1b;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
}

.header {
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

[data-theme='dark'] .header {
  border-bottom-color: #333;
}

.closeBtn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.closeBtn:hover {
  color: #666;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.inputArea {
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

[data-theme='dark'] .inputArea {
  border-top-color: #333;
}

.input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  resize: none;
  font-family: inherit;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.5;
}

.input:focus {
  border-color: #466aff;
}

[data-theme='dark'] .input {
  background: #2a2a2a;
  border-color: #444;
  color: #e0e0e0;
}

[data-theme='dark'] .input:focus {
  border-color: #466aff;
}

.sendBtn {
  background: #466aff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.sendBtn:hover {
  background: #3558e0;
}

.sendBtn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .overlay {
    width: 100%;
  }
}
