/* =========================================================
   Travelistas – Floating AI Travel Chat Widget
   ========================================================= */

/* ---------- Floating Trigger Button (RIGHT side) ---------- */
.tvchat-fab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.tvchat-fab-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: linear-gradient(160deg, #0077b6 0%, #0e3a6e 60%, #1a1a4e 100%);
  color: #fff;
  border-radius: 20px 0 0 20px;
  padding: 20px 14px;
  box-shadow: -4px 0 24px rgba(0, 119, 182, 0.4);
  transition: box-shadow 0.3s ease, padding 0.3s ease;
  border: none;
  outline: none;
}

.tvchat-fab-inner:hover {
  box-shadow: -6px 0 32px rgba(0, 119, 182, 0.65);
  padding-right: 18px;
}

.tvchat-fab-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Raleway', 'Open Sans', sans-serif;
  white-space: nowrap;
  margin-bottom: 4px;
}

.tvchat-fab-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
}

.tvchat-fab-pulse {
  width: 10px;
  height: 10px;
  background: #00e5b4;
  border-radius: 50%;
  margin-top: 4px;
  animation: tvchat-pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(0, 229, 180, 0.5);
}

@keyframes tvchat-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 229, 180, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(0, 229, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 180, 0); }
}

/* ---------- Tooltip Bubble ---------- */
.tvchat-fab-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: #1e293b;
  padding: 10px 36px 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 1;
}
.tvchat-fab-tooltip.visible {
  opacity: 1;
  pointer-events: auto;
  animation: tvtooltip-bounce 0.5s ease;
}

@keyframes tvtooltip-bounce {
  0%   { transform: translateY(-50%) translateX(12px); opacity: 0; }
  60%  { transform: translateY(-50%) translateX(-3px); opacity: 1; }
  100% { transform: translateY(-50%) translateX(0); opacity: 1; }
}

.tvchat-tooltip-arrow {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  box-shadow: 2px -2px 4px rgba(0,0,0,0.06);
}

.tvchat-tooltip-wave {
  display: inline-block;
  animation: tvtooltip-wave 1.8s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes tvtooltip-wave {
  0%   { transform: rotate(0deg); }
  10%  { transform: rotate(14deg); }
  20%  { transform: rotate(-8deg); }
  30%  { transform: rotate(14deg); }
  40%  { transform: rotate(-4deg); }
  50%  { transform: rotate(10deg); }
  60%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.tvchat-tooltip-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  font-size: 1rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
.tvchat-tooltip-close:hover { color: #475569; }

@media (max-width: 640px) {
  .tvchat-fab-tooltip {
    right: calc(100% + 8px);
    font-size: 0.78rem;
    padding: 8px 30px 8px 12px;
  }
}

/* ---------- Overlay ---------- */
.tvchat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9998;
  backdrop-filter: blur(2px);
  animation: tvchat-fade-in 0.2s ease;
}

.tvchat-overlay.active { display: block; }

@keyframes tvchat-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

:root {
  --tvh: 1vh;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR CONTAINER — wraps chat modal + map panel together
   Default : chat-only width on the right edge
   Map open: expands left to reveal the map alongside the chat
   ══════════════════════════════════════════════════════════ */
.tvchat-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  /* Default: enough room for the chat panel only */
  width: 38vw;
  min-width: 380px;
  max-width: 620px;
  height: calc(var(--tvh) * 100);
  min-height: calc(var(--tvh) * 100);
  max-height: calc(var(--tvh) * 100);
  z-index: 9999;
  display: flex;
  flex-direction: row;
  /* overflow:hidden clips the map panel while it is animating in */
  overflow: hidden;
  border-radius: 20px 0 0 20px;
  box-shadow:
    -8px 0 40px rgba(0, 0, 0, 0.18),
    -2px 0 12px rgba(0, 119, 182, 0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition:
    transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.3s ease,
    width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    max-width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tvchat-sidebar.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

/* Expanded: both chat and map visible side-by-side */
.tvchat-sidebar.tv-map-open {
  width: 75vw;
  max-width: 1200px;
}

/* Tablet */
@media (max-width: 900px) {
  .tvchat-sidebar { width: 60vw; min-width: 320px; }
  .tvchat-sidebar.tv-map-open { width: 92vw; max-width: none; }
}

/* Mobile — full-screen single-column panel */
@media (max-width: 640px) {
  .tvchat-sidebar {
    right: 0;
    left: 0;
    width: 100vw;
    min-width: unset;
    max-width: 100vw;
    border-radius: 0;
    bottom: auto;
    flex-direction: column;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  .tvchat-sidebar.tv-map-open { width: 100vw; }
}

/* ---------- Chat Modal — flex child of sidebar ---------- */
.tvchat-modal {
  /* Takes all sidebar width by default */
  flex: 0 0 100%;
  height: 100%;
  min-height: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Open Sans', 'Raleway', system-ui, sans-serif;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* When map is open: chat occupies 40% of the sidebar */
.tvchat-sidebar.tv-map-open .tvchat-modal {
  flex: 0 0 40%;
  min-width: 280px;
  max-width: none;
  /* Thin separator between map (left) and chat (right) */
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

/* Mobile: chat takes all remaining space after map overlay */
@media (max-width: 640px) {
  .tvchat-modal {
    flex: 1;
    min-width: unset;
    max-width: 100%;
    border-left: none !important;
  }
}

/* .active kept for JS state-check compatibility — no visual rules needed */
.tvchat-modal.active {}

/* ---------- Modal Header ---------- */
.tvchat-modal-header {
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 14px;
  color: #fff;
  position: relative;
  flex-shrink: 0;
}

.tvchat-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.tvchat-avatar {
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.tvchat-header-text h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  letter-spacing: 0.02em;
}

.tvchat-header-text p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  opacity: 0.85;
}

.tvchat-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #00e5b4;
  border-radius: 50%;
  margin-right: 5px;
  box-shadow: 0 0 0 2px rgba(0, 229, 180, 0.35);
  animation: tvchat-pulse 2s infinite;
}

.tvchat-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.tvchat-close-btn:hover { background: rgba(255, 255, 255, 0.35); }

/* ---------- Quick Action Chips ---------- */
.tvchat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 12px;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.tvchat-chip {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  font-family: 'Open Sans', sans-serif;
}

.tvchat-chip:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* ---------- Welcome Message ---------- */
.tvchat-welcome {
  background: #fef9f0;
  border: 1px solid #fde8c0;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 12px 12px 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #2d2d2d;
  flex-shrink: 0;
  animation: tvchat-bubble-in 0.25s ease;
}

.tvchat-welcome-title {
  font-weight: 700;
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #1a1a1a;
}

.tvchat-welcome ul {
  margin: 0 0 8px;
  padding-left: 18px;
  columns: 2;
}

.tvchat-welcome ul li {
  margin-bottom: 3px;
  font-weight: 600;
  font-size: 0.82rem;
  break-inside: avoid;
}

.tvchat-welcome-footer {
  font-size: 0.78rem;
  color: #666;
  margin: 0;
}

/* ---------- Messages Area ---------- */
.tvchat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  scroll-behavior: smooth;
}

.tvchat-messages::-webkit-scrollbar { width: 4px; }
.tvchat-messages::-webkit-scrollbar-track { background: #f8fafc; }
.tvchat-messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

/* ---------- Message Bubbles ---------- */
.tvchat-msg {
  max-width: 84%;
  min-width: 72px;          /* prevents timestamp cropping on very short messages */
  padding: 10px 14px 18px;   /* extra bottom room for timestamp */
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.6;
  word-break: break-word;
  animation: tvchat-bubble-in 0.22s ease;
  position: relative;
}

/* Timestamp badge shown in the bottom corner of each bubble */
.tvchat-msg-time {
  position: absolute;
  bottom: 4px;
  font-size: 0.6rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.01em;
  pointer-events: none;
  white-space: nowrap;
}
.tvchat-msg-user     .tvchat-msg-time { right: 10px; color: rgba(255,255,255,0.62); }
.tvchat-msg-assistant .tvchat-msg-time { right: 10px; color: #94a3b8; }

@keyframes tvchat-bubble-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tvchat-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.tvchat-msg-assistant {
  align-self: flex-start;
  background: #f1f5f9;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}

/* ---------- Markdown Rendered Content (marked.js output) ---------- */
.tvchat-md {
  white-space: normal; /* override pre-wrap — marked generates real HTML */
  font-size: 0.84rem; /* body copy — headings below use rem so they read clearly larger */
  line-height: 1.62;
  color: #1e293b;
}
.tvchat-md > *:first-child { margin-top: 0; }
.tvchat-md > *:last-child  { margin-bottom: 0; }

.tvchat-md h1, .tvchat-md h2, .tvchat-md h3, .tvchat-md h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.28;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.tvchat-md h1 {
  font-size: 1.22rem;
  margin: 4px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}
.tvchat-md h2 {
  font-size: 1.1rem;
  margin: 14px 0 8px;
  font-weight: 800;
}
.tvchat-md h3 {
  font-size: 0.98rem;
  margin: 12px 0 6px;
  font-weight: 700;
  color: #0369a1;
}
.tvchat-md h4 {
  font-size: 0.9rem;
  margin: 10px 0 5px;
  font-weight: 700;
  color: #334155;
}

.tvchat-md p {
  margin: 6px 0;
  line-height: 1.65;
  font-size: 0.84rem;
  font-weight: 400;
  color: #334155;
}
.tvchat-md p:first-child { margin-top: 0; }

/* Venue / emphasis inside body text — smaller than real headings */
.tvchat-md p strong,
.tvchat-md li strong {
  font-weight: 700;
  color: #0f172a;
}

.tvchat-md ul, .tvchat-md ol {
  margin: 6px 0;
  padding-left: 20px;
  font-size: 0.84rem;
}
.tvchat-md ul { list-style-type: disc; }
.tvchat-md ol { list-style-type: decimal; }
.tvchat-md li {
  margin-bottom: 6px;
  line-height: 1.6;
  color: #334155;
}
.tvchat-md li > ul, .tvchat-md li > ol {
  margin: 3px 0;
}

.tvchat-md strong { font-weight: 700; color: inherit; }
.tvchat-md em    { font-style: italic; }

.tvchat-md code {
  background: rgba(0, 119, 182, 0.08);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.83em;
  color: #0077b6;
}
.tvchat-md pre {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 8px 0;
}
.tvchat-md pre code {
  background: none;
  padding: 0;
  color: #1e293b;
  font-size: 0.82em;
}

.tvchat-md a {
  color: #0077b6;
  text-decoration: underline;
  word-break: break-all;
}
.tvchat-md a:hover { color: #023e8a; }

/* Itinerary assistant bubbles: stronger day / time-block hierarchy */
.tvchat-itin-msg.tvchat-md h2 {
  font-size: 1.12rem;
  margin-top: 18px;
  padding: 4px 0 4px 10px;
  border-left: 4px solid #0ea5e9;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.08), transparent 85%);
  border-radius: 0 8px 8px 0;
}
.tvchat-itin-msg.tvchat-md h2:first-child,
.tvchat-itin-md-section h2:first-child {
  margin-top: 0;
}
.tvchat-itin-msg.tvchat-md h3 {
  font-size: 0.98rem;
  margin-top: 12px;
  padding-left: 8px;
  border-left: 3px solid #bae6fd;
  color: #0369a1;
}

.tvchat-md hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 10px 0;
}

.tvchat-md blockquote {
  border-left: 3px solid #0077b6;
  padding: 4px 0 4px 12px;
  margin: 8px 0;
  color: #475569;
  font-style: italic;
  background: rgba(0, 119, 182, 0.04);
  border-radius: 0 6px 6px 0;
}

.tvchat-md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin: 8px 0;
}
.tvchat-md th, .tvchat-md td {
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  text-align: left;
}
.tvchat-md th {
  background: #f1f5f9;
  font-weight: 700;
}

/* ---------- Typing Indicator ---------- */
.tvchat-typing {
  display: none;
  align-self: flex-start;
  background: #f1f5f9;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  gap: 5px;
  align-items: center;
  animation: tvchat-bubble-in 0.2s ease;
}
.tvchat-typing.visible { display: flex; }
.tvchat-typing span {
  display: block;
  width: 8px;
  height: 8px;
  background: #94a3b8;
  border-radius: 50%;
  animation: tvchat-bounce 1.3s ease-in-out infinite;
}
.tvchat-typing span:nth-child(2) { animation-delay: 0.18s; }
.tvchat-typing span:nth-child(3) { animation-delay: 0.36s; }

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

/* =========================================================
   FLIGHT CARDS — Rich Design (Booking.com data structure)
   ========================================================= */
.tvchat-flight-block {
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
  animation: tvchat-bubble-in 0.22s ease;
}

.tvchat-flight-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ---- Base card shell ---- */
.tvchat-fc {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  font-family: 'Open Sans', system-ui, sans-serif;
  transition: box-shadow 0.2s;
}
.tvchat-fc:hover {
  box-shadow: 0 6px 24px rgba(0, 119, 182, 0.13);
}

/* ---- Top badge strip ---- */
.tvchat-fc-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 0;
}

.tvchat-fc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tvchat-fc-badge-best   { background: #dcfce7; color: #16a34a; }
.tvchat-fc-badge-deal   { background: #fef3c7; color: #d97706; }
.tvchat-fc-badge-round  { background: #e0f2fe; color: #0369a1; }

/* ---- Airline header row ---- */
.tvchat-fc-airline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #f1f5f9;
}

.tvchat-fc-logo {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.tvchat-fc-logo-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.tvchat-fc-airline-info {
  flex: 1;
  min-width: 0;
}
.tvchat-fc-airline-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.tvchat-fc-airline-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 1px;
}

.tvchat-fc-trip-type {
  font-size: 0.7rem;
  font-weight: 600;
  color: #0077b6;
  background: #eff6ff;
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* ---- Segment (outbound / return) ---- */
.tvchat-fc-segment {
  padding: 12px 14px 10px;
  border-bottom: 1px dashed #e2e8f0;
}
.tvchat-fc-segment:last-of-type { border-bottom: none; }

.tvchat-fc-seg-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tvchat-fc-seg-label.outbound { color: #0077b6; }
.tvchat-fc-seg-label.return   { color: #7c3aed; }

.tvchat-fc-seg-label .seg-date {
  font-size: 0.7rem;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 6px;
  letter-spacing: 0;
  text-transform: none;
}

/* Time row */
.tvchat-fc-times {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tvchat-fc-time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}
.tvchat-fc-time {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.tvchat-fc-airport-code {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-top: 2px;
}
.tvchat-fc-city-name {
  font-size: 0.66rem;
  color: #94a3b8;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58px;
}

.tvchat-fc-path {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  padding: 0 4px;
}
.tvchat-fc-duration {
  font-size: 0.7rem;
  font-weight: 600;
  color: #334155;
}
.tvchat-fc-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #cbd5e1 0%, #64748b 50%, #cbd5e1 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tvchat-fc-plane-icon {
  font-size: 13px;
  color: #0077b6;
  position: absolute;
  background: #fff;
  padding: 0 2px;
}
.tvchat-fc-stops-label {
  font-size: 0.66rem;
  color: #6b7280;
}
.tvchat-fc-stops-label.nonstop { color: #16a34a; font-weight: 600; }
.tvchat-fc-stop-cities {
  font-size: 0.62rem;
  color: #94a3b8;
  text-align: center;
}

/* ---- Baggage row ---- */
.tvchat-fc-baggage {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  font-size: 0.72rem;
  color: #475569;
}
.tvchat-fc-bag-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tvchat-fc-bag-icon { font-size: 13px; }

/* ---- Footer: price + reserve ---- */
.tvchat-fc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  gap: 10px;
}

.tvchat-fc-price-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.tvchat-fc-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.tvchat-fc-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.tvchat-fc-price-strike {
  font-size: 0.78rem;
  color: #9ca3af;
  text-decoration: line-through;
}
.tvchat-fc-price-label {
  font-size: 0.67rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}
.tvchat-fc-per-adult {
  font-size: 0.72rem;
  color: #475569;
  margin-top: 2px;
}
.tvchat-fc-deal-tag {
  font-size: 0.66rem;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  border-radius: 4px;
  padding: 2px 6px;
}

/* footer buttons group */
.tvchat-fc-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.tvchat-fc-reserve {
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  text-align: center;
}
.tvchat-fc-reserve:hover {
  background: #1e3a5f;
  transform: translateY(-1px);
}

.tvchat-fc-details-btn {
  background: #fff;
  color: #0077b6;
  border: 1.5px solid #0077b6;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
  text-align: center;
}
.tvchat-fc-details-btn:hover {
  background: #0077b6;
  color: #fff;
  transform: translateY(-1px);
}

/* =================================================================
   FLIGHT DETAILS MODAL
================================================================= */
.tvfd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10001;
  backdrop-filter: blur(3px);
  animation: tvchat-fade-in 0.2s ease;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tvfd-overlay.active {
  display: flex;
}

/* The detail panel */
.tvfd-panel {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  animation: tvfd-slide-in 0.3s cubic-bezier(0.34,1.2,0.64,1);
  font-family: 'Open Sans', 'Raleway', system-ui, sans-serif;
}
@keyframes tvfd-slide-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);     }
}

/* gradient header */
.tvfd-header {
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  padding: 18px 20px 16px;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}
.tvfd-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.tvfd-airline-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255,255,255,0.9);
  border: 2px solid rgba(255,255,255,0.4);
  padding: 3px;
  flex-shrink: 0;
}
.tvfd-airline-logo-ph {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.tvfd-airline-text h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Raleway', sans-serif;
}
.tvfd-airline-text p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  opacity: 0.85;
}
.tvfd-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.tvfd-close:hover { background: rgba(255,255,255,0.35); }

/* badge strip inside header */
.tvfd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tvfd-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tvfd-badge-best  { background: rgba(255,255,255,0.9); color: #16a34a; }
.tvfd-badge-deal  { background: #fef3c7; color: #d97706; }
.tvfd-badge-round { background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.4); }

/* scrollable body */
.tvfd-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.tvfd-body::-webkit-scrollbar { width: 4px; }
.tvfd-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

/* section dividers */
.tvfd-section {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}
.tvfd-section:last-child { border-bottom: none; }

.tvfd-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tvfd-section-title.outbound { color: #0077b6; }
.tvfd-section-title.return   { color: #7c3aed; }
.tvfd-section-title.pricing  { color: #0f172a; }
.tvfd-section-title.baggage  { color: #0f172a; }

.tvfd-section-title .tvfd-date-chip {
  font-size: 0.72rem;
  background: #f1f5f9;
  color: #334155;
  border-radius: 5px;
  padding: 2px 8px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

/* route timeline */
.tvfd-route {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.tvfd-endpoint {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}
.tvfd-big-time {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}
.tvfd-iata {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-top: 3px;
}
.tvfd-city {
  font-size: 0.68rem;
  color: #94a3b8;
  text-align: center;
  max-width: 80px;
}
.tvfd-airport-name {
  font-size: 0.62rem;
  color: #b0bec5;
  text-align: center;
  max-width: 90px;
  margin-top: 1px;
}

.tvfd-path {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.tvfd-path-duration {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}
.tvfd-path-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #cbd5e1 0%, #64748b 50%, #cbd5e1 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tvfd-path-plane {
  font-size: 14px;
  color: #0077b6;
  background: #fff;
  padding: 0 3px;
  position: absolute;
}
.tvfd-path-stops {
  font-size: 0.7rem;
  font-weight: 600;
}
.tvfd-path-stops.nonstop { color: #16a34a; }
.tvfd-path-stops.hasstop { color: #ef4444; }
.tvfd-path-via {
  font-size: 0.66rem;
  color: #64748b;
}

/* leg detail table (for multi-stop) */
.tvfd-legs {
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}
.tvfd-leg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.78rem;
}
.tvfd-leg:last-child { border-bottom: none; }
.tvfd-leg-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.tvfd-leg-info { flex: 1; }
.tvfd-leg-route {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}
.tvfd-leg-times {
  color: #475569;
  margin-bottom: 2px;
}
.tvfd-leg-carrier {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  margin-top: 3px;
}
.tvfd-leg-carrier img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
}

/* layover chip */
.tvfd-layover {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fef9f0;
  border-left: 3px solid #f59e0b;
  font-size: 0.72rem;
  color: #92400e;
  font-weight: 600;
}
.tvfd-layover-icon { font-size: 14px; }

/* baggage section */
.tvfd-baggage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tvfd-bag-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tvfd-bag-icon-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
}
.tvfd-bag-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}
.tvfd-bag-detail {
  font-size: 0.68rem;
  color: #64748b;
}

/* pricing section */
.tvfd-price-hero {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.tvfd-price-big {
  font-size: 1.6rem;
  font-weight: 900;
  color: #0f172a;
}
.tvfd-price-was {
  font-size: 0.9rem;
  color: #9ca3af;
  text-decoration: line-through;
}
.tvfd-price-save {
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  border-radius: 5px;
  padding: 2px 7px;
}
.tvfd-price-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}
.tvfd-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.78rem;
  border-bottom: 1px solid #f1f5f9;
}
.tvfd-price-row:last-child { border-bottom: none; }
.tvfd-price-row-label { color: #475569; }
.tvfd-price-row-value { font-weight: 700; color: #0f172a; }
.tvfd-price-row.total-row {
  background: #f1f5f9;
  font-size: 0.82rem;
}
.tvfd-price-row.total-row .tvfd-price-row-label { font-weight: 700; color: #0f172a; }
.tvfd-deal-disclaimer {
  margin-top: 6px;
  font-size: 0.67rem;
  color: #92400e;
  background: #fef3c7;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  gap: 5px;
  align-items: flex-start;
}

/* footer CTA */
.tvfd-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}
.tvfd-btn-reserve {
  flex: 1;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.tvfd-btn-reserve:hover { opacity: 0.92; transform: translateY(-1px); }
.tvfd-btn-close {
  background: #f1f5f9;
  color: #334155;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.tvfd-btn-close:hover { background: #e2e8f0; }

/* =========================================================
   HOTEL CARDS  — horizontal layout (photo left / details right)
   ========================================================= */
.tvchat-hotel-block {
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
  animation: tvchat-bubble-in 0.22s ease;
}

/* ── Card sync highlight ──────────────────────────────── */
.tvchat-hc.is-selected {
  outline: 2px solid rgba(0, 119, 182, 0.9);
  box-shadow: 0 10px 28px rgba(0, 119, 182, 0.18);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════
   RESTAURANT MAP PANEL — slides in alongside chat modal
   Uses Leaflet.js + OpenStreetMap (no API key required)
   ══════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════════
   MAP PANEL — flex child of .tvchat-sidebar
   Default : hidden (flex: 0, zero width)
   tv-map-open on sidebar → expands to fill available space
   ══════════════════════════════════════════════════════════ */
.tvchat-map-panel {
  /* Collapsed: takes no space */
  flex: 0;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  /* Containing block for the absolute-positioned detail overlay */
  position: relative;
  /* Thin right border = separator between map and chat */
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  /* Width expansion is driven by the sidebar's width transition */
}

/* When sidebar expands, map panel grows to fill extra space */
.tvchat-sidebar.tv-map-open .tvchat-map-panel {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Mobile: map panel pops out as a full-screen fixed overlay above chat */
@media (max-width: 640px) {
  .tvchat-map-panel {
    position: fixed !important;
    inset: 0;
    z-index: 10001;
    flex: none;
    border-right: none;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
  }
  .tvchat-sidebar.tv-map-open .tvchat-map-panel {
    transform: translateY(0);
    opacity: 1;
    flex: none;
  }
}

/* Suppress page overlay when both panels fill the screen */
body.tv-map-open .tvchat-overlay {
  display: none !important;
}

/* Panel header bar */
.tvchat-map-panel-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  flex-shrink: 0;
}
.tvchat-map-panel-icon { font-size: 1.1rem; flex-shrink: 0; }
.tvchat-map-panel-ttl {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  letter-spacing: 0.01em;
}
.tvchat-map-panel-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.tvchat-map-panel-close:hover { background: rgba(255, 255, 255, 0.35); }

/* Leaflet map fills remaining height */
/* Body: fills remaining map-panel height (Leaflet map lives here) */
.tvchat-map-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.tvchat-map-leaflet {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

/* ── Map Detail Panel ────────────────────────────────────────
   Positioned relative to .tvchat-map-panel (which has position:
   relative). z-index 1500 ensures it sits above all Leaflet
   panes (max z-index ~1000 inside the map container).
   ─────────────────────────────────────────────────────────── */
.tvchat-map-detail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  transform: translateX(101%);
  transition: transform 0.34s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}
.tvchat-map-detail.active {
  transform: translateX(0);
}
/* Topbar with back button */
.tvchat-md-topbar {
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.tvchat-md-back {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
  letter-spacing: 0.01em;
}
.tvchat-md-back:hover { background: rgba(255,255,255,0.28); }
/* ── Loading state ──────────────────────────────────────── */
.tvchat-md-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #64748b;
}
.tvchat-md-spinner {
  width: 38px; height: 38px;
  border: 3px solid #e2e8f0;
  border-top-color: #0077b6;
  border-radius: 50%;
  animation: tvmd-spin 0.75s linear infinite;
}
@keyframes tvmd-spin { to { transform: rotate(360deg); } }
.tvchat-md-loading-text { font-size: 0.84rem; margin: 0; }

/* ── Scrollable content area ────────────────────────────── */
.tvchat-md-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════
   PHOTO GALLERY
   ══════════════════════════════════════════════════════════ */
.tvchat-md-gallery {
  display: flex;
  height: 225px;
  overflow: hidden;
  background: #0f172a;
  flex-shrink: 0;
  position: relative;
}
/* main image wrapper */
.tvchat-md-gallery-main-wrap {
  flex: 1; min-width: 0;
  position: relative; overflow: hidden; cursor: pointer;
}
.tvchat-md-gallery-main {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.35s ease;
}
.tvchat-md-gallery-main-wrap:hover .tvchat-md-gallery-main { transform: scale(1.04); }
/* "View all" badge */
.tvchat-md-gallery-badge {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  color: #fff; font-size: 0.7rem; font-weight: 600;
  padding: 3px 10px 3px 7px; border-radius: 20px;
  display: flex; align-items: center; gap: 5px;
  pointer-events: none; letter-spacing: 0.02em;
}
/* thumbnail strip */
.tvchat-md-gallery-strip {
  width: 80px; display: flex; flex-direction: column;
  gap: 2px; flex-shrink: 0; overflow: hidden;
}
.tvchat-md-gallery-thumb-wrap {
  flex: 1; min-height: 0;
  position: relative; overflow: hidden; cursor: pointer;
}
.tvchat-md-gallery-thumb {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: brightness(0.72);
  transition: filter 0.18s, transform 0.22s;
}
.tvchat-md-gallery-thumb-wrap:hover .tvchat-md-gallery-thumb {
  filter: brightness(1); transform: scale(1.06);
}
/* "+N more" overlay on last thumbnail */
.tvchat-md-gallery-more {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.52);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.82rem; font-weight: 700;
  pointer-events: none;
}
.tvchat-md-gallery-none {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #64748b;
}

/* ══════════════════════════════════════════════════════════
   BODY / NAME / RATING
   ══════════════════════════════════════════════════════════ */
.tvchat-md-body { padding: 14px 16px 32px; }
.tvchat-md-name {
  font-size: 1.15rem; font-weight: 800; color: #0f172a;
  margin: 0 0 8px; line-height: 1.3;
}
.tvchat-md-rating-row {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; margin-bottom: 6px;
}
.tvchat-md-stars { color: #f59e0b; font-size: 1.05rem; letter-spacing: 1.5px; }
.tvchat-md-rating-num   { font-weight: 800; font-size: 0.92rem; color: #0f172a; }
.tvchat-md-review-count { font-size: 0.74rem; color: #64748b; }
.tvchat-md-price-pill {
  display: inline-flex; align-items: center; gap: 3px;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  color: #334155; font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; letter-spacing: 0.02em;
}
.tvchat-md-status-row { margin-bottom: 12px; }
.tvchat-md-status { font-size: 0.8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.tvchat-md-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.tvchat-md-status.open  { color: #16a34a; }
.tvchat-md-status.open::before  { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.2); }
.tvchat-md-status.closed{ color: #dc2626; }
.tvchat-md-status.closed::before{ background: #dc2626; }
/* Editorial summary */
.tvchat-md-summary {
  font-size: 0.81rem; color: #334155; line-height: 1.65;
  background: #eff6ff; border-left: 3px solid #3b82f6;
  padding: 9px 12px; border-radius: 0 10px 10px 0;
  margin: 0 0 16px; font-style: italic;
}

/* ══════════════════════════════════════════════════════════
   SECTION HEADER (shared)
   ══════════════════════════════════════════════════════════ */
.tvchat-md-section-hdr {
  font-size: 0.82rem; font-weight: 700; color: #0f172a;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}

/* ══════════════════════════════════════════════════════════
   CONTACT INFO CARD
   ══════════════════════════════════════════════════════════ */
.tvchat-md-info-card {
  background: #fff;
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
/* each row inside the card */
.tvchat-md-info-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none; color: inherit;
  transition: background 0.15s;
}
.tvchat-md-info-item:last-child { border-bottom: none; }
.tvchat-md-info-item:hover { background: #f8fafc; }
/* colored icon chip */
.tvchat-md-info-chip {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; flex-shrink: 0;
}
.tvchat-md-info-chip.addr  { background: #dbeafe; }
.tvchat-md-info-chip.phone { background: #dcfce7; }
.tvchat-md-info-chip.web   { background: #ede9fe; }
.tvchat-md-info-texts { min-width: 0; flex: 1; }
.tvchat-md-info-label {
  font-size: 0.66rem; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1px;
}
.tvchat-md-info-value {
  font-size: 0.8rem; color: #1e293b; line-height: 1.45; word-break: break-word;
}
.tvchat-md-info-link { color: #0077b6; text-decoration: none; }
.tvchat-md-info-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════
   OPENING HOURS BADGES
   ══════════════════════════════════════════════════════════ */
.tvchat-md-hours-section { margin-bottom: 18px; }
.tvchat-md-hours-grid {
  display: flex; flex-direction: column; gap: 4px;
}
.tvchat-md-hours-badge {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; border-radius: 9px;
  background: #f8fafc; border: 1px solid #e4eaf2;
  transition: background 0.15s;
}
.tvchat-md-hours-badge.tv-today {
  background: #eff6ff; border-color: #bfdbfe;
}
.tvchat-md-hours-day {
  font-size: 0.76rem; font-weight: 700; color: #475569; min-width: 86px;
}
.tvchat-md-hours-badge.tv-today .tvchat-md-hours-day { color: #1d4ed8; }
.tvchat-md-hours-time { font-size: 0.75rem; color: #64748b; text-align: right; }
.tvchat-md-hours-badge.tv-today .tvchat-md-hours-time { color: #2563eb; font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   MINI EMBEDDED OSM MAP
   ══════════════════════════════════════════════════════════ */
.tvchat-md-minimap-wrap {
  width: 100%; height: 160px;
  border-radius: 14px; overflow: hidden;
  margin-bottom: 14px; border: 1px solid #e4eaf2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.tvchat-md-minimap { width: 100%; height: 100%; border: none; display: block; }

/* ══════════════════════════════════════════════════════════
   ACTION BUTTONS
   ══════════════════════════════════════════════════════════ */
.tvchat-md-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.tvchat-md-directions-btn,
.tvchat-md-gmaps-btn {
  flex: 1; min-width: 130px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px; border-radius: 11px;
  font-size: 0.8rem; font-weight: 700;
  text-decoration: none; text-align: center;
  transition: opacity 0.15s, transform 0.12s, box-shadow 0.15s; white-space: nowrap;
}
.tvchat-md-directions-btn {
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff; box-shadow: 0 3px 10px rgba(0,119,182,0.3);
}
.tvchat-md-gmaps-btn {
  background: #fff; color: #0f172a;
  border: 1.5px solid #e4eaf2; box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.tvchat-md-directions-btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,119,182,0.4); }
.tvchat-md-gmaps-btn:hover      { background: #f8fafc; transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════════
   REVIEWS SECTION
   ══════════════════════════════════════════════════════════ */
.tvchat-md-reviews-section { margin-top: 4px; }
.tvchat-md-reviews-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tvchat-md-reviews-hdr .tvchat-md-section-title { margin-bottom: 0; }
.tvchat-md-reviews-count {
  font-size: 0.7rem; color: #64748b; background: #f1f5f9;
  border: 1px solid #e2e8f0; border-radius: 20px; padding: 2px 9px;
  white-space: nowrap;
}
.tvchat-md-section-title { font-size: 0.88rem; font-weight: 700; color: #0f172a; margin-bottom: 12px; }
.tvchat-md-load-more {
  display: block; width: 100%; margin-top: 12px;
  padding: 9px 16px; border-radius: 10px; border: 1.5px dashed #cbd5e1;
  background: #f8fafc; color: #0077b6; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: background 0.18s, border-color 0.18s, color 0.18s;
  text-align: center; letter-spacing: 0.2px;
}
.tvchat-md-load-more:hover {
  background: #eff6ff; border-color: #93c5fd; color: #023e8a;
}
.tvchat-md-reviews-list { display: flex; flex-direction: column; gap: 10px; }
.tvchat-md-review {
  background: #f8fafc; border-radius: 12px;
  padding: 11px 13px; border: 1px solid #e4eaf2;
}
.tvchat-md-rv-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.tvchat-md-rv-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff; font-size: 0.9rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tvchat-md-rv-info   { min-width: 0; flex: 1; }
.tvchat-md-rv-author { font-size: 0.8rem; font-weight: 700; color: #0f172a; margin-bottom: 3px; }
.tvchat-md-rv-meta   { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tvchat-md-rv-stars  { color: #f59e0b; font-size: 0.8rem; letter-spacing: 0.5px; }
.tvchat-md-rv-time   { font-size: 0.68rem; color: #94a3b8; }
.tvchat-md-rv-text   {
  font-size: 0.78rem; color: #334155; line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   IMAGE LIGHTBOX (position: fixed covers full viewport)
   ══════════════════════════════════════════════════════════ */
.tvchat-md-lightbox {
  position: fixed; inset: 0; z-index: 999999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}
.tvchat-md-lightbox.active { opacity: 1; pointer-events: all; }
.tvchat-md-lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 6, 23, 0.94);
  cursor: pointer;
}
.tvchat-md-lb-stage {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  max-width: 92vw; max-height: 88vh;
}
.tvchat-md-lb-img {
  max-width: 88vw; max-height: 82vh;
  object-fit: contain; display: block;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  transition: opacity 0.15s;
}
/* close button */
.tvchat-md-lb-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.tvchat-md-lb-close:hover { background: rgba(255,255,255,0.28); }
/* prev / next */
.tvchat-md-lb-prev,
.tvchat-md-lb-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; font-size: 1.8rem; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
  line-height: 1;
}
.tvchat-md-lb-prev { left: 14px; }
.tvchat-md-lb-next { right: 14px; }
.tvchat-md-lb-prev:hover,
.tvchat-md-lb-next:hover { background: rgba(255,255,255,0.28); }
.tvchat-md-lb-prev:disabled,
.tvchat-md-lb-next:disabled { opacity: 0.25; cursor: default; }
/* counter badge */
.tvchat-md-lb-counter {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 0.78rem; font-weight: 600;
  padding: 4px 16px; border-radius: 20px; letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Leaflet numbered pin markers ── */
.tvchat-lf-icon { background: none; border: none; }
.tvchat-lf-marker {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  border: 2.5px solid #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  font-family: 'Open Sans', sans-serif;
  cursor: pointer;
  transition: transform 0.15s;
}
.tvchat-lf-marker:hover { transform: scale(1.18); }
.tvchat-lf-marker.active {
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  transform: scale(1.15);
}
/* Direction A/B markers */
.tvchat-lf-dir-a {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
  font-size: 13px !important; font-weight: 900 !important;
}
.tvchat-lf-dir-b {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  font-size: 13px !important; font-weight: 900 !important;
}

/* ── Leaflet popup overrides ── */
.tvchat-lf-popup .leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  padding: 0;
  overflow: hidden;
}
.tvchat-lf-popup .leaflet-popup-content { margin: 0; width: auto !important; }
.tvchat-lf-popup .leaflet-popup-tip { background: #fff; }
.tvchat-lf-popup-inner {
  font-family: 'Open Sans', system-ui, sans-serif;
  min-width: 200px;
  max-width: 260px;
}
.tvchat-lf-popup-photo { width: 100%; height: 120px; object-fit: cover; display: block; }
.tvchat-lf-popup-body { padding: 10px 12px 12px; }
.tvchat-lf-popup-name { font-weight: 800; font-size: 0.95rem; color: #0f172a; margin: 0 0 4px; }
.tvchat-lf-popup-meta { font-size: 0.78rem; color: #475569; margin: 2px 0; }
.tvchat-lf-popup-more {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.tvchat-lf-popup-more:hover { opacity: 0.9; }

.tvchat-hotel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tvchat-cards-load-more {
  display: block; width: 100%; margin-top: 10px;
  padding: 8px 16px; border-radius: 10px; border: 1.5px dashed #cbd5e1;
  background: #f8fafc; color: #0077b6; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: background 0.18s, border-color 0.18s, color 0.18s;
  text-align: center; letter-spacing: 0.2px;
}
.tvchat-cards-load-more:hover { background: #eff6ff; border-color: #93c5fd; color: #023e8a; }

/* ── Directions card ───────────────────────────────────── */
.tvchat-dir-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  border: 1px solid #e2e8f0; box-shadow: 0 2px 10px rgba(0,0,0,.07);
  margin-top: 2px; font-size: 0.8rem;
}
.tvchat-dir-header {
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff; padding: 11px 14px 10px;
}
.tvchat-dir-route {
  font-size: 0.88rem; font-weight: 700; letter-spacing: 0.2px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.tvchat-dir-route-arrow { opacity: 0.75; font-size: 0.75rem; }
.tvchat-dir-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 6px; font-size: 0.72rem; opacity: 0.9;
}
.tvchat-dir-meta-pill {
  background: rgba(255,255,255,.18); border-radius: 20px;
  padding: 2px 8px; display: flex; align-items: center; gap: 4px;
}
.tvchat-dir-steps { padding: 10px 14px 4px; }
.tvchat-dir-steps-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: #64748b; margin-bottom: 8px;
}
.tvchat-dir-step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 7px 0; border-bottom: 1px solid #f1f5f9;
  line-height: 1.45;
}
.tvchat-dir-step:last-child { border-bottom: none; }
.tvchat-dir-step-icon {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; margin-top: 1px;
}
.tvchat-dir-step-icon.walk    { background: #f0fdf4; color: #16a34a; }
.tvchat-dir-step-icon.transit { background: #eff6ff; color: #0077b6; }
.tvchat-dir-step-icon.bus     { background: #fef3c7; color: #d97706; }
.tvchat-dir-step-icon.other   { background: #f8fafc; color: #64748b; }
.tvchat-dir-step-body { flex: 1; min-width: 0; }
.tvchat-dir-step-instruction { color: #0f172a; font-size: 0.8rem; }
.tvchat-dir-step-line {
  font-size: 0.7rem; color: #0077b6; font-weight: 600;
  margin-top: 2px; background: #eff6ff; border-radius: 4px;
  display: inline-block; padding: 1px 6px;
}
.tvchat-dir-step-sub { font-size: 0.68rem; color: #64748b; margin-top: 2px; }
.tvchat-dir-footer {
  padding: 8px 14px 11px; display: flex; gap: 8px; flex-wrap: wrap;
}
.tvchat-dir-map-btn, .tvchat-dir-gmaps-btn {
  flex: 1; min-width: 120px; padding: 7px 10px; border-radius: 8px;
  font-size: 0.74rem; font-weight: 600; text-align: center;
  text-decoration: none; cursor: pointer; border: none; transition: opacity .18s;
}
.tvchat-dir-map-btn  { background: #0077b6; color: #fff; }
.tvchat-dir-gmaps-btn { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.tvchat-dir-map-btn:hover, .tvchat-dir-gmaps-btn:hover { opacity: 0.85; }

/* ── Card shell ────────────────────────────────────────── */
.tvchat-hc {
  display: flex;
  flex-direction: row;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e4eaf2;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  font-family: 'Open Sans', system-ui, sans-serif;
  min-height: 170px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.tvchat-hc:hover {
  box-shadow: 0 6px 22px rgba(0, 119, 182, 0.13);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
}

/* ── Photo column (left) — carousel ─────────────────────── */
.tvchat-hc-photo-wrap {
  position: relative;
  width: 38%;
  min-width: 100px;
  flex-shrink: 0;
  overflow: hidden;
  background: #e2e8f0;
}

.tvchat-hc-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 170px;
  overflow: hidden;
}

.tvchat-hc-carousel-track {
  display: flex;
  flex-direction: row;
  height: 100%;
  transition: transform 0.3s ease;
}

.tvchat-hc-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
}

.tvchat-hc-photo {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.tvchat-hc-photo-wrap:hover .tvchat-hc-photo { transform: scale(1.04); }

/* Carousel arrows */
.tvchat-hc-carousel-prev,
.tvchat-hc-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.2s, transform 0.15s;
}

.tvchat-hc-carousel-prev:hover,
.tvchat-hc-carousel-next:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.tvchat-hc-carousel-prev { left: 6px; }
.tvchat-hc-carousel-next { right: 6px; }

.tvchat-hc-carousel-prev:disabled,
.tvchat-hc-carousel-next:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* Carousel dots */
.tvchat-hc-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}

.tvchat-hc-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.tvchat-hc-carousel-dot:hover { background: rgba(255, 255, 255, 0.9); }
.tvchat-hc-carousel-dot.active {
  background: #fff;
  transform: scale(1.25);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Deal badge overlaid on photo (bottom-left) */
.tvchat-hc-deal-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Preferred Plus badge overlaid on photo (top-right) */
.tvchat-hc-preferred-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

/* No-photo placeholder */
.tvchat-hc-no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #94a3b8;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* ── Content column (right) ───────────────────────────── */
.tvchat-hc-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tvchat-hc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px 8px;
}

/* Stars + review score row */
.tvchat-hc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1px;
}

.tvchat-hc-stars {
  color: #f59e0b;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  line-height: 1;
}

/* Review score badge e.g. "8.6 Excellent" */
.tvchat-hc-review-badge {
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Review count "(8,493 reviews)" */
.tvchat-hc-review-count {
  font-size: 0.64rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Hotel name — larger for readability */
.tvchat-hc-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Location + date lines */
.tvchat-hc-meta {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Free cancellation tag */
.tvchat-hc-free-cancel {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #059669;
  margin-top: 1px;
}

/* ── Card footer: price + reserve ──────────────────────── */
.tvchat-hc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafd;
  border-top: 1px solid #eef2f7;
  flex-shrink: 0;
}

.tvchat-hc-price-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

/* Crossed-out original price */
.tvchat-hc-price-strike {
  font-size: 0.66rem;
  color: #94a3b8;
  text-decoration: line-through;
  line-height: 1;
}

/* Current price */
.tvchat-hc-price-total {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.tvchat-hc-price-label {
  font-size: 0.62rem;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

.tvchat-hc-reserve {
  flex-shrink: 0;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tvchat-hc-reserve:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ── Hotel card: button group ──────────────────────────── */
.tvchat-hc-btn-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

/* ── Hotel card: "View Details" button ─────────────────── */
.tvchat-hc-details-btn {
  flex-shrink: 0;
  background: transparent;
  color: #0077b6;
  border: 1.5px solid #0077b6;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 0.01em;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.tvchat-hc-details-btn:hover {
  background: #0077b6;
  color: #fff;
  transform: translateY(-1px);
}

/* ── Hotel card: dates highlight row ──────────────────── */
.tvchat-hc-dates-highlight {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 5px 8px;
  margin-top: 3px;
}

.tvchat-hc-date-box {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.tvchat-hc-date-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tvchat-hc-date-val {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
}

.tvchat-hc-nights-pill {
  background: #0077b6;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* =========================================================
   "Show More" Button
   ========================================================= */
.tvchat-show-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  animation: tvchat-bubble-in 0.22s ease;
}

.tvchat-show-more-btn {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  color: #374151;
  padding: 9px 28px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tvchat-show-more-btn:hover {
  border-color: #0077b6;
  color: #0077b6;
  box-shadow: 0 4px 14px rgba(0, 119, 182, 0.15);
  transform: translateY(-1px);
}

.tvchat-show-more-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

/* ---------- Composer ---------- */
.tvchat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.tvchat-input {
  flex: 1;
  min-height: 42px;
  max-height: 160px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.86rem;
  line-height: 1.4;
  font-family: 'Open Sans', sans-serif;
  outline: none;
  resize: none;
  overflow-y: auto;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* iOS Safari auto-zoom prevention: the browser zooms in on any focusable field
   whose computed font-size is below 16 px. Override to 16 px on touch devices
   (the visual difference from 0.86rem is imperceptible at mobile scale). */
@media (max-width: 640px) {
  .tvchat-input {
    font-size: 16px;
  }
}
@supports (-webkit-touch-callout: none) {
  .tvchat-input {
    font-size: 16px;
  }
}

.tvchat-input:focus {
  border-color: #0077b6;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
  background: #fff;
}

.tvchat-input::placeholder { color: #94a3b8; }

.tvchat-send-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.32);
}

.tvchat-send-btn:hover { transform: scale(1.08); }
.tvchat-send-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.tvchat-powered {
  text-align: center;
  font-size: 0.67rem;
  color: #94a3b8;
  padding: 3px 0 7px;
  letter-spacing: 0.02em;
  margin: 0;
}

.tvchat-powered a { color: #0077b6; text-decoration: none; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .tvchat-fab {
    right: 0;
    top: auto;
    bottom: 0;
    transform: none;
    flex-direction: row;
    align-items: flex-end;
  }

  .tvchat-fab-inner {
    flex-direction: row;
    border-radius: 20px 0 0 0;
    padding: 12px 18px;
    gap: 8px;
  }

  .tvchat-fab-label {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 0.75rem;
  }

  .tvchat-fab-pulse { margin-top: 0; }
}

/* iOS Safari fallback for dynamic viewport issues */
@supports (-webkit-touch-callout: none) {
  .tvchat-sidebar {
    height: calc(var(--tvh) * 100);
    min-height: calc(var(--tvh) * 100);
    max-height: calc(var(--tvh) * 100);
  }
  @media (max-width: 640px) {
    .tvchat-sidebar {
      bottom: auto;
    }
  }
}

/* =========================================================
   HOTEL DETAILS MODAL
   ========================================================= */
.tvhd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  padding: 16px;
}

.tvhd-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.tvhd-panel {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  max-height: 96vh;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Open Sans', system-ui, sans-serif;
}

.tvhd-overlay.active .tvhd-panel {
  transform: scale(1) translateY(0);
}

/* =========================================================
   HOTEL DETAILS FULL PAGE LAYOUT
   ========================================================= */
.tvhd-page-main {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.18), transparent 55%),
    #0f172a0d;
  min-height: 100vh;
  padding: 40px 0 60px;
}

.tvhd-page-section .container {
  max-width: 1080px;
}

.tvhd-page-main .tvhd-panel {
  margin: 0 auto;
  max-width: 880px;
  max-height: none;
  min-height: 0;
  border-radius: 22px;
}

.tvhd-page-main .tvhd-body {
  max-height: calc(100vh - 360px);
}

@media (max-width: 768px) {
  .tvhd-page-main {
    padding-top: 16px;
  }
  .tvhd-page-main .tvhd-panel {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .tvhd-page-main .tvhd-body {
    max-height: none;
  }
}

/* ── Loading Skeleton ────────────────────────────────── */
.tvhd-skeleton {
  position: relative;
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  background: #fff;
}

.tvhd-skel-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 40px;
}

.tvhd-skel-title,
.tvhd-skel-sub,
.tvhd-skel-line,
.tvhd-skel-photo {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: tvhd-shimmer 1.5s infinite;
}

@keyframes tvhd-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.tvhd-skel-title  { height: 22px; width: 70%; }
.tvhd-skel-sub    { height: 14px; width: 45%; }
.tvhd-skel-photo  { height: 180px; border-radius: 0; }
.tvhd-skel-body   { padding: 0 18px; display: flex; flex-direction: column; gap: 10px; }
.tvhd-skel-line   { height: 13px; width: 90%; }
.tvhd-skel-line.short { width: 60%; }

/* ── Header ──────────────────────────────────────────── */
.tvhd-header {
  position: relative;
  padding: 16px 48px 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

.tvhd-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

.tvhd-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tvhd-badge-best {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
}

.tvhd-badge-deal {
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  color: #fff;
}

.tvhd-badge-pref {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
}

.tvhd-badge-free {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
}

.tvhd-accomtype {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 5px;
  padding: 2px 8px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.tvhd-urgency {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 4px 10px;
  margin-top: 6px;
  letter-spacing: 0.01em;
}

.tvhd-hotel-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  line-height: 1.35;
}

.tvhd-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tvhd-stars {
  color: #f59e0b;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}

.tvhd-review-badge {
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.tvhd-review-count {
  font-size: 0.64rem;
  color: #94a3b8;
}

.tvhd-location {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
}

.tvhd-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.tvhd-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ── Photos ──────────────────────────────────────────── */
.tvhd-photos {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

.tvhd-main-photo {
  width: 100%;
  height: clamp(200px, 38vh, 320px);
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.tvhd-thumb-strip {
  display: flex;
  gap: 2px;
  background: #1e293b;
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tvhd-thumb-strip::-webkit-scrollbar { display: none; }

.tvhd-thumb {
  width: 64px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.15s;
  border: 2px solid transparent;
}

.tvhd-thumb:hover {
  opacity: 1;
  transform: scale(1.04);
  border-color: #0077b6;
}

/* ── Scrollable body ─────────────────────────────────── */
.tvhd-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.tvhd-body::-webkit-scrollbar { width: 5px; }
.tvhd-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.tvhd-section {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.tvhd-section:last-child { border-bottom: none; }

.tvhd-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

/* — Stay Dates — */
.tvhd-date-grid {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tvhd-date-card {
  flex: 1;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.tvhd-date-card-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tvhd-date-card-value {
  font-size: 1rem;
  font-weight: 800;
  color: #0077b6;
}

.tvhd-date-card-time {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 2px;
}

.tvhd-nights-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  flex-shrink: 0;
  min-width: 52px;
  text-align: center;
}

.tvhd-nights-num {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.tvhd-nights-label {
  font-size: 0.6rem;
  font-weight: 600;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* — Price — */
.tvhd-price-hero {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tvhd-price-big {
  font-size: 1.7rem;
  font-weight: 900;
  color: #0f172a;
}

.tvhd-price-was {
  font-size: 0.9rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.tvhd-price-save {
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  border-radius: 5px;
  padding: 2px 8px;
}

.tvhd-price-rows {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.tvhd-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 13px;
  font-size: 0.8rem;
  border-bottom: 1px solid #f1f5f9;
}

.tvhd-price-row:last-child { border-bottom: none; }
.tvhd-price-row-label { color: #475569; }
.tvhd-price-row-value { font-weight: 700; color: #0f172a; }

.tvhd-price-row.total-row {
  background: #f1f5f9;
  font-size: 0.84rem;
}

.tvhd-price-row.total-row .tvhd-price-row-label { font-weight: 700; color: #0f172a; }

.tvhd-price-note {
  font-size: 0.67rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.tvhd-deal-note {
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border-radius: 6px;
  padding: 5px 10px;
}

.tvhd-local-price {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 8px;
  font-style: italic;
}

.tvhd-discount-val {
  color: #16a34a !important;
  font-weight: 700;
}

.tvhd-price-row-discount { background: #f0fdf4; }
.tvhd-price-row-charge   { background: #fff; }

/* — Highlights grid — */
.tvhd-highlights-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tvhd-highlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 4px 12px 4px 8px;
  font-size: 0.73rem;
  color: #0369a1;
  font-weight: 600;
}

.tvhd-highlight-icon { font-size: 0.92rem; }
.tvhd-highlight-name { white-space: nowrap; }

/* — Facilities grid — */
.tvhd-facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 7px;
}

.tvhd-facility-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.73rem;
  color: #334155;
}

.tvhd-facility-icon { font-size: 1rem; flex-shrink: 0; }
.tvhd-facility-name { font-weight: 600; line-height: 1.3; }

/* — Policies — */
.tvhd-policy-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tvhd-policy-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.78rem;
}

.tvhd-policy-icon {
  font-size: 0.88rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.tvhd-policy-text { color: #374151; }

.tvhd-policy-good .tvhd-policy-icon { color: #059669; }
.tvhd-policy-good .tvhd-policy-text { color: #065f46; font-weight: 600; }

/* — Room details — */
.tvhd-room-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tvhd-room-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 11px;
}

.tvhd-room-item-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.tvhd-room-item-text { color: #374151; line-height: 1.45; }

.tvhd-room-desc {
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.55;
  padding: 8px 0 0;
  border-top: 1px dashed #e2e8f0;
  margin-top: 4px;
  grid-column: 1 / -1;
}

.tvhd-room-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 6px;
  grid-column: 1 / -1;
}

.tvhd-room-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.67rem;
  font-weight: 600;
  color: #1d4ed8;
  white-space: nowrap;
}

/* — Info list — */
.tvhd-info-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tvhd-info-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.76rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 8px 10px;
}

.tvhd-info-icon { font-size: 0.9rem; flex-shrink: 0; margin-top: 1px; }
.tvhd-info-text { color: #78350f; line-height: 1.45; }

/* — Policy warn style — */
.tvhd-policy-warn .tvhd-policy-icon { color: #b45309; }
.tvhd-policy-warn .tvhd-policy-text { color: #92400e; }

/* ── Footer ──────────────────────────────────────────── */
.tvhd-footer {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.tvhd-btn-reserve {
  flex: 1;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}

.tvhd-btn-reserve:hover { opacity: 0.9; transform: translateY(-1px); }

.tvhd-btn-close {
  background: #f1f5f9;
  color: #334155;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.tvhd-btn-close:hover { background: #e2e8f0; }

@media (max-width: 640px) {
  .tvhd-panel {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 18px 18px 0 0;
    align-self: flex-end;
  }

  .tvhd-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 3 — TOUR CARDS
═══════════════════════════════════════════════════════════════ */
.tvchat-tour-card {
  display: flex;
  gap: 0;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: box-shadow .18s, transform .15s;
}
.tvchat-tour-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-2px); }

.tvchat-tour-photo-wrap {
  width: 118px;
  min-width: 118px;
  min-height: 104px;
  flex-shrink: 0;
  background: #f1f5f9;
  overflow: hidden;
}
.tvchat-tour-photo-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tvchat-tour-no-photo {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: #94a3b8;
}

.tvchat-tour-content {
  flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px;
}
.tvchat-tour-name {
  font-size: 0.87rem; font-weight: 700; color: #1e293b; line-height: 1.3; margin: 0;
}
.tvchat-tour-category {
  font-size: 0.72rem; color: #7c3aed; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em;
}
.tvchat-tour-meta {
  font-size: 0.75rem; color: #64748b; display: flex; flex-wrap: wrap; gap: 6px;
}
.tvchat-tour-meta span { display: flex; align-items: center; gap: 3px; }
.tvchat-tour-desc {
  font-size: 0.75rem; color: #475569; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tvchat-tour-footer {
  margin-top: 6px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
.tvchat-tour-price {
  font-size: 0.92rem; font-weight: 800; color: #0f172a;
}
.tvchat-tour-book-btn {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff; border: none; border-radius: 8px; padding: 5px 12px;
  font-size: 0.75rem; font-weight: 700; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: opacity .2s, transform .15s;
}
.tvchat-tour-book-btn:hover { opacity: .88; transform: translateY(-1px); }

.tvchat-tour-card.is-selected {
  outline: 2px solid rgba(0, 119, 182, 0.9);
  box-shadow: 0 10px 28px rgba(0, 119, 182, 0.18);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 3 — VISA CARD
═══════════════════════════════════════════════════════════════ */
.tvchat-visa-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.tvchat-visa-header {
  padding: 14px 16px 10px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
}
.tvchat-visa-route {
  font-size: 0.95rem; font-weight: 800; display: flex; align-items: center; gap: 8px;
}
.tvchat-visa-route-arrow { color: #60a5fa; font-size: 1.1rem; }
.tvchat-visa-purpose {
  font-size: 0.72rem; color: #94a3b8; margin-top: 2px; text-transform: capitalize;
}
.tvchat-visa-badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 20px; padding: 5px 14px; font-size: 0.82rem; font-weight: 700;
  margin: 10px 16px 0; border: 2px solid transparent;
}
.tvchat-visa-badge.free  { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.tvchat-visa-badge.required { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tvchat-visa-badge.arrival  { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
.tvchat-visa-badge.eta      { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.tvchat-visa-badge.unknown  { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }

.tvchat-visa-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.tvchat-visa-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.8rem; color: #334155; padding: 7px 10px;
  background: #f8fafc; border-radius: 8px;
}
.tvchat-visa-row-icon { font-size: 1rem; flex-shrink: 0; }
.tvchat-visa-row-label { font-weight: 600; color: #64748b; margin-bottom: 2px; font-size: 0.72rem; }
.tvchat-visa-row-value { color: #1e293b; }

.tvchat-visa-notes { padding: 0 16px 4px; }
.tvchat-visa-note {
  font-size: 0.74rem; color: #475569; padding: 5px 10px;
  background: #fefce8; border-left: 3px solid #fbbf24; border-radius: 0 6px 6px 0;
  margin-bottom: 5px;
}
.tvchat-visa-footer {
  padding: 10px 16px 14px; font-size: 0.72rem; color: #94a3b8;
  border-top: 1px solid #f1f5f9; display: flex; align-items: center; gap: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 3 — SAFETY CARD
═══════════════════════════════════════════════════════════════ */
.tvchat-safety-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.tvchat-safety-header {
  padding: 14px 16px 12px;
  display: flex; align-items: center; gap: 12px;
}
.tvchat-safety-header.risk-low    { background: linear-gradient(135deg,#064e3b,#065f46); }
.tvchat-safety-header.risk-medium { background: linear-gradient(135deg,#78350f,#92400e); }
.tvchat-safety-header.risk-high   { background: linear-gradient(135deg,#7f1d1d,#991b1b); }
.tvchat-safety-header.risk-critical { background: linear-gradient(135deg,#3b0764,#6b21a8); }
.tvchat-safety-header.risk-unknown  { background: linear-gradient(135deg,#0f172a,#1e293b); }
.tvchat-safety-risk-badge {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 20px; color: #fff; border: 1.5px solid rgba(255,255,255,.3);
  white-space: nowrap;
}
.tvchat-safety-dest {
  color: #fff; font-size: 1rem; font-weight: 700; flex: 1;
}
.tvchat-safety-summary {
  font-size: 0.8rem; color: #475569; line-height: 1.5;
  padding: 10px 16px; border-bottom: 1px solid #f1f5f9;
}

.tvchat-safety-section { padding: 10px 16px; border-bottom: 1px solid #f8fafc; }
.tvchat-safety-section-title {
  font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 7px; display: flex; align-items: center; gap: 5px;
}
.tvchat-safety-tip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.tvchat-safety-tip-list li {
  font-size: 0.78rem; color: #334155; padding: 5px 8px;
  background: #f8fafc; border-radius: 7px; border-left: 3px solid #60a5fa;
  line-height: 1.4;
}
.tvchat-safety-tip-list.danger li { border-left-color: #f87171; background: #fef2f2; }
.tvchat-safety-tip-list.warning li { border-left-color: #fbbf24; background: #fffbeb; }
.tvchat-safety-tip-list.health li { border-left-color: #34d399; background: #f0fdf4; }
.tvchat-safety-tip-list.law li { border-left-color: #a78bfa; background: #faf5ff; }

.tvchat-safety-emergency {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 16px;
}
.tvchat-safety-emrg-item {
  background: #f1f5f9; border-radius: 9px; padding: 8px 10px;
  font-size: 0.75rem; color: #334155;
}
.tvchat-safety-emrg-label { color: #64748b; font-size: 0.68rem; font-weight: 600; }
.tvchat-safety-emrg-num { font-size: 0.92rem; font-weight: 800; color: #0f172a; }

.tvchat-safety-footer {
  padding: 9px 16px 12px; font-size: 0.72rem; color: #94a3b8;
  display: flex; align-items: center; gap: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 3 — ITINERARY CARD + MAP PINS
═══════════════════════════════════════════════════════════════ */
.tvchat-itin-block {
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  animation: tvchat-bubble-in 0.22s ease;
}
.tvchat-itin-header {
  padding: 12px 16px;
  background: linear-gradient(135deg,#1e3a5f,#0369a1);
  color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.tvchat-itin-title { font-size: 0.95rem; font-weight: 800; flex: 1; }
.tvchat-itin-meta  { font-size: 0.72rem; color: #93c5fd; }

.tvchat-itin-map-btn-row {
  padding: 8px 16px; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; gap: 8px;
}
.tvchat-itin-view-map-btn {
  background: linear-gradient(135deg,#0369a1,#0ea5e9);
  color: #fff; border: none; border-radius: 8px; padding: 7px 14px;
  font-size: 0.78rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: opacity .2s, transform .15s;
}
.tvchat-itin-view-map-btn:hover { opacity: .88; transform: translateY(-1px); }
.tvchat-itin-pin-legend {
  display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.68rem; color: #64748b;
}
.tvchat-itin-legend-dot {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 3px;
}
.tvchat-itin-legend-dot.hotel      { background: #2563eb; }
.tvchat-itin-legend-dot.restaurant { background: #f97316; }
.tvchat-itin-legend-dot.attraction { background: #16a34a; }
.tvchat-itin-legend-dot.tour       { background: #7c3aed; }

/* ── Day selector ── */
.tvchat-itin-day-selector {
  display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px 4px;
  border-bottom: 1px solid #f1f5f9;
}
.tvchat-itin-day-btn {
  border: 1.5px solid #e2e8f0; background: #f8fafc; color: #475569;
  border-radius: 20px; padding: 4px 12px; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.tvchat-itin-day-btn.active {
  background: #0369a1; color: #fff; border-color: #0369a1;
}

/* ── Itinerary map container (reuses #tvLeafletMap) ── */
/* height set inline via JS */

/* ── Category-coloured Leaflet pins ── */
.tvchat-lf-itin-marker {
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.tvchat-lf-itin-marker.hotel      { background: #2563eb; }
.tvchat-lf-itin-marker.restaurant { background: #f97316; }
.tvchat-lf-itin-marker.attraction { background: #16a34a; }
.tvchat-lf-itin-marker.tour       { background: #7c3aed; }
.tvchat-lf-itin-marker-inner {
  transform: rotate(45deg); font-size: 0.6rem; color: #fff; font-weight: 800; line-height: 1;
}
.tvchat-lf-itin-popup .leaflet-popup-content { margin: 8px 12px; }
.tvchat-lf-itin-popup-name { font-size: 0.8rem; font-weight: 700; color: #1e293b; }
.tvchat-lf-itin-popup-meta { font-size: 0.7rem; color: #64748b; margin-top: 3px; }
.tvchat-lf-itin-popup-detail-btn {
  margin-top: 7px; background: #0369a1; color: #fff; border: none; border-radius: 6px;
  padding: 4px 10px; font-size: 0.7rem; font-weight: 700; cursor: pointer; width: 100%;
  transition: opacity .15s;
}
.tvchat-lf-itin-popup-detail-btn:hover { opacity: .85; }

/* ── Itinerary location card list ── */
.tvchat-itin-loc-list {
  padding: 8px 12px 12px;
}
.tvchat-itin-loc-day-header {
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: #64748b; padding: 10px 2px 5px;
  border-bottom: 1.5px solid #e2e8f0; margin-bottom: 8px;
}
/* Cards inside itinerary reuse .tvchat-hc but with colour left border */
.tvchat-itin-loc-list .tvchat-hc {
  margin-bottom: 8px;
  border-radius: 12px;
}
.tvchat-itin-loc-list .tvchat-hc.is-selected { background: #eff6ff; }

/* Day badge overlaid on top-left of the photo */
.tvchat-itin-day-badge {
  position: absolute; top: 7px; left: 7px; z-index: 2;
  background: rgba(15,23,42,0.72); color: #fff;
  font-size: 0.62rem; font-weight: 800; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 20px;
  pointer-events: none;
}

/* Inline itinerary: cards inside the assistant bubble + compact map bar */
.tvchat-itin-msg {
  max-width: 100%;
}
.tvchat-itin-msg-body {
  width: 100%;
}
.tvchat-itin-md-section {
  margin-bottom: 0.35rem;
}
.tvchat-itin-md-section + .tvchat-itin-inline-cards {
  margin-top: 8px;
}
/* One place card per row (full width), not side-by-side */
.tvchat-itin-inline-cards {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  margin: 6px 0 16px;
  width: 100%;
}
.tvchat-itin-inline-cards .tvchat-hc {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
  border: 1px solid rgba(226, 232, 240, 0.95);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.tvchat-itin-inline-cards .tvchat-hc:hover {
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.11);
  transform: translateY(-1px);
}
.tvchat-itin-inline-cards--more {
  margin-bottom: 8px;
}
.tvchat-itin-inline-more-hdr {
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  margin: 12px 0 8px;
  letter-spacing: .02em;
}
/* Map + summary strip — solid border-top accent (layered bg gradients can break in WebViews) */
.tvchat-itin-inline-toolbar {
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  margin: 8px 0 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #0ea5e9;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  animation: tvchat-bubble-in 0.22s ease;
  overflow: visible;
}
.tvchat-itin-inline-toolbar-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: space-between;
  gap: 10px 12px;
  width: 100%;
  min-height: 0;
}
.tvchat-itin-inline-map-btn.tvchat-itin-view-map-btn {
  margin: 0;
  flex: 1 1 160px;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  height: auto;
  align-self: center;
  box-sizing: border-box;
  line-height: 1.3;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(3, 105, 161, 0.2);
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}
.tvchat-itin-inline-map-btn.tvchat-itin-view-map-btn:hover {
  box-shadow: 0 3px 10px rgba(3, 105, 161, 0.26);
  opacity: 0.95;
  transform: none !important;
}
.tvchat-itin-inline-toolbar-meta {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex: 0 0 auto;
  gap: 6px;
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 7px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  line-height: 1.35;
  white-space: nowrap;
}
.tvchat-itin-inline-toolbar-meta::before {
  content: '📍';
  font-size: 0.78rem;
  line-height: 1;
  flex-shrink: 0;
}
