/* Chatbot */
.chatbot {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1050;
  font-family: "Open Sans", sans-serif;
}

.chatbot-toggle {
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-toggle:hover,
.chatbot-toggle:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  outline: none;
}

.chatbot-toggle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.chatbot-toggle:hover img,
.chatbot-toggle:focus img {
  transform: scale(1.08) rotate(2deg);
}

.chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 350px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #212529;
  color: #fff;
}

.chatbot-header-identity {
  display: flex;
  align-items: center;
  min-width: 0;
}

.chatbot-header-identity img {
  width: 38px;
  height: 38px;
  margin-right: 10px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  flex-shrink: 0;
}

.chatbot-header strong,
.chatbot-header span {
  display: block;
}

.chatbot-header strong {
  font-size: 0.95rem;
}

.chatbot-header span {
  margin-top: 2px;
  font-size: 0.75rem;
  opacity: 0.75;
}

.chatbot-close {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 4px;
}

.chatbot-messages {
  min-height: 180px;
  max-height: 320px;
  padding: 16px;
  overflow-y: auto;
  background: #fafafa;
}

.chatbot-message-row {
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
}

.chatbot-message-row-bot {
  justify-content: flex-start;
}

.chatbot-message-row-user {
  justify-content: flex-end;
}

.chatbot-avatar {
  width: 32px;
  height: 32px;
  margin-right: 7px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  flex-shrink: 0;
}

.chatbot-message {
  max-width: 85%;
  margin-bottom: 0;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.chatbot-message-bot {
  background: #e9ecef;
  color: #212529;
}

.chatbot-message-user {
  background: #0085a1;
  color: #fff;
}

.chatbot-form {
  display: flex;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #e5e5e5;
  background: #fff;
}

.chatbot-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 18px;
  padding: 8px 12px;
  font-family: "Open Sans", sans-serif;
  font-size: 0.85rem;
}

.chatbot-form input:focus {
  border-color: #0085a1;
  outline: none;
}

.chatbot-form button {
  width: 36px;
  height: 36px;
  margin-left: 8px;
  border: 0;
  border-radius: 50%;
  background: #0085a1;
  color: #fff;
  cursor: pointer;
}

.chatbot-form button:hover,
.chatbot-form button:focus {
  background: #212529;
  outline: none;
}

@media (max-width: 576px) {
  .chatbot {
    right: 16px;
    bottom: 16px;
  }

  .chatbot-panel {
    right: -4px;
    bottom: 70px;
    width: min(350px, calc(100vw - 24px));
  }
}
