/* Swiss Cottage – Chatbot widget (Swiss Cottages AI style) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
:root {
  --hog-chat-bg: #000000;
  --hog-chat-accent: #1f2937;
  --hog-chat-light: #f7f7f8;
  --hog-chat-text: #2d333a;
  --hog-chat-border: #e5e5e5;
}

#chatbot-widget {
  --chatbot-primary-color: var(--hog-chat-accent);
  --chatbot-border-color: var(--hog-chat-border);
  --chatbot-text-color: var(--hog-chat-text);
  --chatbot-bg-color: #fff;
  --chatbot-gray-bg: #f3f4f6;
  --chatbot-gray-hover: #e8e4df;
  --chatbot-radius: 12px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}

#chatbot-widget *,
#chatbot-widget *::before,
#chatbot-widget *::after {
  box-sizing: border-box;
}

/* Backdrop when large window is open */
#chatbot-widget::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999998;
  display: none;
  pointer-events: auto;
  cursor: pointer;
}

#chatbot-widget.chatbot-fullscreen-active::before {
  display: block;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--hog-chat-bg);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
  position: relative;
  z-index: 999999;
}

.chatbot-toggle:hover {
  background: var(--hog-chat-bg);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chatbot-toggle svg {
  width: 28px;
  height: 28px;
}

.chatbot-toggle-buttons {
  display: flex !important;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
  position: relative;
  z-index: 1000000;
  pointer-events: auto;
}

.chatbot-whatsapp-toggle.chatbot-toggle {
  background: #25d366;
  text-decoration: none;
}

.chatbot-whatsapp-toggle.chatbot-toggle:hover {
  background: #20bd5a;
  color: #fff;
}

.chatbot-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.chatbot-chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.chatbot-chat-panel .chatbot-messages {
  flex: 1;
  min-height: 0;
}

.chatbot-call-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.chatbot-call-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.chatbot-call-wave-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #fff;
}

.chatbot-call-wave-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 40% at 30% 50%, rgba(192, 160, 128, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 70% 35% at 70% 50%, rgba(42, 42, 42, 0.06) 0%, transparent 50%);
}

.chatbot-call-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hog-chat-border);
  flex-shrink: 0;
}

.chatbot-call-close-btn {
  color: var(--hog-chat-text);
}

.chatbot-call-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--hog-chat-text);
}

.chatbot-call-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  gap: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--hog-chat-border);
  max-width: 300px;
}

.chatbot-call-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--hog-chat-text);
}

.chatbot-call-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--chatbot-gray-bg);
  border: 2px solid var(--hog-chat-border);
}

.chatbot-call-circle-waveform {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
}

.chatbot-call-circle.connected .chatbot-call-circle-waveform {
  display: flex;
}

.chatbot-call-circle-waveform .wave-bar {
  width: 4px;
  height: 30%;
  min-height: 4px;
  border-radius: 2px;
  background: var(--hog-chat-accent);
  animation: hog-call-wave 0.7s ease-in-out infinite;
}

.chatbot-call-circle-waveform .wave-bar:nth-child(1) { animation-delay: 0s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(2) { animation-delay: 0.05s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(3) { animation-delay: 0.1s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(4) { animation-delay: 0.15s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(5) { animation-delay: 0.2s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(6) { animation-delay: 0.25s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(7) { animation-delay: 0.3s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(8) { animation-delay: 0.35s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(9) { animation-delay: 0.4s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(10) { animation-delay: 0.45s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(11) { animation-delay: 0.5s; }
.chatbot-call-circle-waveform .wave-bar:nth-child(12) { animation-delay: 0.55s; }

@keyframes hog-call-wave {
  0%, 100% { height: 30%; }
  50% { height: 85%; }
}

.chatbot-call-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 220px;
}

.chatbot-call-btn {
  padding: 12px 18px;
  border-radius: var(--chatbot-radius);
  border: 1px solid var(--hog-chat-border);
  background: var(--chatbot-bg-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--hog-chat-text);
  transition: background 0.2s;
}

.chatbot-call-btn:not(:disabled):hover {
  background: var(--chatbot-gray-hover);
}

.chatbot-call-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chatbot-call-start:not(:disabled) {
  background: var(--hog-chat-bg);
  color: #fff;
  border-color: var(--hog-chat-bg);
}

.chatbot-call-start:not(:disabled):hover {
  opacity: 0.92;
}

.chatbot-input-container {
  padding: 14px 18px 16px;
  background: #fafaf8;
  border-top: 1px solid var(--hog-chat-border);
  flex-shrink: 0;
}

.chatbot-disclaimer {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #6b7280;
}

/* Compact (small) window — sits above stacked toggles (chat / voice / WhatsApp) */
#chatbot-window {
  display: none;
  position: absolute;
  bottom: 200px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 999999;
}

#chatbot-window.chatbot-open {
  display: flex;
}

/* Large window – centered panel */
#chatbot-window.chatbot-fullscreen {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  bottom: auto !important;
  right: auto !important;
  transform: translate(-50%, -50%) !important;
  width: 90vw !important;
  max-width: 900px !important;
  min-width: 320px !important;
  height: 85vh !important;
  max-height: 85vh !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35) !important;
}

#chatbot-window.chatbot-fullscreen .chatbot-messages {
  flex: 1;
  min-height: 0;
}

/* Header – dark Swiss Cottage bar */
.chatbot-header {
  background: var(--hog-chat-bg);
  color: #fff;
  padding: 12px 16px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  border-radius: 12px 12px 0 0;
}

#chatbot-window.chatbot-fullscreen .chatbot-header {
  border-radius: 12px 12px 0 0;
}

.chatbot-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chatbot-logo {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chatbot-logo svg {
  stroke: #fff;
}

.chatbot-header-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatbot-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.chatbot-icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.chatbot-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chatbot-icon-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

.chatbot-close-btn {
  font-size: 22px;
  line-height: 1;
  padding: 0;
}

/* Menu dropdown */
.chatbot-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 44px;
  margin-top: 6px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 6px;
  min-width: 200px;
  z-index: 1000;
}

.chatbot-menu-item {
  width: 100%;
  background: none;
  border: none;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hog-chat-text);
  font-size: 0.9rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.chatbot-menu-item:hover {
  background: var(--hog-chat-light);
}

.chatbot-menu-item svg {
  stroke: var(--hog-chat-text);
  flex-shrink: 0;
}

/* Welcome + suggestion cards (aligned with Quick_Replies in SwissCottage_Chatbot_Knowledge_Base.xlsx) */
.chatbot-welcome {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
}

.chatbot-welcome-content {
  width: 100%;
}

.chatbot-welcome-title {
  margin: 0 0 8px 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--hog-chat-text);
  line-height: 1.3;
}

.chatbot-welcome-description {
  margin: 0 0 20px 0;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.4;
}

.chatbot-suggestion-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.chatbot-suggestion-card {
  background: #fff;
  border: 1px solid var(--hog-chat-border);
  border-radius: 12px;
  padding: 14px 14px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  text-align: left;
}

.chatbot-suggestion-card:hover {
  border-color: var(--hog-chat-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  background: #fafaf8;
}

.chatbot-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chatbot-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--hog-chat-text);
  margin: 0;
  line-height: 1.35;
}

.chatbot-card-subtitle {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

/* Single column when widget is narrow / not fullscreen */
#chatbot-window:not(.chatbot-fullscreen) .chatbot-suggestion-cards {
  grid-template-columns: 1fr;
  gap: 10px;
}

#chatbot-window:not(.chatbot-fullscreen) .chatbot-welcome-title {
  font-size: 1.15rem;
}

#chatbot-window:not(.chatbot-fullscreen) .chatbot-suggestion-card {
  padding: 12px;
}

#chatbot-window:not(.chatbot-fullscreen) .chatbot-card-title {
  font-size: 0.9rem;
}

#chatbot-window:not(.chatbot-fullscreen) .chatbot-card-subtitle {
  font-size: 0.75rem;
}

/* Messages */
.chatbot-messages {
  flex: 1;
  min-height: 0; /* allow flex child to shrink so overflow-y scroll works */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: 32px; /* prevent last gallery from being cut off above input */
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--hog-chat-light);
}

.chatbot-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.chatbot-message.user {
  align-self: flex-end;
  background: var(--hog-chat-bg);
  color: #fff;
}

.chatbot-message.assistant {
  align-self: flex-start;
  background: #fff;
  color: var(--hog-chat-text);
  border: 1px solid var(--hog-chat-border);
  max-width: 100%;
}

/* Formatted assistant content (markdown ** → strong, newlines) */
.chatbot-message-body {
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.chatbot-message-body strong {
  font-weight: 600;
  color: var(--hog-chat-text);
}

.chatbot-message-body br + br {
  line-height: 1.6;
}

.chatbot-message.assistant .chatbot-message-body {
  font-size: 0.9rem;
}

/* In-message links: underline + blue; visited uses the same treatment so they stay obviously clickable */
.chatbot-message-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chatbot-message-body a:link,
.chatbot-message-body a:visited {
  color: #2563eb;
  text-decoration-color: #2563eb;
}

.chatbot-message.user .chatbot-message-body a:link,
.chatbot-message.user .chatbot-message-body a:visited {
  color: #93c5fd;
  text-decoration-color: #93c5fd;
}

.chatbot-loading {
  align-self: flex-start;
  padding: 10px 14px;
  color: #6b7280;
  font-size: 0.9rem;
}

.chatbot-checkout-panel {
  align-self: stretch;
  border: 1px solid rgba(192, 160, 128, 0.4);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf4 0%, #f8f3eb 100%);
  padding: 14px;
}

.chatbot-checkout-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--hog-chat-text);
}

.chatbot-checkout-copy {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #6b7280;
}

.chatbot-checkout-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.chatbot-checkout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.chatbot-checkout-btn.primary {
  background: var(--hog-chat-bg);
  color: #fff;
}

.chatbot-checkout-btn.primary:hover {
  background: var(--hog-chat-accent);
}

.chatbot-checkout-expiry {
  display: block;
  margin-top: 10px;
  font-size: 0.76rem;
  color: #8b8b8b;
}

/* Image gallery – horizontal slider (must not shrink or clip to a strip) */
.chatbot-image-gallery {
  display: flex;
  flex-direction: row;
  flex-shrink: 0; /* don’t collapse in flex column when near bottom */
  align-self: stretch;
  min-height: 196px; /* match .chatbot-image-wrapper height + padding */
  gap: 12px;
  overflow-x: auto;
  overflow-y: visible; /* was hidden – could clip thumbnails; scroll is horizontal only */
  padding: 8px 0 16px;
  margin: 8px -16px 0;
  padding-left: 16px;
  padding-right: 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
  box-sizing: border-box;
}

.chatbot-image-gallery::-webkit-scrollbar {
  height: 6px;
}

.chatbot-image-gallery::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.chatbot-image-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 240px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
}

#chatbot-window.chatbot-fullscreen .chatbot-image-wrapper {
  width: 280px;
  height: 200px;
}

.chatbot-cottage-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.chatbot-cottage-image:hover {
  transform: scale(1.03);
}

.chatbot-image-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  z-index: 1;
}

.chatbot-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--hog-chat-accent);
  border-radius: 50%;
  animation: hog-chat-spin 0.8s linear infinite;
}

@keyframes hog-chat-spin {
  to { transform: rotate(360deg); }
}

/* Input */
.chatbot-input-wrap {
  padding: 12px 16px;
  border-top: 1px solid var(--hog-chat-border);
  background: #fff;
  flex-shrink: 0;
}

.chatbot-booking-helper {
  margin-bottom: 12px;
  border: 1px solid rgba(192, 160, 128, 0.35);
  border-radius: 12px;
  background: #faf7f2;
  padding: 12px;
}

.chatbot-booking-helper-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chatbot-booking-helper-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hog-chat-text);
}

.chatbot-booking-helper-copy {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #6b7280;
}

.chatbot-booking-helper-close {
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 0;
}

.chatbot-booking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.chatbot-booking-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #52525b;
}

.chatbot-booking-field input {
  min-height: 40px;
  border: 1px solid var(--hog-chat-border);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  color: var(--hog-chat-text);
  background: #fff;
}

.chatbot-booking-field input:focus {
  outline: none;
  border-color: var(--hog-chat-accent);
}

.chatbot-booking-date-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.chatbot-booking-date-wrap .chatbot-booking-dmy {
  flex: 1;
  min-width: 0;
}

.chatbot-booking-pick {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--hog-chat-border);
  border-radius: 8px;
  background: #fff;
  color: var(--hog-chat-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.chatbot-booking-pick:hover {
  border-color: var(--hog-chat-accent);
  background: var(--hog-chat-light);
}

.chatbot-booking-pick:focus {
  outline: none;
  border-color: var(--hog-chat-accent);
}

.chatbot-booking-date-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.chatbot-booking-actions {
  margin-top: 12px;
}

.chatbot-booking-send {
  width: 100%;
  min-height: 40px;
  border: none;
  border-radius: 8px;
  background: var(--hog-chat-bg);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.chatbot-booking-send:hover {
  background: var(--hog-chat-accent);
}

.chatbot-input-wrapper {
  position: relative;
}

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

.chatbot-input-field {
  flex: 1;
  min-width: 0;
  position: relative;
}

.chatbot-input-field textarea,
.chatbot-input-row textarea {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  max-height: 120px;
  line-height: 1.35;
  padding: 10px 56px 10px 14px;
  margin: 0;
  border: 1px solid var(--hog-chat-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
}

.chatbot-input-field textarea:focus,
.chatbot-input-row textarea:focus {
  outline: none;
  border-color: var(--hog-chat-accent);
}

/* Mic — voice-to-text (aligned with Swiss Cottages widget) */
.chatbot-mic-text {
  position: absolute;
  right: 8px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
  z-index: 2;
}

.chatbot-mic-text:hover {
  opacity: 1;
  color: var(--hog-chat-accent);
}

.chatbot-mic-text-icon {
  display: block;
  flex-shrink: 0;
}

.chatbot-mic-text-recording-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: 8px;
  background: #2d333a;
  color: rgba(255, 255, 255, 0.92);
}

.chatbot-mic-text-recording-bar .chatbot-mic-text-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 22px;
  flex-shrink: 0;
}

.chatbot-mic-text-recording-bar .wave-bar {
  width: 3px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 2px;
  height: 30%;
  min-height: 4px;
  animation: hog-chat-wave-pulse 0.55s ease-in-out infinite;
}

.chatbot-mic-text-recording-bar .wave-bar:nth-child(1) { animation-delay: 0s; }
.chatbot-mic-text-recording-bar .wave-bar:nth-child(2) { animation-delay: 0.08s; }
.chatbot-mic-text-recording-bar .wave-bar:nth-child(3) { animation-delay: 0.16s; }
.chatbot-mic-text-recording-bar .wave-bar:nth-child(4) { animation-delay: 0.24s; }
.chatbot-mic-text-recording-bar .wave-bar:nth-child(5) { animation-delay: 0.32s; }

.chatbot-mic-text-live {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  max-height: 3.2em;
  overflow: hidden;
}

.chatbot-mic-text-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
  border-radius: 50%;
  padding: 4px;
  transition: color 0.2s, background 0.2s;
}

.chatbot-mic-text-cancel:hover {
  color: #fecaca;
  background: rgba(255, 255, 255, 0.08);
}

.chatbot-mic-text-check-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a1d21;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.15s;
}

.chatbot-mic-text-check-wrap:hover {
  opacity: 0.92;
  transform: scale(1.03);
}

.chatbot-input-wrapper.chatbot-mic-text-recording-active .chatbot-input-field,
.chatbot-input-wrapper.chatbot-mic-text-recording-active .chatbot-send {
  visibility: hidden !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.chatbot-input-wrapper.chatbot-mic-text-recording-active .chatbot-mic-text-recording-bar {
  display: flex !important;
  position: relative;
  width: 100%;
}

@keyframes hog-chat-wave-pulse {
  0%, 100% { height: 30%; min-height: 4px; }
  50% { height: 90%; min-height: 6px; }
}

.chatbot-send {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--hog-chat-bg);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  margin: 0;
  padding: 0;
}

.chatbot-send:hover {
  background: var(--hog-chat-accent);
}

.chatbot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile – full screen, input always visible above keyboard */
body.chatbot-open-mobile {
  overflow: hidden !important;
}

@media (max-width: 768px) {
  /* Fullscreen widget already covers the screen; backdrop steals taps / stacking */
  #chatbot-widget.chatbot-fullscreen-active::before {
    display: none !important;
  }

  /* Flex column so #chatbot-window fills height without fragile nested absolute % */
  #chatbot-widget.chatbot-fullscreen-active {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    z-index: 99999999 !important;
    background: #fff !important;
  }

  #chatbot-widget.chatbot-fullscreen-active .chatbot-toggle-buttons {
    display: none !important;
  }

  #chatbot-window.chatbot-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .chatbot-booking-grid {
    grid-template-columns: 1fr;
  }

  /* Flex child: grows to fill widget; avoids 0-height % bugs vs position:absolute */
  #chatbot-window.chatbot-fullscreen {
    position: relative !important;
    flex: 1 1 0% !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    border-radius: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 1 !important;
  }

  #chatbot-window.chatbot-fullscreen .chatbot-panel {
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  #chatbot-window.chatbot-fullscreen .chatbot-header {
    border-radius: 0 !important;
    flex-shrink: 0 !important;
  }

  #chatbot-window.chatbot-fullscreen .chatbot-messages {
    flex: 1 !important;
    min-height: 100px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    display: flex !important;
    flex-direction: column !important;
    padding-top: 12px !important;
    padding-bottom: 16px !important;
  }

  #chatbot-window.chatbot-fullscreen .chatbot-input-wrap {
    flex-shrink: 0 !important;
    padding: 12px 16px !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1px solid var(--hog-chat-border);
    background: #fff;
  }

  #chatbot-window.chatbot-fullscreen .chatbot-input-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    gap: 8px !important;
    min-height: 44px !important;
  }

  #chatbot-window.chatbot-fullscreen .chatbot-input-row .chatbot-input-field textarea,
  #chatbot-window.chatbot-fullscreen .chatbot-input-row textarea {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 44px !important;
    max-height: 120px !important;
  }

  #chatbot-window.chatbot-fullscreen .chatbot-send {
    flex-shrink: 0 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .chatbot-image-wrapper {
    width: 220px;
    height: 165px;
  }
}
