/* UP Hotel Agency chatbot widget - namespaced with upha- so it won't clash with the site theme. */
#upha-widget-root, #upha-widget-root * { box-sizing: border-box; }
#upha-widget-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.upha-bubble {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #0e566e;
  box-shadow: 0 6px 20px rgba(14,86,110,0.35);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.upha-bubble:hover { transform: scale(1.06); }
.upha-bubble svg { width: 28px; height: 28px; }
.upha-bubble .upha-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #d97b2c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.upha-panel {
  position: absolute;
  bottom: 78px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 130px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.upha-panel.upha-open { display: flex; }
.upha-head {
  background: linear-gradient(135deg, #0e566e 0%, #123f52 100%);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.upha-head .upha-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #FBEFE4;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
  font-weight: 700;
  color: #0e566e;
  font-size: 16px;
}
.upha-head .upha-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.upha-head .upha-sub { font-size: 12px; opacity: 0.8; margin-top: 1px; }
.upha-head .upha-close {
  margin-left: auto;
  background: none; border: none; color: #fff; opacity: 0.75;
  cursor: pointer; font-size: 20px; line-height: 1; padding: 4px;
}
.upha-head .upha-close:hover { opacity: 1; }
.upha-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f7f9f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upha-msg { max-width: 85%; font-size: 13.5px; line-height: 1.5; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; }
.upha-msg.bot { align-self: flex-start; background: #fff; border: 1px solid #e5eaea; border-bottom-left-radius: 4px; color: #263338; }
.upha-msg.user { align-self: flex-end; background: #0e566e; color: #fff; border-bottom-right-radius: 4px; }
.upha-chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; }
.upha-chip {
  background: #fff;
  border: 1px solid #cfe0e6;
  color: #0e566e;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.upha-chip:hover { background: #eaf3f5; }
.upha-chip.upha-cta { background: #d97b2c; border-color: #d97b2c; color: #fff; }
.upha-chip.upha-cta:hover { background: #c46c22; }
.upha-foot {
  border-top: 1px solid #eceff0;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  background: #fff;
  flex-shrink: 0;
}
.upha-foot input {
  flex: 1;
  border: 1px solid #dde4e6;
  border-radius: 22px;
  padding: 10px 14px;
  font-size: 13.5px;
  outline: none;
}
.upha-foot input:focus { border-color: #0e566e; }
.upha-foot button {
  background: #0e566e;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.upha-foot button:hover { background: #0b4459; }
.upha-foot button:disabled { opacity: 0.6; cursor: default; }
.upha-typing { display: flex; gap: 4px; padding: 12px 13px; align-self: flex-start; background: #fff; border: 1px solid #e5eaea; border-radius: 14px; border-bottom-left-radius: 4px; }
.upha-typing span { width: 6px; height: 6px; border-radius: 50%; background: #9db3b9; animation: upha-bounce 1.2s infinite ease-in-out; }
.upha-typing span:nth-child(2) { animation-delay: 0.15s; }
.upha-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes upha-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.upha-form { background: #fff; border: 1px solid #e5eaea; border-radius: 14px; padding: 14px; align-self: stretch; }
.upha-form label { display: block; font-size: 12px; font-weight: 700; color: #45585d; margin: 10px 0 4px; }
.upha-form label:first-child { margin-top: 0; }
.upha-form input, .upha-form select {
  width: 100%;
  border: 1px solid #dde4e6;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.upha-form input:focus, .upha-form select:focus { border-color: #0e566e; }
.upha-form .upha-submit {
  margin-top: 12px;
  width: 100%;
  background: #d97b2c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}
.upha-form .upha-submit:hover { background: #c46c22; }
.upha-form .upha-err { color: #b23b3b; font-size: 11.5px; margin-top: 6px; display: none; }

@media (max-width: 420px) {
  .upha-panel { width: calc(100vw - 24px); right: -12px; }
}

.upha-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5b4bff;
  color: #fff;
  font-weight: 600;
}

.upha-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}