/* ══════════════════════════════════════════════
   DEMO LIFESTYLE — Chatbot Styles (Premium)
   ══════════════════════════════════════════════ */

/* ── Chat FAB ── */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 155;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 20px rgba(7, 36, 71, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, bottom 0.3s ease;
}
/* Lift chat FAB above sticky CTAs on detail pages */
@media (max-width: 900px) {
  body:has(.od-sticky-cta) .chat-fab,
  body:has(.rd-sticky-cta) .chat-fab,
  body:has(.booking-sticky-cta) .chat-fab { bottom: 88px; }
}

.chat-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 32px rgba(7, 36, 71, 0.45);
  background: var(--gold-dark);
}

.chat-fab:active { transform: scale(0.95); }

.chat-fab--pulse { animation: chat-pulse 2s ease-in-out infinite; }

@keyframes chat-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(7, 36, 71, 0.35); }
  50% { box-shadow: 0 4px 20px rgba(7, 36, 71, 0.35), 0 0 0 12px rgba(39, 101, 255, 0.15); }
}

@media (max-width: 900px) {
  .chat-fab {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: var(--container-pad);
    width: 52px;
    height: 52px;
  }
}

/* ── Chat Overlay ── */
.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--light);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
}

.chat-overlay.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.15s ease,
              top 0.15s ease;
}

/* Lock body scroll when chat is open */
body.chat-open {
  overflow: hidden;
}

/* Solid backdrop to hide page content behind keyboard */
body.chat-open #app {
  visibility: hidden;
}

@media (min-width: 901px) {
  .chat-overlay {
    width: 420px;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
  }
}

/* ── Chat Header (Compact) ── */
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: var(--gold);
  color: var(--white);
  flex-shrink: 0;
}

.chat-header__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.chat-header__info { flex: 1; }

.chat-header__title {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-body);
  line-height: 1.2;
}

.chat-header__subtitle {
  font-size: 10px;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 1px;
}

.chat-header__close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
  background: none;
  border: none;
}

.chat-header__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* ── Messages Area ── */
.chat-messages {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Message Bubbles ── */
.chat-msg { max-width: 80%; }

.chat-msg--user { align-self: flex-end; }
.chat-msg--bot { align-self: flex-start; }

.chat-msg--user .chat-msg__bubble {
  background: var(--gold);
  color: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg);
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-msg--bot .chat-msg__bubble {
  background: var(--white);
  color: var(--charcoal);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--grey-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.chat-msg__time {
  font-size: 10px;
  font-family: var(--font-ui);
  color: var(--grey-light);
  margin-top: 4px;
}

.chat-msg--user .chat-msg__time { text-align: right; }

/* Message appear animation */
.chat-msg--animate {
  animation: msg-appear 0.3s ease forwards;
}

@keyframes msg-appear {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Typing Indicator ── */
.chat-typing .chat-typing__dots {
  display: flex;
  gap: 5px;
  padding: 14px 20px;
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
  border: 1px solid var(--grey-border);
}

.chat-typing__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grey-light);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.chat-typing__dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ══════════════════════════════════════════════
   Welcome Screen — Premium AI Concierge
   ══════════════════════════════════════════════ */

.chat-welcome {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 0 8px;
  animation: msg-appear 0.4s ease forwards;
}

/* Greeting */
.chat-welcome__greeting {
  text-align: center;
  padding: 8px 0 0;
}

.chat-welcome__name {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.3;
  margin-bottom: 4px;
}

.chat-welcome__tagline {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-light);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.chat-welcome__tagline .icon {
  color: var(--accent);
}

/* Section headers */
.chat-welcome__section-title {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-light);
  padding: 0 4px;
  margin-bottom: -8px;
}

/* Horizontal scroll offer cards */
.chat-welcome__offers-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}

.chat-welcome__offers-row::-webkit-scrollbar { display: none; }

/* Mini offer card */
.chat-welcome__offer-card {
  flex-shrink: 0;
  width: 155px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--grey-border);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-welcome__offer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.chat-welcome__offer-img {
  width: 100%;
  height: 85px;
  object-fit: cover;
  display: block;
}

.chat-welcome__offer-body {
  padding: 8px 10px;
}

.chat-welcome__offer-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.3;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-welcome__offer-sub {
  font-size: 10px;
  color: var(--grey);
}

.chat-welcome__offer-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-ui);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
  margin-top: 4px;
}

/* Expiring offers — compact list */
.chat-welcome__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-welcome__list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--grey-border);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.chat-welcome__list-item:hover {
  background: var(--accent-light);
  box-shadow: var(--shadow-soft);
}

.chat-welcome__list-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.chat-welcome__list-info {
  flex: 1;
  min-width: 0;
}

.chat-welcome__list-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-welcome__list-sub {
  font-size: 10px;
  color: var(--grey);
}

.chat-welcome__list-badge {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-ui);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--warning-light);
  color: var(--warning);
}

/* Quick action grid (2×2) */
.chat-welcome__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chat-welcome__action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--grey-border);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-welcome__action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.chat-welcome__action-btn .icon {
  color: var(--accent);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   Chat Cards (Offer / Event / Benefits)
   ══════════════════════════════════════════════ */

.chat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--grey-border);
  overflow: hidden;
  width: 260px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.chat-card__image {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.chat-card__body { padding: 12px; }

.chat-card__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 3px;
  line-height: 1.3;
}

.chat-card__sub {
  font-size: 11px;
  color: var(--grey);
  margin-bottom: 6px;
}

.chat-card__cta {
  display: flex;
  padding: 10px 12px;
  border-top: 1px solid var(--light);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s ease;
}

.chat-card__cta:hover { background: var(--accent-light); }

/* Event date badge */
.chat-card__date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1;
}

.chat-card__date-day { font-size: 16px; font-weight: 800; }
.chat-card__date-mon { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; }

/* Benefits card variant */
.chat-card--benefits {
  background: var(--gold);
  color: var(--white);
  border: none;
  width: 280px;
  cursor: default;
}

.chat-card--benefits:hover {
  transform: none;
  box-shadow: none;
}

.chat-card__benefits-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 8px;
  font-size: 14px;
  font-weight: 700;
}

.chat-card__benefits-list {
  list-style: none;
  padding: 0 16px 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-card__benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.chat-card__benefits-list li .icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--white);
}

/* ══════════════════════════════════════════════
   Quick Prompts (Premium Chips)
   ══════════════════════════════════════════════ */

.chat-prompts {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
  background: var(--white);
  border-top: 1px solid var(--light);
}

.chat-prompts::-webkit-scrollbar { display: none; }

.chat-prompt-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--white);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chat-prompt-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 2px 8px rgba(39, 101, 255, 0.12);
}

/* ══════════════════════════════════════════════
   AI Input Field (Premium)
   ══════════════════════════════════════════════ */

.chat-input-area {
  flex-shrink: 0;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--grey-border);
}

.chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-light);
  border: 1.5px solid var(--grey-border);
  border-radius: var(--radius-full);
  padding: 4px 4px 4px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(39, 101, 255, 0.1);
}

/* AI sparkle icon */
.chat-input-icon {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.5;
  display: grid;
  place-items: center;
  transition: opacity 0.2s ease;
}

.chat-input-wrap:focus-within .chat-input-icon {
  opacity: 1;
}

.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--charcoal);
  outline: none;
  padding: 8px 0;
}

.chat-input::placeholder {
  color: var(--grey-light);
  font-style: italic;
}

.chat-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.chat-send-btn:hover {
  background: var(--accent-dark);
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: var(--grey-light);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .chat-fab--pulse { animation: none; }
  .chat-msg--animate { animation: none; opacity: 1; }
  .chat-typing__dot { animation: none; opacity: 0.6; }
  .chat-overlay { transition-duration: 0.01s; }
  .chat-welcome { animation: none; opacity: 1; }
}
