/* ============================================================
   AURA — VILLA 44 BADULLA AI CONCIERGE & RESERVATION ASSISTANT
   Ultra-Luxury Floating Chatbot Stylesheet
   ============================================================ */

/* === ROOT CSS VARIABLES FOR CHATBOT === */
:root {
  --aura-emerald-deep: #0B1914;
  --aura-emerald-surface: #13241E;
  --aura-emerald-card: #1A3129;
  --aura-emerald-glass: rgba(19, 36, 30, 0.88);
  --aura-gold-primary: #C8B28A;
  --aura-gold-light: #E5D3B3;
  --aura-gold-dark: #A8926A;
  --aura-gold-glow: rgba(200, 178, 138, 0.35);
  --aura-gold-glow-soft: rgba(200, 178, 138, 0.15);
  --aura-cream: #FBFBF9;
  --aura-text-muted: rgba(251, 251, 249, 0.65);
  --aura-border: rgba(200, 178, 138, 0.22);
  --aura-border-focus: rgba(200, 178, 138, 0.65);
  --aura-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(200, 178, 138, 0.12);
  --aura-radius-lg: 24px;
  --aura-radius-md: 16px;
  --aura-radius-sm: 10px;
  --aura-font-serif: 'Cormorant Garamond', Georgia, serif;
  --aura-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* === FLOATING CONCIERGE TRIGGER BUTTON === */
.aura-trigger-wrap {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--aura-font-sans);
}

/* Welcoming Speech Pill / Prompt Bubble */
.aura-prompt-bubble {
  background: var(--aura-emerald-surface);
  border: 1px solid var(--aura-border);
  color: var(--aura-cream);
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  animation: auraBubbleFloat 4s ease-in-out infinite alternate;
  backdrop-filter: blur(12px);
  white-space: nowrap;
}

.aura-prompt-bubble:hover {
  transform: translateY(-2px);
  border-color: var(--aura-gold-primary);
  background: var(--aura-emerald-card);
  box-shadow: 0 14px 34px rgba(0,0,0,0.45), 0 0 20px var(--aura-gold-glow);
}

.aura-prompt-bubble .aura-bubble-sparkle {
  color: var(--aura-gold-primary);
  font-size: 1rem;
}

.aura-prompt-bubble .aura-bubble-close {
  opacity: 0.5;
  margin-left: 4px;
  font-size: 0.9rem;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.aura-prompt-bubble .aura-bubble-close:hover {
  opacity: 1;
  color: var(--aura-gold-light);
}

@keyframes auraBubbleFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-4px); }
}

/* Floating FAB Button */
.aura-fab-btn {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(145deg, #182C24, #0B1914);
  border: 1.5px solid var(--aura-gold-primary);
  color: var(--aura-gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--aura-shadow);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  overflow: visible;
}

.aura-fab-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--aura-gold-primary);
  opacity: 0.4;
  animation: auraPulse 3s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes auraPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

.aura-fab-btn:hover {
  transform: scale(1.08) rotate(4deg);
  border-color: #fff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px var(--aura-gold-glow);
}

.aura-fab-icon {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aura-fab-close-icon {
  display: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--aura-gold-primary);
}

.aura-trigger-wrap.is-open .aura-fab-btn {
  background: var(--aura-emerald-card);
  transform: rotate(90deg);
}

.aura-trigger-wrap.is-open .aura-fab-icon {
  display: none;
}

.aura-trigger-wrap.is-open .aura-fab-close-icon {
  display: block;
}

.aura-trigger-wrap.is-open .aura-prompt-bubble {
  display: none;
}

/* Live Online Status Dot */
.aura-fab-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  background: #10B981;
  border: 2.5px solid #0B1914;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

/* === AURA CHAT MODAL DRAWER === */
.aura-modal {
  position: fixed;
  bottom: 104px;
  right: 28px;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 120px);
  background: var(--aura-emerald-deep);
  border: 1px solid var(--aura-border);
  border-radius: var(--aura-radius-lg);
  box-shadow: var(--aura-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9995;
  font-family: var(--aura-font-sans);
  color: var(--aura-cream);
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.35s ease;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
}

.aura-modal.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Expand Fullscreen Mode */
.aura-modal.is-expanded {
  width: 580px;
  height: 760px;
  max-height: calc(100vh - 80px);
}

/* === CHAT HEADER === */
.aura-header {
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(26, 49, 41, 0.95) 0%, rgba(19, 36, 30, 0.9) 100%);
  border-bottom: 1px solid var(--aura-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
}

.aura-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aura-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #304E42, #10221C);
  border: 1.5px solid var(--aura-gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3), 0 0 10px var(--aura-gold-glow-soft);
  overflow: hidden;
}

.aura-avatar-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.aura-status-dot-inner {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 10px;
  height: 10px;
  background: #10B981;
  border: 2px solid #13241E;
  border-radius: 50%;
  box-shadow: 0 0 6px #10B981;
}

.aura-header-info {
  display: flex;
  flex-direction: column;
}

.aura-header-title {
  font-family: var(--aura-font-serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--aura-gold-primary);
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aura-badge-pill {
  font-family: var(--aura-font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(200, 178, 138, 0.15);
  color: var(--aura-gold-light);
  border: 1px solid rgba(200, 178, 138, 0.3);
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

.aura-header-subtitle {
  font-size: 0.75rem;
  color: var(--aura-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.aura-live-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
}

/* Header Action Buttons */
.aura-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.aura-hdr-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--aura-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.aura-hdr-btn:hover {
  background: rgba(200, 178, 138, 0.2);
  border-color: var(--aura-gold-primary);
  color: var(--aura-gold-light);
  transform: scale(1.05);
}

/* === QUICK TOPIC SUGGESTION CHIPS BAR === */
.aura-quick-chips-bar {
  padding: 8px 14px;
  background: rgba(11, 25, 20, 0.95);
  border-bottom: 1px solid rgba(200, 178, 138, 0.12);
  display: flex;
  gap: 8px;
  overflow-x: auto !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
  overscroll-behavior: contain !important;
  touch-action: pan-x !important;
  pointer-events: auto !important;
}

.aura-quick-chips-bar::-webkit-scrollbar {
  display: none;
}

.aura-chip {
  background: rgba(26, 49, 41, 0.7);
  border: 1px solid rgba(200, 178, 138, 0.22);
  color: var(--aura-cream);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.aura-chip:hover {
  background: var(--aura-gold-primary);
  color: #0B1914;
  border-color: var(--aura-gold-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--aura-gold-glow);
}

/* === MESSAGES CONTAINER === */
.aura-messages {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: 18px 16px;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  pointer-events: auto !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(26, 49, 41, 0.4) 0%, rgba(11, 25, 20, 0.9) 100%);
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.aura-messages::-webkit-scrollbar {
  width: 5px;
}
.aura-messages::-webkit-scrollbar-track {
  background: transparent;
}
.aura-messages::-webkit-scrollbar-thumb {
  background: rgba(200, 178, 138, 0.25);
  border-radius: 4px;
}
.aura-messages::-webkit-scrollbar-thumb:hover {
  background: var(--aura-gold-primary);
}

/* Timestamp divider */
.aura-time-stamp {
  text-align: center;
  font-size: 0.68rem;
  color: var(--aura-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 4px 0;
  opacity: 0.7;
}

/* Message Rows */
.aura-msg-row {
  display: flex;
  gap: 10px;
  max-width: 92%;
  animation: auraMsgFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes auraMsgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.aura-msg-row.bot {
  align-self: flex-start;
}

.aura-msg-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.aura-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--aura-emerald-surface);
  border: 1px solid var(--aura-gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  overflow: hidden;
}

.aura-msg-avatar img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* Message Bubbles */
.aura-msg-bubble {
  padding: 12px 16px;
  border-radius: var(--aura-radius-md);
  font-size: 0.88rem;
  line-height: 1.55;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  word-break: break-word;
}

.aura-msg-row.bot .aura-msg-bubble {
  background: linear-gradient(135deg, rgba(26, 49, 41, 0.95), rgba(19, 36, 30, 0.98));
  border: 1px solid var(--aura-border);
  color: var(--aura-cream);
  border-top-left-radius: 4px;
}

.aura-msg-row.user .aura-msg-bubble {
  background: linear-gradient(135deg, #C8B28A, #B49D73);
  color: #0B1914;
  font-weight: 500;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(200, 178, 138, 0.25);
}

.aura-msg-bubble p {
  margin-bottom: 8px;
}

.aura-msg-bubble p:last-child {
  margin-bottom: 0;
}

.aura-msg-bubble strong {
  color: var(--aura-gold-light);
  font-weight: 600;
}

.aura-msg-row.user .aura-msg-bubble strong {
  color: #000;
}

.aura-msg-bubble ul {
  margin: 6px 0 8px 16px;
  list-style: disc;
}

.aura-msg-bubble li {
  margin-bottom: 4px;
  font-size: 0.84rem;
}

/* === RICH CHAT CARDS (ROOMS, BOOKING FORM, ACTIONS) === */
.aura-card-rich {
  margin-top: 10px;
  background: rgba(11, 25, 20, 0.85);
  border: 1px solid rgba(200, 178, 138, 0.3);
  border-radius: var(--aura-radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aura-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aura-card-title {
  font-family: var(--aura-font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--aura-gold-primary);
}

.aura-card-price-badge {
  font-size: 0.72rem;
  background: rgba(200, 178, 138, 0.18);
  border: 1px solid rgba(200, 178, 138, 0.4);
  color: var(--aura-gold-light);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.aura-card-media {
  width: 100%;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.aura-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.aura-card-media:hover img {
  transform: scale(1.05);
}

.aura-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}

.aura-spec-tag {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--aura-text-muted);
}

/* In-Chat Action Buttons */
.aura-action-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.aura-action-btn {
  background: rgba(200, 178, 138, 0.15);
  border: 1px solid var(--aura-gold-primary);
  color: var(--aura-gold-light);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.aura-action-btn:hover {
  background: var(--aura-gold-primary);
  color: #0B1914;
  box-shadow: 0 4px 12px var(--aura-gold-glow);
}

.aura-action-btn.whatsapp-btn {
  background: #25D366;
  border-color: #25D366;
  color: #FFFFFF;
}

.aura-action-btn.whatsapp-btn:hover {
  background: #1EBE5D;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

/* In-Chat Interactive Booking Form */
.aura-chat-form {
  margin-top: 10px;
  background: rgba(11, 25, 20, 0.9);
  border: 1px solid var(--aura-gold-primary);
  border-radius: var(--aura-radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aura-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aura-form-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--aura-gold-primary);
  font-weight: 600;
}

.aura-form-input, .aura-form-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(200, 178, 138, 0.3);
  color: var(--aura-cream);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: var(--aura-font-sans);
  outline: none;
  transition: border-color 0.2s ease;
}

.aura-form-input:focus, .aura-form-select:focus {
  border-color: var(--aura-gold-primary);
  background: rgba(255, 255, 255, 0.08);
}

.aura-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.aura-form-submit-btn {
  background: linear-gradient(135deg, #C8B28A, #A8926A);
  border: none;
  color: #0B1914;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.aura-form-submit-btn:hover {
  background: linear-gradient(135deg, #E5D3B3, #C8B28A);
  box-shadow: 0 4px 14px var(--aura-gold-glow);
  transform: translateY(-1px);
}

/* === TYPING INDICATOR === */
.aura-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: var(--aura-emerald-surface);
  border: 1px solid var(--aura-border);
  border-radius: var(--aura-radius-md);
  border-top-left-radius: 4px;
  width: fit-content;
}

.aura-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aura-gold-primary);
  opacity: 0.4;
  animation: auraTypingBounce 1.4s infinite ease-in-out;
}

.aura-typing-dot:nth-child(1) { animation-delay: 0s; }
.aura-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.aura-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes auraTypingBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1.2); opacity: 1; }
}

/* === FOOTER & INPUT AREA === */
.aura-footer {
  padding: 12px 16px;
  background: var(--aura-emerald-deep);
  border-top: 1px solid var(--aura-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.aura-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(26, 49, 41, 0.85);
  border: 1.5px solid var(--aura-border);
  border-radius: 30px;
  padding: 4px 6px 4px 16px;
  transition: all 0.3s ease;
}

.aura-input-wrap:focus-within {
  border-color: var(--aura-gold-primary);
  background: rgba(26, 49, 41, 1);
  box-shadow: 0 0 16px var(--aura-gold-glow-soft);
}

.aura-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--aura-cream);
  font-family: var(--aura-font-sans);
  font-size: 0.88rem;
  padding: 8px 4px;
}

.aura-chat-input::placeholder {
  color: rgba(251, 251, 249, 0.45);
  font-size: 0.84rem;
}

.aura-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--aura-gold-primary);
  border: none;
  color: #0B1914;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.aura-send-btn:hover {
  background: #E5D3B3;
  transform: scale(1.08);
  box-shadow: 0 2px 10px var(--aura-gold-glow);
}

.aura-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Footer Escalate Bar */
.aura-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--aura-text-muted);
  padding: 0 4px;
}

.aura-footer-link {
  color: var(--aura-gold-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.aura-footer-link:hover {
  color: #FFF;
  text-decoration: underline;
}

/* === MOBILE RESPONSIVE TWEAKS === */
@media (max-width: 600px) {
  .aura-trigger-wrap {
    bottom: 20px;
    right: 18px;
  }
  .aura-prompt-bubble {
    display: none; /* Hide floating text on mobile for clean screen */
  }
  .aura-modal {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 92vh;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
  }
  .aura-modal.is-expanded {
    width: 100vw;
    height: 92vh;
  }
}
