/* Floating property chatbot styles */
.property-chatbot {
  position: fixed;
  right: 22px;
  bottom: 10px;
  z-index: 1100;
  font-family: "Manrope", Arial, sans-serif;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.property-chatbot.is-over-hero:not(.open),
.property-chatbot.is-over-blocked-content:not(.open) {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
}

.chatbot-toggle {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: #f4b400;
  color: #14213d;
  box-shadow: 0 16px 36px rgba(20, 33, 61, 0.28);
  cursor: pointer;
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-toggle:hover,
.chatbot-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(20, 33, 61, 0.34);
}

.property-chatbot.open .chatbot-toggle {
  display: none;
}

.chatbot-panel[hidden] {
  display: none;
}

.chatbot-panel {
  width: min(380px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 40px));
  background: #ffffff;
  border: 1px solid rgba(20, 33, 61, 0.12);
  border-radius: 8px;
  box-shadow: 0 22px 58px rgba(20, 33, 61, 0.24);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.chatbot-header {
  background: #14213d;
  color: #ffffff;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chatbot-header strong,
.chatbot-header span {
  display: block;
}

.chatbot-header strong {
  font-size: 1rem;
}

.chatbot-header span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  margin-top: 2px;
}

.chatbot-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chatbot-messages {
  background: #f6f7fb;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chatbot-message {
  max-width: 92%;
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.45;
  font-size: 0.9rem;
}

.chatbot-message p {
  margin: 0;
}

.chatbot-message.bot {
  align-self: flex-start;
  color: #243044;
  background: #ffffff;
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.chatbot-message.user {
  align-self: flex-end;
  background: #14213d;
  color: #ffffff;
}

.chatbot-property-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.chatbot-property {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 8px;
}

.chatbot-property img {
  width: 76px;
  height: 82px;
  border-radius: 6px;
  object-fit: cover;
}

.chatbot-property strong,
.chatbot-property span,
.chatbot-property b,
.chatbot-property small,
.chatbot-property a {
  display: block;
}

.chatbot-property strong {
  color: #14213d;
  font-size: 0.86rem;
  line-height: 1.25;
}

.chatbot-property span,
.chatbot-property small {
  color: #5f6b7a;
  font-size: 0.74rem;
  margin-top: 3px;
}

.chatbot-property b {
  color: #b07900;
  font-size: 0.82rem;
  margin-top: 4px;
}

.chatbot-property a {
  color: #14213d;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 6px;
  text-decoration: none;
}

.chatbot-localities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chatbot-localities a {
  color: #14213d;
  background: #fff7df;
  border: 1px solid rgba(244, 180, 0, 0.34);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.chatbot-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chatbot-contact-actions a {
  color: #ffffff;
  background: #14213d;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.chatbot-contact-actions a i {
  margin-right: 5px;
}

.chatbot-quick-actions {
  background: #ffffff;
  border-top: 1px solid rgba(20, 33, 61, 0.08);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.chatbot-quick-actions button {
  border: 1px solid rgba(20, 33, 61, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: #14213d;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 10px;
}

.chatbot-form {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(20, 33, 61, 0.08);
  background: #ffffff;
}

.chatbot-form input {
  min-width: 0;
  border: 1px solid rgba(20, 33, 61, 0.16);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  outline: none;
}

.chatbot-form input:focus {
  border-color: #f4b400;
  box-shadow: 0 0 0 3px rgba(244, 180, 0, 0.18);
}

.chatbot-form button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #f4b400;
  color: #14213d;
  cursor: pointer;
}

.chatbot-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.chatbot-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa4b2;
  animation: chatbotTyping 0.9s ease-in-out infinite;
}

.chatbot-typing i:nth-child(2) {
  animation-delay: 0.12s;
}

.chatbot-typing i:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes chatbotTyping {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .property-chatbot {
    right: 14px;
    bottom: 18px;
  }

  .chatbot-panel {
    width: calc(100vw - 28px);
    height: min(580px, calc(100vh - 28px));
  }
}
