/* Hariman AI Assistant - Luxury Styling */
:root {
  --hm-navy: #1A2B49;
  --hm-gold: #C5A880;
  --hm-gold-dark: #A8875A;
  --hm-sand: #F7F5F0;
  --hm-gray-light: #F3F4F6;
  --hm-border: #EBE6DE;
  --hm-text: #2D3748;
}

/* Floating Launcher */
#hm-ast-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A2B49 0%, #2A3F66 100%);
  color: #C5A880;
  border: 2px solid #C5A880;
  box-shadow: 0 8px 24px rgba(26, 43, 73, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99998;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#hm-ast-launcher:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(197, 168, 128, 0.4);
}

#hm-ast-launcher svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* Chat Modal Window */
#hm-ast-modal {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 120px);
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid var(--hm-border);
  box-shadow: 0 16px 40px rgba(26, 43, 73, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  font-family: inherit;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#hm-ast-modal.hm-ast-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header */
.hm-ast-header {
  background: var(--hm-navy);
  color: #FFFFFF;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--hm-gold);
}

.hm-ast-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hm-ast-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--hm-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--hm-navy);
}

.hm-ast-title-wrap h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.2;
}

.hm-ast-title-wrap p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--hm-gold);
  line-height: 1;
}

.hm-ast-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hm-ast-btn-icon {
  background: transparent;
  border: none;
  color: #FFFFFF;
  opacity: 0.75;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.hm-ast-btn-icon:hover {
  opacity: 1;
}

/* Messages Body */
.hm-ast-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FCFBF9;
}

.hm-ast-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  font-size: 13.5px;
  line-height: 1.45;
}

.hm-ast-msg-bot {
  align-self: flex-start;
}

.hm-ast-msg-user {
  align-self: flex-end;
}

.hm-ast-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  position: relative;
  word-break: break-word;
}

.hm-ast-msg-bot .hm-ast-bubble {
  background: #FFFFFF;
  color: var(--hm-text);
  border: 1px solid var(--hm-border);
  border-top-left-radius: 4px;
}

.hm-ast-msg-user .hm-ast-bubble {
  background: var(--hm-navy);
  color: #FFFFFF;
  border-top-right-radius: 4px;
}

/* Tour Recommendation Cards */
.hm-ast-card {
  margin-top: 8px;
  background: #FFFFFF;
  border: 1px solid var(--hm-border);
  border-left: 3px solid var(--hm-gold);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.hm-ast-card-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--hm-navy);
  text-decoration: none;
  line-height: 1.3;
}

.hm-ast-card-title:hover {
  color: var(--hm-gold-dark);
}

.hm-ast-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.hm-ast-card-price {
  font-weight: 700;
  color: #1A2B49;
}

.hm-ast-card-duration {
  color: #6B7280;
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
}

.hm-ast-card-btn {
  display: inline-block;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--hm-gold-dark);
  text-decoration: none;
  margin-top: 2px;
}

.hm-ast-card-btn:hover {
  text-decoration: underline;
}

/* Chips Container */
.hm-ast-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hm-ast-chip {
  background: #FFFFFF;
  border: 1px solid var(--hm-gold);
  color: var(--hm-navy);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hm-ast-chip:hover {
  background: var(--hm-gold);
  color: #FFFFFF;
}

/* Lead Form Card */
.hm-ast-lead-card {
  margin-top: 8px;
  background: #FFFFFF;
  border: 1px solid var(--hm-border);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(26,43,73,0.06);
}

.hm-ast-lead-card h5 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--hm-navy);
  font-weight: 600;
}

.hm-ast-lead-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--hm-border);
  border-radius: 6px;
  font-size: 12px;
  outline: none;
  font-family: inherit;
}

.hm-ast-lead-input:focus {
  border-color: var(--hm-gold);
}

.hm-ast-btn-submit {
  width: 100%;
  background: var(--hm-gold);
  color: #FFFFFF;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.hm-ast-btn-submit:hover {
  background: var(--hm-gold-dark);
}

/* WhatsApp CTA */
.hm-ast-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #FFFFFF;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

.hm-ast-wa-btn:hover {
  background: #1EBE5D;
}

/* Typing Indicator */
.hm-ast-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1px solid var(--hm-border);
  border-radius: 14px;
  width: fit-content;
}

.hm-ast-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hm-gold);
  animation: hmBlink 1.4s infinite both;
}

.hm-ast-dot:nth-child(2) { animation-delay: 0.2s; }
.hm-ast-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes hmBlink {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* Footer Input Area */
.hm-ast-footer {
  padding: 10px 14px;
  background: #FFFFFF;
  border-top: 1px solid var(--hm-border);
}

.hm-ast-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hm-ast-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--hm-border);
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.hm-ast-input:focus {
  border-color: var(--hm-gold);
}

.hm-ast-send-btn {
  background: var(--hm-navy);
  color: var(--hm-gold);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.hm-ast-send-btn:hover {
  background: #253D66;
  transform: scale(1.05);
}

.hm-ast-disclaimer {
  margin: 6px 0 0;
  font-size: 10px;
  color: #9CA3AF;
  text-align: center;
}

/* Mobile Breakpoint */
@media (max-width: 767px) {
  #hm-ast-modal {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  
  #hm-ast-launcher {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}
