/* ============================================================
   بوت مواسم — Chat Widget
   Design: Navy & Champagne (C) + Tri-color Logo FAB (A style)
   ============================================================ */

:root {
  --mw-navy-1: #1a2744;
  --mw-navy-2: #223254;
  --mw-gold:   #d4b678;
  --mw-gold-dark: #b89a5e;
  --mw-cream:  #f8f5ed;
  --mw-bg:     #fbfaf7;
  --mw-text:   #1a2744;
  --mw-muted:  #8a8472;
  --mw-border: #eae6dc;

  /* Logo colors — blue + orange */
  --mw-blue:   #2563eb;
  --mw-orange: #f59e0b;

  --mw-sans: "Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mw-serif: "Playfair Display", "David Libre", Georgia, serif;
}

/* ─────────────────────────────────────────────
   Floating Action Button (tri-color gradient)
   ───────────────────────────────────────────── */
.mw-chat-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  /* Two-color gradient ring matching logo (blue + orange) */
  background: linear-gradient(135deg, var(--mw-blue) 0%, var(--mw-blue) 48%, var(--mw-orange) 52%, var(--mw-orange) 100%);
  box-shadow:
    0 8px 24px rgba(37, 99, 235, 0.25),
    0 4px 12px rgba(245, 158, 11, 0.18);
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* White inner circle — the chat cloud sits on top */
.mw-chat-fab::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
  z-index: 0;
}

/* Cloud/bubble icon: blue fill with orange border */
.mw-chat-fab svg {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  fill: var(--mw-blue);
  stroke: var(--mw-orange);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.mw-chat-fab:hover {
  transform: scale(1.06);
  box-shadow:
    0 12px 32px rgba(37, 99, 235, 0.35),
    0 6px 16px rgba(245, 158, 11, 0.22);
}

.mw-chat-fab .mw-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--mw-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  min-width: 26px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 10px;
  border: 2px solid #fff;
  padding: 0 6px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  animation: mwPulse 2.4s ease-in-out infinite;
}

@keyframes mwPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4); }
  50%      { transform: scale(1.08); box-shadow: 0 2px 10px rgba(245, 158, 11, 0.7); }
}

/* ─────────────────────────────────────────────
   Teaser bubble (pre-open)
   ───────────────────────────────────────────── */
.mw-chat-teaser {
  position: fixed;
  bottom: 100px;
  left: 24px;
  max-width: 280px;
  background: #fff;
  color: var(--mw-text);
  padding: 14px 40px 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--mw-gold);
  box-shadow: 0 12px 32px rgba(26, 39, 68, 0.22);
  font-family: var(--mw-sans);
  font-size: 13.5px;
  line-height: 1.55;
  z-index: 9997;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  direction: rtl;
}

/* Little tail pointing to FAB */
.mw-chat-teaser::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-right: 1px solid var(--mw-gold);
  border-bottom: 1px solid var(--mw-gold);
  transform: rotate(45deg);
}

.mw-chat-teaser.mw-teaser-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: mwTeaserBounce 1.8s ease-in-out 0.4s 2;
}

@keyframes mwTeaserBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-4px) scale(1.02); }
}

.mw-teaser-close {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mw-cream);
  border: none;
  color: var(--mw-muted);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.mw-teaser-close:hover { background: var(--mw-gold); color: #fff; }

.mw-teaser-text {
  color: var(--mw-navy-1);
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   Trust line in header
   ───────────────────────────────────────────── */
.mw-chat-trust {
  font-size: 10.5px;
  color: rgba(248, 245, 237, 0.75);
  letter-spacing: 0.02em;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────
   Chat Window (Navy & Champagne)
   ───────────────────────────────────────────── */
.mw-chat-window {
  position: fixed;
  bottom: 100px;
  left: 24px;
  width: 390px;
  max-width: calc(100vw - 48px);
  height: 580px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(26, 39, 68, 0.28);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  direction: rtl;
  font-family: var(--mw-sans);
  border: 1px solid var(--mw-border);
}

.mw-chat-window.mw-open {
  display: flex;
  animation: mwChatSlideUp 0.3s ease;
}

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

/* ─────────────────────────────────────────────
   Header — Navy gradient + gold accent line
   ───────────────────────────────────────────── */
.mw-chat-header {
  background: linear-gradient(180deg, var(--mw-navy-1) 0%, var(--mw-navy-2) 100%);
  color: var(--mw-cream);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--mw-gold);
  flex-shrink: 0;
}

.mw-chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}

.mw-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

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

.mw-chat-title {
  margin: 0;
  font-family: var(--mw-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mw-cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mw-chat-subtitle {
  font-size: 11.5px;
  color: var(--mw-gold);
  letter-spacing: 0.03em;
  margin-top: 1px;
}

.mw-chat-status {
  font-size: 11.5px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.mw-chat-status::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #4ADE80;
  border-radius: 50%;
  display: inline-block;
}

.mw-chat-close {
  background: rgba(248, 245, 237, 0.08);
  border: 1px solid rgba(212, 182, 120, 0.3);
  color: var(--mw-cream);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.mw-chat-close:hover {
  background: rgba(212, 182, 120, 0.18);
  border-color: var(--mw-gold);
}

/* ─────────────────────────────────────────────
   Messages area
   ───────────────────────────────────────────── */
.mw-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  background: var(--mw-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mw-chat-messages::-webkit-scrollbar { width: 6px; }
.mw-chat-messages::-webkit-scrollbar-thumb {
  background: var(--mw-border);
  border-radius: 3px;
}

.mw-msg {
  max-width: 85%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.mw-msg-bot {
  background: #fff;
  color: var(--mw-text);
  align-self: flex-start;
  border: 1px solid var(--mw-border);
  border-bottom-right-radius: 4px;
}

.mw-msg-user {
  background: var(--mw-navy-1);
  color: var(--mw-cream);
  align-self: flex-end;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(26, 39, 68, 0.15);
}

.mw-msg-typing {
  background: #fff;
  align-self: flex-start;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--mw-border);
  border-bottom-right-radius: 4px;
  display: flex;
  gap: 4px;
}

.mw-msg-typing span {
  width: 7px; height: 7px;
  background: var(--mw-gold);
  border-radius: 50%;
  animation: mwChatDot 1.4s infinite;
}

.mw-msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.mw-msg-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes mwChatDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-4px); }
}

/* ─────────────────────────────────────────────
   Quick replies
   ───────────────────────────────────────────── */
.mw-chat-quick {
  padding: 10px 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.mw-quick-btn {
  background: #fff;
  border: 1px solid var(--mw-gold);
  color: var(--mw-navy-1);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.mw-quick-btn:hover {
  background: var(--mw-navy-1);
  color: var(--mw-gold);
  border-color: var(--mw-navy-1);
}

/* ─────────────────────────────────────────────
   Input area
   ───────────────────────────────────────────── */
.mw-chat-input {
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--mw-border);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.mw-chat-input textarea {
  flex: 1;
  border: 1px solid var(--mw-border);
  border-radius: 22px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  max-height: 100px;
  min-height: 40px;
  transition: border-color 0.2s;
  color: var(--mw-text);
  background: #fff;
}

.mw-chat-input textarea::placeholder {
  color: var(--mw-muted);
}

.mw-chat-input textarea:focus {
  border-color: var(--mw-gold);
  box-shadow: 0 0 0 3px rgba(212, 182, 120, 0.15);
}

.mw-chat-send {
  background: var(--mw-navy-1);
  border: none;
  color: var(--mw-gold);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.mw-chat-send:hover {
  background: var(--mw-navy-2);
  transform: scale(1.05);
}

.mw-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.mw-chat-send svg {
  width: 18px;
  height: 18px;
  fill: var(--mw-gold);
}

/* ─────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────── */
.mw-chat-footer {
  padding: 7px 16px;
  text-align: center;
  font-size: 10.5px;
  color: var(--mw-muted);
  background: #fff;
  border-top: 1px solid var(--mw-border);
  letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────────
   Wizard — Choice buttons
   ───────────────────────────────────────────── */
.mw-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 6px;
  align-self: stretch;
}

/* Calculator intro text above breakdown */
.mw-calc-intro {
  font-size: 12.5px;
  color: var(--mw-muted);
  line-height: 1.5;
  padding: 6px 0 10px;
  font-weight: 500;
}

/* Stack variant — one button per row, full width. Used for long lists (countries/cities). */
.mw-choice-row.mw-choice-stack .mw-choice-btn {
  flex: 1 1 100%;
  min-width: 100%;
  text-align: right;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
}

/* Pair variant — exactly 2 buttons per row */
.mw-choice-row.mw-choice-pair .mw-choice-btn {
  flex: 1 1 calc(50% - 4px);
  min-width: calc(50% - 4px);
}

.mw-choice-btn {
  background: #fff;
  border: 1px solid var(--mw-gold);
  color: var(--mw-navy-1);
  padding: 10px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.01em;
  flex: 1 1 auto;
  min-width: 110px;
  text-align: center;
  line-height: 1.4;
}

.mw-choice-btn:hover:not(:disabled) {
  background: var(--mw-navy-1);
  color: var(--mw-gold);
  border-color: var(--mw-navy-1);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(26, 39, 68, 0.15);
}

.mw-choice-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.mw-choice-btn.mw-chosen {
  background: var(--mw-navy-1);
  color: var(--mw-gold);
  border-color: var(--mw-navy-1);
  opacity: 1;
}

.mw-choice-primary {
  background: var(--mw-navy-1);
  color: var(--mw-gold);
  border-color: var(--mw-navy-1);
}

.mw-choice-primary:hover:not(:disabled) {
  background: var(--mw-navy-2);
}

.mw-choice-ghost {
  background: transparent;
  color: var(--mw-muted);
  border-color: var(--mw-border);
}

.mw-choice-wa {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  font-weight: 700;
}

.mw-choice-wa:hover:not(:disabled) {
  background: #1ebc5a;
  border-color: #1ebc5a;
  color: #fff;
}

/* Text input row (for free-text steps in wizard) */
.mw-text-input-row {
  display: flex;
  gap: 6px;
  align-self: stretch;
  flex-wrap: wrap;
}

.mw-text-input {
  flex: 1 1 60%;
  min-width: 140px;
  border: 1px solid var(--mw-gold);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--mw-text);
  background: #fff;
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.mw-text-input:focus {
  border-color: var(--mw-navy-1);
  box-shadow: 0 0 0 3px rgba(212, 182, 120, 0.18);
}

.mw-text-input:disabled { background: var(--mw-bg); color: var(--mw-muted); }

.mw-text-submit {
  background: var(--mw-navy-1);
  color: var(--mw-gold);
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.mw-text-submit:hover:not(:disabled) { background: var(--mw-navy-2); }
.mw-text-submit:disabled { opacity: 0.5; cursor: default; }

.mw-text-skip {
  background: transparent;
  color: var(--mw-muted);
  border: 1px solid var(--mw-border);
  padding: 10px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.mw-text-skip:hover:not(:disabled) {
  background: var(--mw-cream);
  color: var(--mw-navy-1);
  border-color: var(--mw-gold);
}

.mw-text-skip:disabled { opacity: 0.5; cursor: default; }

/* Age buttons — compact grid */
.mw-age-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.mw-age-btn {
  min-width: auto;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}

/* ─────────────────────────────────────────────
   Date picker
   ───────────────────────────────────────────── */
.mw-date-picker {
  background: #fff;
  border: 1px solid var(--mw-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
}

.mw-date-picker label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--mw-muted);
  font-weight: 600;
}

.mw-date-picker input[type="date"] {
  border: 1px solid var(--mw-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--mw-text);
  outline: none;
  background: var(--mw-bg);
}

.mw-date-picker input[type="date"]:focus {
  border-color: var(--mw-gold);
  box-shadow: 0 0 0 3px rgba(212, 182, 120, 0.15);
}

.mw-date-confirm {
  background: var(--mw-navy-1);
  color: var(--mw-gold);
  border: none;
  padding: 11px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.mw-date-confirm:hover:not(:disabled) { background: var(--mw-navy-2); }
.mw-date-confirm:disabled { opacity: 0.5; cursor: default; }
.mw-date-confirm.mw-chosen { background: var(--mw-navy-2); }

/* ─────────────────────────────────────────────
   Hotel cards list
   ───────────────────────────────────────────── */
.mw-hotel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
}

.mw-hotel-card {
  background: #fff;
  border: 1px solid var(--mw-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
}

.mw-hotel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 39, 68, 0.12);
  border-color: var(--mw-gold);
}

.mw-hc-img {
  height: 120px;
  background-size: cover;
  background-position: center;
  background-color: var(--mw-cream);
}

.mw-hc-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--mw-gold);
}

.mw-hc-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mw-hc-name {
  font-family: var(--mw-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--mw-navy-1);
  line-height: 1.3;
}

.mw-hc-meta {
  font-size: 12px;
  color: var(--mw-muted);
}

.mw-hc-stars { color: var(--mw-gold); font-weight: 700; letter-spacing: 1px; }

.mw-hc-meal {
  font-size: 11.5px;
  color: var(--mw-muted);
  margin-top: 2px;
}

.mw-hc-price {
  margin-top: 6px;
  color: var(--mw-navy-1);
}

.mw-hc-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--mw-navy-1);
  font-family: var(--mw-serif);
}

.mw-hc-nights {
  font-size: 12px;
  color: var(--mw-muted);
}

.mw-hc-transport {
  font-size: 11.5px;
  color: var(--mw-muted);
  font-weight: 500;
}

.mw-hc-choose {
  margin-top: 10px;
  background: var(--mw-navy-1);
  color: var(--mw-gold);
  border: none;
  padding: 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.mw-hc-choose:hover { background: var(--mw-navy-2); }

/* ─────────────────────────────────────────────
   Summary card
   ───────────────────────────────────────────── */
.mw-summary {
  background: linear-gradient(180deg, var(--mw-cream) 0%, #fff 100%);
  border: 1px solid var(--mw-gold);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mw-summary h4 {
  margin: 0 0 6px;
  font-family: var(--mw-serif);
  font-size: 15px;
  color: var(--mw-navy-1);
  font-weight: 600;
  border-bottom: 1px solid var(--mw-border);
  padding-bottom: 6px;
}

.mw-sum-row {
  font-size: 13px;
  color: var(--mw-text);
  display: flex;
  gap: 8px;
  align-items: center;
  line-height: 1.5;
}

.mw-sum-row span:first-child { opacity: 0.7; font-size: 14px; }

.mw-sum-price {
  font-size: 13.5px;
  color: var(--mw-navy-1);
  padding-top: 6px;
  border-top: 1px dashed var(--mw-border);
  margin-top: 4px;
}

.mw-sum-price:first-of-type { border-top: 1px solid var(--mw-border); margin-top: 6px; }
.mw-sum-price small { color: var(--mw-muted); font-size: 11px; }
.mw-sum-price b { color: var(--mw-navy-1); font-size: 16px; font-family: var(--mw-serif); }

/* ─────────────────────────────────────────────
   Misc — WA link, restart btn
   ───────────────────────────────────────────── */
.mw-wa-link {
  display: inline-block;
  background: #25D366;
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 6px;
}

.mw-chat-restart {
  background: rgba(248, 245, 237, 0.08);
  border: 1px solid rgba(212, 182, 120, 0.3);
  color: var(--mw-cream);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-inline-end: 4px;
}

.mw-chat-restart:hover {
  background: rgba(212, 182, 120, 0.18);
  border-color: var(--mw-gold);
  transform: rotate(-90deg);
}

/* ─────────────────────────────────────────────
   Lock body scroll when chat is open on mobile
   ───────────────────────────────────────────── */
body.mw-chat-locked {
  overflow: hidden !important;
  /* No position:fixed — it breaks position:fixed children (chat window) on iOS */
}

/* ─────────────────────────────────────────────
   Mobile (≤ 640px)
   ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .mw-chat-window {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
    overflow: hidden;
  }

  /* Bigger header for easier tap targets */
  .mw-chat-header {
    padding: 14px 16px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    gap: 10px;
  }

  .mw-chat-title { font-size: 16px; }
  .mw-chat-subtitle { font-size: 11px; }
  .mw-chat-trust {
    font-size: 10px;
    white-space: normal;
    line-height: 1.4;
  }

  /* Prominent, tappable X (44x44 WCAG tap target) */
  .mw-chat-close {
    width: 44px;
    height: 44px;
    font-size: 20px;
    background: rgba(212, 182, 120, 0.22);
    border: 1.5px solid var(--mw-gold);
    color: #fff;
    font-weight: 700;
  }

  .mw-chat-close:hover,
  .mw-chat-close:active {
    background: var(--mw-gold);
    color: var(--mw-navy-1);
  }

  .mw-chat-restart {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .mw-chat-avatar {
    width: 40px;
    height: 40px;
  }

  /* Messages area — fixes side shifts: no horizontal overflow */
  .mw-chat-messages {
    padding: 14px 14px;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mw-msg { max-width: 90%; }

  /* Choice buttons: stable width, no horizontal scroll */
  .mw-choice-row {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .mw-choice-btn {
    flex: 1 1 100%;
    min-width: 0;
    font-size: 14px;
    padding: 12px 14px;
  }

  .mw-age-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
  }

  .mw-age-btn { font-size: 13px; padding: 10px 0; }

  /* Hotel cards stay full width */
  .mw-hotel-list, .mw-hotel-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .mw-hc-img { height: 140px; }

  /* Summary card — no side overflow */
  .mw-summary {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Date picker — horizontal layout on wider phones, stacked on narrow */
  .mw-date-picker {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Text input: don't wrap awkwardly */
  .mw-text-input-row {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .mw-text-input { width: 100%; min-width: 0; font-size: 16px; /* prevent iOS zoom */ }

  /* Input bar (AI mode) bottom spacing */
  .mw-chat-input {
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .mw-chat-input textarea { font-size: 16px; /* prevent iOS zoom */ }

  .mw-chat-footer {
    padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px));
  }

  /* FAB sizing */
  .mw-chat-fab {
    bottom: 18px;
    left: 18px;
    width: 58px;
    height: 58px;
  }

  .mw-chat-teaser {
    bottom: 90px;
    left: 14px;
    right: 14px;
    max-width: none;
    font-size: 13px;
  }
}

/* ─────────────────────────────────────────────
   Calculator — Counter widget
   ───────────────────────────────────────────── */
.mw-counter-wrap {
  align-self: stretch;
  background: #fff;
  border: 1px solid var(--mw-gold);
  border-radius: 14px;
  padding: 14px 16px;
}

.mw-counter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mw-counter-label {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--mw-text);
  min-width: 80px;
}

.mw-counter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mw-counter-dec,
.mw-counter-inc {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--mw-gold);
  background: #fff;
  color: var(--mw-navy-1);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  padding: 0;
  font-family: inherit;
}

.mw-counter-dec:hover:not(:disabled),
.mw-counter-inc:hover:not(:disabled) {
  background: var(--mw-navy-1);
  color: var(--mw-gold);
  border-color: var(--mw-navy-1);
}

.mw-counter-dec:disabled,
.mw-counter-inc:disabled { opacity: 0.35; cursor: default; }

.mw-counter-display {
  min-width: 34px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--mw-navy-1);
  font-family: var(--mw-serif);
}

.mw-counter-ok {
  background: var(--mw-navy-1);
  color: var(--mw-gold);
  border: none;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-inline-start: auto;
}

.mw-counter-ok:hover:not(:disabled) { background: var(--mw-navy-2); }
.mw-counter-ok:disabled { opacity: 0.5; cursor: default; }

/* ─────────────────────────────────────────────
   Calculator — Result card
   ───────────────────────────────────────────── */
.mw-calc-card {
  gap: 0 !important;
}

/* Center the calculator result card horizontally inside the chat — it's a summary,
   not a conversational bubble, so it shouldn't hug the right edge. */
.mw-msg-centered {
  align-self: center !important;
  max-width: 94% !important;
  width: 94% !important;
  border-bottom-right-radius: 14px !important;
  margin-inline: auto;
}

.mw-calc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--mw-border);
  margin-bottom: 6px;
}

.mw-calc-dest {
  font-size: 15px;
  font-weight: 600;
  color: var(--mw-navy-1);
  font-family: var(--mw-serif);
  line-height: 1.4;
}

.mw-calc-country {
  font-family: var(--mw-sans);
  font-weight: 400;
  font-size: 13px;
  color: var(--mw-muted);
}

.mw-calc-tier {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.mw-tier-budget  { background: #d1fae5; color: #065f46; }
.mw-tier-mid     { background: #fef3c7; color: #92400e; }
.mw-tier-luxury  { background: #ede9fe; color: #5b21b6; }

.mw-calc-sub {
  font-size: 12px;
  color: var(--mw-muted);
  margin-bottom: 10px;
}

.mw-calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--mw-bg);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.mw-calc-brow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--mw-text);
  gap: 8px;
}

.mw-calc-brow span:first-child { color: var(--mw-muted); white-space: nowrap; }
.mw-calc-brow small { font-size: 11px; color: var(--mw-muted); margin-inline-start: 3px; }

.mw-calc-totals {
  border-top: 2px solid var(--mw-navy-1);
  padding-top: 10px;
  margin-bottom: 10px;
}

.mw-calc-total-pp {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mw-serif);
  color: var(--mw-navy-1);
  line-height: 1.25;
}

.mw-calc-total-pp small {
  font-size: 12px;
  font-family: var(--mw-sans);
  font-weight: 400;
  color: var(--mw-muted);
}

.mw-calc-total-grp {
  font-size: 13px;
  color: var(--mw-muted);
  margin-top: 3px;
}

.mw-calc-total-grp strong { color: var(--mw-navy-1); font-weight: 700; }

.mw-calc-ils {
  font-size: 13px;
  color: var(--mw-text);
  margin-top: 4px;
}

.mw-calc-ils strong { color: var(--mw-navy-1); font-weight: 700; }

.mw-calc-note {
  font-size: 11px;
  color: var(--mw-muted);
  line-height: 1.55;
  padding-top: 8px;
  border-top: 1px dashed var(--mw-border);
  margin-top: 2px;
}

/* ─────────────────────────────────────────────
   Calculator — Mobile responsive
   ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .mw-calc-head {
    flex-wrap: wrap;
    gap: 6px;
  }
  .mw-calc-dest { font-size: 14px; line-height: 1.35; }
  .mw-calc-country { font-size: 12px; }
  .mw-calc-tier { font-size: 10px; padding: 3px 8px; }

  .mw-calc-sub { font-size: 11.5px; }
  .mw-calc-intro { font-size: 12px; padding: 4px 0 8px; }

  .mw-calc-breakdown { padding: 9px 10px; gap: 6px; }
  .mw-calc-brow { font-size: 12.5px; }

  .mw-calc-total-pp {
    font-size: 20px;
    line-height: 1.2;
    word-break: break-word;
  }
  .mw-calc-total-pp small { font-size: 11px; display: block; margin-top: 2px; }
  .mw-calc-total-grp { font-size: 12px; line-height: 1.5; }
  .mw-calc-total-grp strong { display: inline-block; }
  .mw-calc-ils { font-size: 12.5px; }

  .mw-calc-note { font-size: 10.5px; line-height: 1.5; }

  /* Stack-variant buttons slightly tighter on small screens */
  .mw-choice-row.mw-choice-stack .mw-choice-btn {
    padding: 11px 14px;
    font-size: 13.5px;
  }
}

/* Very narrow phones (< 360px) */
@media (max-width: 360px) {
  .mw-calc-total-pp { font-size: 18px; }
  .mw-calc-dest { font-size: 13px; }
}
