 #ogawa-chat-window {
  position: fixed;
  bottom: 20px;
  right: 40px;
  width: 380px;
  height: 600px;
  max-height: calc(100vh - 120px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: none;
  flex-direction: column;
  z-index: 999999;
  overflow: hidden;
}
@media only screen and (min-width: 769px) {
  #ogawa-chat-window.active{right: 90px;}
}

@media only screen and (min-width: 769px) and (max-width: 1300px) {
  #ogawa-chat-window.active{right: 80px;}

}
#ogawa-chat-window.open {
  display: flex;
}

.ogawa-chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ogawa-chat-header-title {
  font-size: 16px;
  font-weight: 600;
}

.ogawa-chat-header-subtitle {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

.ogawa-chat-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.ogawa-chat-close:hover {
  opacity: 1;
}

.ogawa-chat-close svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.ogawa-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
}

.ogawa-message {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.ogawa-message.user {
  align-items: flex-end;
}

.ogawa-message.assistant {
  align-items: flex-start;
}

.ogawa-message-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 14px;
}

.ogawa-message.user .ogawa-message-bubble {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.ogawa-message.assistant .ogawa-message-bubble {
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ogawa-message-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  padding: 0 4px;
}

.ogawa-typing-indicator {
  display: none;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  max-width: 80px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ogawa-typing-indicator.active {
  display: flex;
}

.ogawa-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
  margin: 0 2px;
  animation: ogawa-typing 1.4s infinite;
}

.ogawa-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ogawa-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes ogawa-typing {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.ogawa-chat-input-area {
  padding: 16px 20px;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
}

.ogawa-chat-input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.ogawa-chat-input:focus {
  border-color: #667eea;
}

.ogawa-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.ogawa-chat-send:hover:not(:disabled) {
  transform: scale(1.05);
}

.ogawa-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ogawa-chat-send svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.ogawa-message-bubble h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 8px 0 4px 0;
}

.ogawa-message-bubble ul, .ogawa-message-bubble ol {
  margin: 8px 0;
  padding-left: 20px;
}

.ogawa-message-bubble li {
  margin: 4px 0;
}

.ogawa-message-bubble p {
  margin: 8px 0;
}

.ogawa-message-bubble strong {
  font-weight: 600;
}

.ogawa-message-bubble a {
  color: #667eea;
  text-decoration: none;
}

.ogawa-message-bubble a:hover {
  text-decoration: underline;
}

.ogawa-message-bubble code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.ogawa-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.ogawa-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.ogawa-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.ogawa-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

@media (max-width: 480px) {
   
  #ogawa-chat-window{
    max-width: 330px;
    width: calc(100% - 40px);
    bottom: 20px;
    right: 20px;
  }
  .ogawa-chat-input-area {
    padding: 12px 12px;
    gap: 6px;
  }

  .ogawa-chat-input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .ogawa-chat-send {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  .ogawa-chat-close svg {
    width: 20px;
    height: 20px;
  }
}