:root {
  --chat-gold: #c3a155;
  --chat-gold-gradient: linear-gradient(
    135deg,
    #c3a155 0%,
    #e3d4a3 50%,
    #a6864f 100%
  );
  --chat-obsidian: #0b0c10;
  --chat-card: #181b24;
  --chat-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --chat-shadow: 0 10px 40px rgba(195, 161, 85, 0.4);
}
#imprshr-chatbot {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  font-family: "Montserrat", sans-serif;
}
.chatbot-bubble {
  width: 60px;
  height: 60px;
  background: rgba(18, 20, 28, 0.88);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: var(--chat-transition);
  border: 1px solid rgba(195, 161, 85, 0.35);
  outline: none;
}
.chatbot-bubble:hover {
  transform: translateY(-3px);
  border-color: rgba(195, 161, 85, 0.6);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.chatbot-bubble svg {
  width: 26px;
  height: 26px;
  stroke: var(--chat-gold);
  transition: var(--chat-transition);
}
.chatbot-bubble:hover svg {
  transform: scale(1.08);
}
body.light-mode .chatbot-bubble {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(179, 136, 39, 0.45);
  box-shadow: 0 8px 24px rgba(20, 23, 31, 0.18);
}
body.light-mode .chatbot-bubble svg {
  stroke: #9c7a12;
}
.chatbot-window {
  position: absolute;
  bottom: 85px;
  right: 0;
  width: 380px;
  height: 550px;
  background: #0d0e12;
  background-image:
    radial-gradient(
      circle at 20% 20%,
      rgba(195, 161, 85, 0.08) 0%,
      transparent 40%
    ),
    linear-gradient(135deg, rgba(13, 14, 18, 0.99) 0%, rgba(11, 12, 16, 1) 100%);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(195, 161, 85, 0.2);
  border-radius: 20px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
  transform: translateY(20px);
  opacity: 0;
  transition: var(--chat-transition);
}
.chatbot-window.active {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.chat-header {
  background: linear-gradient(90deg, rgba(195, 161, 85, 0.1), transparent);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(195, 161, 85, 0.1);
}
.chat-header .logo-text {
  margin: 0;
  line-height: 1;
}
.chat-close {
  cursor: pointer;
  color: #fff;
  transition: all 0.3s;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}
.chat-close:hover {
  color: var(--chat-gold);
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}
.chatbot-brand-icon {
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  color: #fff;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.chatbot-brand-icon span {
  background: var(--chat-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.chat-body {
  scroll-behavior: smooth;
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scrollbar-width: thin;
  scrollbar-color: var(--chat-gold) transparent;
}
.msg-wrapper {
  display: flex;
  flex-direction: column;
  margin-bottom: 5px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInMsg 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  width: 100%;
}
@keyframes fadeInMsg {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.msg-wrapper.bot {
  align-items: flex-start;
}
.msg-wrapper.user {
  align-items: flex-end;
}
.msg-header {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.msg-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}
.avatar-bot {
  background: var(--chat-gold-gradient);
  color: #000;
  box-shadow: 0 0 10px rgba(195, 161, 85, 0.3);
}
.avatar-user {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.5;
}
.msg-bot {
  background: rgba(255, 255, 255, 0.05);
  color: #eee;
  border-top-left-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}
.msg-user {
  background: var(--chat-gold);
  color: #000;
  border-top-right-radius: 2px;
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(195, 161, 85, 0.15);
}
.msg-time {
  font-size: 9px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.3);
  padding: 0 5px;
}
.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  opacity: 0;
  animation: fadeInMsg 0.5s 0.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.opt-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(195, 161, 85, 0.4);
  color: var(--chat-gold);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--chat-transition);
}
.opt-btn:hover {
  background: var(--chat-gold);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(195, 161, 85, 0.2);
}
.typing-indicator {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  width: fit-content;
  display: none;
  gap: 5px;
  margin-bottom: 10px;
  align-self: flex-start;
  transition: opacity 0.3s ease;
}
.typing-indicator.active {
  display: flex;
  animation: fadeInMsg 0.3s ease forwards;
}
.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--chat-gold);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
.chat-footer {
  padding: 15px;
  border-top: 1px solid rgba(195, 161, 85, 0.1);
  display: flex;
  gap: 10px;
}
.chat-footer input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
}
.chat-send {
  background: var(--chat-gold);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
@media (max-width: 480px) {
  #imprshr-chatbot {
    bottom: 20px;
    left: 20px;
    right: auto;
  }
  .chatbot-window {
    width: calc(100vw - 40px);
    height: 75vh;
    bottom: 75px;
    left: 0;
    right: auto;
    border-radius: 15px;
  }
  .chatbot-bubble {
    width: 54px;
    height: 54px;
  }
  .opt-btn {
    padding: 10px 18px;
    font-size: 13px;
    width: 100%;
    text-align: left;
  }
  .chat-msg {
    max-width: 90%;
    font-size: 14px;
  }
}
.chat-weather-report {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(195, 161, 85, 0.1);
  margin-top: 10px;
  font-size: 13px;
  color: #fff;
  line-height: 1.4;
}
.chat-weather-report strong {
  color: var(--chat-gold);
  font-size: 15px;
  display: block;
  margin-bottom: 5px;
}
@media (max-width: 480px) {
  .chat-weather-report {
    padding: 10px;
    font-size: 12px;
  }
}
.chat-lead-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(195, 161, 85, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
  width: 100%;
  animation: fadeInMsg 0.4s ease forwards;
}
.chat-lead-form h4 {
  color: var(--chat-gold);
  margin: 0 0 12px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}
.chat-form-group {
  margin-bottom: 12px;
}
.chat-form-group label {
  display: block;
  color: #a0a0a0;
  font-size: 10px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.chat-input-field,
.chat-select-field {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: "Montserrat", sans-serif;
  transition: var(--chat-transition);
  outline: none;
}
.chat-select-field {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23d4af37%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px top 50%;
  background-size: 8px auto;
}
.chat-select-field option {
  background: #181b24;
  color: #fff;
}
.chat-input-field:focus,
.chat-select-field:focus {
  border-color: var(--chat-gold);
  box-shadow: 0 0 10px rgba(195, 161, 85, 0.2);
}
.chat-submit-btn {
  width: 100%;
  background: var(--chat-gold-gradient);
  color: #000;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--chat-transition);
  margin-top: 5px;
}
.chat-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(195, 161, 85, 0.4);
}
.chat-submit-btn:disabled {
  background: #555;
  color: #888;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Light Mode Overrides for Chatbot */
body.light-mode #imprshr-chatbot .chatbot-window {
  background: #ffffff !important;
  border-color: rgba(179, 136, 39, 0.28) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15) !important;
}
body.light-mode #imprshr-chatbot .chat-header {
  background: #fbf9f4 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}
body.light-mode #imprshr-chatbot .chat-close {
  color: #14171f !important;
  background: rgba(0, 0, 0, 0.05) !important;
}
body.light-mode #imprshr-chatbot .chat-close:hover {
  background: rgba(179, 136, 39, 0.15) !important;
  color: var(--chat-gold) !important;
}
body.light-mode #imprshr-chatbot .chat-body,
body.light-mode #imprshr-chatbot .chat-messages {
  background: #fdfcf9 !important;
}
body.light-mode #imprshr-chatbot .bot-message {
  background: #f4efe4 !important;
  color: #14171f !important;
  border: 1px solid rgba(179, 136, 39, 0.18) !important;
}
body.light-mode #imprshr-chatbot .user-message {
  background: var(--chat-gold-gradient) !important;
  color: #000000 !important;
}
body.light-mode #imprshr-chatbot .chat-input-area {
  background: #ffffff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}
body.light-mode #imprshr-chatbot .chat-input-field,
body.light-mode #imprshr-chatbot .chat-select-field {
  background: #f7f5ef !important;
  color: #14171f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
body.light-mode #imprshr-chatbot .chat-input-field::placeholder {
  color: #717a8a !important;
}
body.light-mode #imprshr-chatbot .chat-select-field option {
  background: #ffffff !important;
  color: #14171f !important;
}
body.light-mode #imprshr-chatbot .chat-quick-actions button,
body.light-mode #imprshr-chatbot .chat-suggestion-chip {
  background: #f4efe4 !important;
  color: #14171f !important;
  border: 1px solid rgba(179, 136, 39, 0.25) !important;
}

