/* Floating customer chat widget */
.chatbot-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9999;
    font-family: "Kanit", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.chatbot-widget * {
  box-sizing: border-box;
}

.chatbot-fab {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #F5A9A5 0%, #FDE047 100%);
  color: #fff;
  box-shadow: 0 0.35rem 1.25rem rgba(247, 74, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 0.5rem 1.5rem rgba(247, 74, 40, 0.55);
}

.chatbot-fab:focus-visible {
  outline: 2px solid #FDE047;
  outline-offset: 3px;
}

.chatbot-fab svg {
  width: 1.65rem;
  height: 1.65rem;
}

.chatbot-panel {
  position: absolute;
  right: 0;
  bottom: calc(3.5rem + 0.75rem);
  width: min(22rem, calc(100vw - 2.5rem));
  max-height: min(32rem, calc(100vh - 6rem));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1rem 2.5rem rgba(3, 0, 10, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.chatbot-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-header {
  position:relative; display:flex; align-items:center;
  justify-content:space-between; padding:0.875rem 1rem 0.875rem 1rem;
  background: #03000A;
  color: #fff;
  border-radius: .5rem .5rem 0 0;
}
.chatbot-header .hero-img img{
  display:block; width:6.5rem; height:auto;
}
.chatbot-header .hero-img{
  position:absolute; top:-2rem; right:0rem;
}

.chatbot-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chatbot-header p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #9C9FA0;
}

.chatbot-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.chatbot-messages {
  flex: 1;
  min-height: 12rem;
  max-height: 18rem;
  overflow-y: auto;
  padding: 1rem;
  background: #f7f8f9;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chatbot-msg {
  max-width: 92%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
}

.chatbot-msg--bot {
  align-self: flex-start;
  background: #fff;
  color: #03000A;
  border: 1px solid rgba(3, 0, 10, 0.06);
  border-bottom-left-radius: 0.25rem;
}

.chatbot-msg--user {
  align-self: flex-end;
  background: #FDE047;
  color: #1a0a08;
  border-bottom-right-radius: 0.25rem;
}

.chatbot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.65rem;
  background: #f7f8f9;
}

.chatbot-quick button {
  font-size: 0.7rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(3, 0, 10, 0.12);
  background: #fff;
  color: #03000A;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.chatbot-quick button:hover {
  border-color: #F5A9A5;
  background: #fff8f7;
}

.chatbot-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  background: #fff;
  border-top: 1px solid rgba(3, 0, 10, 0.06);
}

.chatbot-input {
  flex: 1;
  border: 1px solid rgba(3, 0, 10, 0.12);
  border-radius: 0.65rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}

.chatbot-input:focus {
  border-color: #F5A9A5;
}

.chatbot-send {
  flex-shrink: 0;
  padding: 0 1rem;
  border: none;
  border-radius: 0.65rem;
  background: #FDE047;
  color: #03000A;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: filter 0.15s;
  font-family: "Kanit", sans-serif;
}

.chatbot-send:hover {
  filter: brightness(0.95);
}

.chatbot-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .chatbot-widget {
    right: 1rem;
    bottom: 1rem;
  }

  .chatbot-panel {
    width: calc(100vw - 2rem);
  }
}
