/* ============================================= */
/* MAI+ Chat — Estilos globales                  */
/* ============================================= */

/* --- Sidebar --- */
.melia-sidebar {
  width: 260px;
  background: #0a3d0a;
  color: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, width 0.3s ease;
  flex-shrink: 0;
  z-index: 10;
}
.melia-sidebar.collapsed { transform: translateX(-100%); width: 0; overflow: hidden; }
.melia-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.melia-sidebar-title { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.melia-sidebar-toggle { background: none; border: none; color: rgba(255,255,255,0.7); font-size: 20px; cursor: pointer; padding: 4px; border-radius: 6px; transition: all 0.2s; display: flex; align-items: center; }
.melia-sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,0.1); }
.melia-sidebar-open { position: absolute; left: 12px; top: 14px; z-index: 5; background: none; border: none; color: #555; font-size: 22px; cursor: pointer; padding: 6px; border-radius: 6px; transition: all 0.2s; display: none; }
.melia-sidebar-open:hover { background: rgba(0,0,0,0.06); color: #009900; }
.melia-sidebar.collapsed ~ .melia-sidebar-open { display: flex; }
.melia-sidebar-content { padding: 12px; flex: 1; overflow-y: auto; }
.melia-sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,0.1); }
.melia-user-profile { display: flex; align-items: center; gap: 10px; }
.melia-user-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.melia-user-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.melia-theme-toggle { background: none; border: none; color: inherit; font-size: 20px; cursor: pointer; padding: 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; opacity: 0.7; transition: all 0.2s; flex-shrink: 0; }
.melia-theme-toggle:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.melia-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.melia-login-btn { background: none; border: none; color: inherit; font-size: 12px; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 4px; opacity: 0.7; transition: opacity 0.2s; text-align: left; }
.melia-login-btn:hover { opacity: 1; }
.melia-login-btn i { font-size: 14px; color: #f0a040; }
.melia-new-chat { width: 100%; padding: 10px 14px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; color: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
.melia-new-chat:hover { background: rgba(255,255,255,0.18); }
.melia-history-label { font-size: 12px; color: rgba(255,255,255,0.5); padding: 16px 6px 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.melia-history-item { padding: 8px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.8); transition: all 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.melia-history-item:hover, .melia-history-item.active { background: rgba(255,255,255,0.1); color: #fff; }

/* --- Main / messages / welcome --- */
.melia-chat-wrapper { display: flex; height: 100%; position: relative; }
.melia-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.melia-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding: 20px; padding-top: 28px; }
.melia-welcome { text-align: center; max-width: 600px; align-self: center; margin-bottom: 20px; width: 100%; }
.melia-messages:not(.has-chat) { justify-content: center; align-items: center; }
.melia-messages.has-chat .melia-welcome { display: none; }
.melia-welcome-icon { margin-bottom: 20px; }
.melia-greeting { font-size: 42px; font-weight: 600; margin-bottom: 8px; font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; letter-spacing: -0.5px; color: #2d2d2d; }
.melia-greeting::before { content: '\2726'; margin-right: 10px; font-size: 36px; color: #e07830; display: inline-block; vertical-align: middle; }
.melia-question { font-size: 18px; margin-bottom: 28px; }
.melia-suggestions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; padding: 0 20px; }
.melia-suggestion { padding: 8px 16px; border-radius: 999px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; background: #fff; border: 1px solid #ddd; color: #333; }
.melia-suggestion:hover { border-color: #009900; background: #f0faf0; }
.melia-suggestion i { font-size: 8px; color: #009900; }

/* --- Messages --- */
.melia-msg { display: flex; gap: 10px; margin-bottom: 16px; max-width: 85%; }
.melia-msg-user { margin-left: auto; justify-content: flex-end; }
.melia-msg-ai { margin-right: auto; }
.melia-msg-avatar { width: 28px; height: 28px; border-radius: 50%; background: #e8f5e9; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 4px; }
.melia-msg-avatar img { display: block; }
.melia-msg-bubble { padding: 10px 16px; border-radius: 18px; font-size: 14px; line-height: 1.55; }
.melia-msg-user .melia-msg-bubble { background: #d4edda; color: #1a1a1a; border-bottom-right-radius: 4px; }
.melia-msg-ai .melia-msg-bubble { background: #f0f0f0; color: #333; border-bottom-left-radius: 4px; }

/* Markdown rendered content inside bubbles */
.melia-msg-bubble strong { font-weight: 700; }
.melia-list-bullet { color: #009900; font-weight: 700; margin-right: 2px; }

/* Product cards inside chat */
.melia-msg-img {
  max-width: 180px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  margin: 6px auto;
  display: block;
  background: #fff;
  padding: 4px;
  border: 1px solid #e8e8e8;
  cursor: zoom-in;
  transition: transform 0.15s;
}

.melia-msg-img:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Image zoom modal */
.mai-img-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.mai-img-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.mai-img-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mai-img-modal-content {
  position: relative;
  max-width: 500px;
  width: 90vw;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.25s;
  align-self: center;
  margin-right: auto;
  margin-left: 5vw;
}

.mai-img-modal.show .mai-img-modal-content {
  transform: scale(1);
}

.mai-img-modal-content img {
  width: 100%;
  max-height: 420px;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  background: #fff;
  object-fit: contain;
  padding: 20px;
}

.mai-img-modal-content p {
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 12px 0 14px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.mai-img-modal-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: linear-gradient(135deg, #2db84b, #009900);
  color: #fff !important;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(0,153,0,0.4);
  transition: all 0.2s;
}

.mai-img-modal-cta:hover {
  background: linear-gradient(135deg, #009900, #007a00);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,153,0,0.5);
  color: #fff !important;
  text-decoration: none;
}

.mai-img-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #333;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.15s;
}

.mai-img-modal-close:hover {
  background: #f0f0f0;
}

.melia-msg-link {
  color: #009900;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85em;
}

.melia-msg-link:hover {
  text-decoration: underline;
  color: #007a00;
}

/* Numbered items = product cards */
.melia-list-num {
  display: inline-block;
  background: #e07830;
  color: #fff;
  font-weight: 700;
  font-size: 0.75em;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* Product card inside chat bubble */
.melia-product-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  max-width: 260px;
}

.melia-product-card .melia-msg-img {
  border: none;
  background: #fafafa;
  margin: 6px 0 8px;
  padding: 4px;
  max-width: 210px;
  height: 150px;
  border-radius: 6px;
}

.melia-product-card .melia-msg-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #2db84b, #009900);
  color: #fff !important;
  border-radius: 999px;
  font-size: 0.82em;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,153,0,0.25);
}

.melia-product-card .melia-msg-link:hover {
  background: linear-gradient(135deg, #009900, #007a00);
  text-decoration: none;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,153,0,0.35);
}

.melia-product-card strong {
  color: #1a1a1a;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05em;
  font-weight: 800;
  line-height: 1.3;
  display: block;
  margin-bottom: 4px;
}

/* Video embed in chat */
.melia-video-bubble {
  padding: 8px !important;
  max-width: 320px;
}

.melia-video-title {
  display: block;
  font-size: 0.82em;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
  padding: 0 4px;
  line-height: 1.3;
}

.melia-video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 8px;
  overflow: hidden;
}

.melia-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* Video play overlay — blocks iframe clicks, opens modal */
.melia-video-container {
  cursor: pointer;
}

.melia-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: background 0.2s;
  cursor: pointer;
}

.melia-video-overlay i {
  font-size: 40px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  transition: transform 0.2s;
}

.melia-video-container:hover .melia-video-overlay {
  background: rgba(0,0,0,0.15);
}

.melia-video-container:hover .melia-video-overlay i {
  transform: scale(1.1);
}

/* Video modal — full + minimized */
.mai-video-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.mai-video-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.mai-video-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.mai-video-modal-content {
  position: relative;
  width: 90vw;
  max-width: 720px;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  transform: scale(0.92);
  transition: all 0.3s ease;
}

.mai-video-modal.show .mai-video-modal-content {
  transform: scale(1);
}

.mai-video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #111;
}

.mai-video-modal-title {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 8px;
}

.mai-video-modal-actions {
  display: flex;
  gap: 6px;
}

.mai-video-modal-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.15s;
}

.mai-video-modal-btn:hover {
  background: rgba(255,255,255,0.2);
}

.mai-video-modal-player {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.mai-video-modal-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Minimized state (picture-in-picture corner) */
.mai-video-modal.minimized .mai-video-modal-bg {
  display: none;
}

.mai-video-modal.minimized .mai-video-modal-content {
  position: fixed;
  bottom: 80px;
  right: 20px;
  top: auto;
  left: auto;
  width: 320px;
  max-width: 40vw;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  cursor: grab;
  z-index: 99999;
}

.mai-video-modal.minimized .mai-video-modal-content:active {
  cursor: grabbing;
}

.mai-video-modal.minimized .mai-video-modal-title {
  font-size: 0.75rem;
}

.mai-video-modal.minimized .mai-video-modal-header {
  padding: 6px 10px;
}

/* Dark mode */
.melia-main.dark-mode .melia-video-title { color: #e0e0e0; }
.melia-main.dark-mode .melia-product-card { background: #1e1e1e; border-color: #444; }
.melia-main.dark-mode .melia-product-card strong { color: #e0e0e0; }
.melia-main.dark-mode .melia-msg-link { color: #4caf50; }
.melia-main.dark-mode .melia-msg-link:hover { color: #81c784; }
.melia-main.dark-mode .melia-msg-img { opacity: 0.9; border-color: #444; background: #2a2a2a; }

/* --- Input area --- */
.melia-input-area { padding: 16px 24px 12px; max-width: 700px; width: 100%; margin: 0 auto; }
.melia-input-wrapper { position: relative; background: #fff; border: 1px solid #ddd; border-radius: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); display: flex; align-items: flex-end; padding: 6px 6px 6px 18px; transition: border-color 0.2s, box-shadow 0.2s; }
.melia-input-wrapper:focus-within { border-color: #009900; box-shadow: 0 2px 16px rgba(0,153,0,0.12); }
.melia-input-wrapper textarea { flex: 1; border: none; outline: none; resize: none; font-size: 15px; color: #333; line-height: 1.5; padding: 8px 0; max-height: 120px; background: transparent; font-family: inherit; overflow: hidden; scrollbar-width: none; -ms-overflow-style: none; }
.melia-input-wrapper textarea::-webkit-scrollbar { display: none; }
.melia-input-wrapper textarea::placeholder { color: #999; }
.melia-input-wrapper textarea { caret-color: transparent; }
.melia-input-wrapper textarea:focus { caret-color: #333; }
/* --- Attach button (+) --- */
.melia-attach-wrapper { position: relative; flex-shrink: 0; margin-right: 4px; margin-left: -10px; margin-bottom: 6px; }
.melia-attach-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #ddd; background: #fff; color: #666; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; transition: all 0.2s; }
.melia-attach-btn:hover { border-color: #009900; color: #009900; background: #f0faf0; }
.melia-attach-btn.open { border-color: #009900; color: #009900; transform: rotate(45deg); }
.melia-attach-menu { display: none !important; position: absolute; bottom: 40px; left: 0; background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); padding: 4px; min-width: 170px; z-index: 10; }
.melia-attach-menu.show { display: block !important; }
.melia-attach-option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 0.85rem; color: #333; transition: background 0.15s; white-space: nowrap; }
.melia-attach-option:hover { background: #f0faf0; color: #009900; }
.melia-attach-option i { font-size: 1rem; }
.melia-file-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: #f0faf0; border: 1px solid #c8e6c9; border-radius: 12px; font-size: 0.78rem; color: #333; margin-bottom: 6px; }
.melia-file-badge i { color: #009900; }
.melia-file-badge .melia-file-remove { cursor: pointer; color: #999; margin-left: 4px; }
.melia-file-badge .melia-file-remove:hover { color: #c00; }

/* Dark mode attach */
.melia-main.dark-mode .melia-attach-btn { background: #2a2a2a; border-color: #444; color: #999; }
.melia-main.dark-mode .melia-attach-btn:hover { border-color: #009900; color: #009900; }
.melia-main.dark-mode .melia-attach-menu { background: #2a2a2a; border-color: #444; }
.melia-main.dark-mode .melia-attach-option { color: #ccc; }
.melia-main.dark-mode .melia-attach-option:hover { background: #1b3d1b; color: #d4edda; }

/* --- Drag & drop overlay --- */
.melia-main.melia-dragover { outline: 2px dashed #009900; outline-offset: -4px; background: rgba(0,153,0,0.03); }
.melia-main.melia-dragover .melia-messages { pointer-events: none; }

.melia-send-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(0,153,0,0.12); color: #009900; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; flex-shrink: 0; transition: all 0.2s; }
.melia-send-btn:hover { background: rgba(0,153,0,0.25); }
.melia-send-btn.has-text { background: #009900; color: #fff; }
.melia-send-btn.has-text:hover { background: #007a00; }
.melia-send-btn.recording { background: #e03030 !important; color: #fff !important; animation: mic-pulse 1s infinite; }
@keyframes mic-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.melia-disclaimer { text-align: center; font-size: 12px; margin: 8px 0 0; }
.melia-disclaimer a { color: inherit; text-decoration: none; opacity: 0.7; transition: opacity .2s; }
.melia-disclaimer a:hover { opacity: 1; text-decoration: underline; }

/* ============================================= */
/* Banner + Chat overlay                         */
/* ============================================= */
.melia-banner-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  z-index: 1;
  padding-top: 110px;
  box-sizing: border-box;
}
.melia-banner-section video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.melia-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}
.melia-chat-section.melia-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  background: transparent;
  overflow: hidden;
}
.melia-overlay .melia-chat-wrapper { padding: 20px 30px 30px; height: 100%; box-sizing: border-box; }
.melia-overlay .melia-sidebar { background: rgba(0,0,0,0.15); backdrop-filter: blur(8px); border-radius: 20px 0 0 20px; max-height: 100%; overflow: hidden; }
.melia-overlay .melia-sidebar-title { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.melia-overlay .melia-user-name { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.melia-overlay .melia-login-btn { color: rgba(255,255,255,0.8); }
.melia-overlay .melia-theme-toggle { color: rgba(255,255,255,0.8); }
.melia-overlay .melia-theme-toggle:hover { color: #fff; }
.melia-overlay .melia-main { background: #fff; border-radius: 0 20px 20px 0; box-shadow: 0 4px 30px rgba(0,0,0,0.2); overflow: hidden; }
.melia-overlay .melia-messages { margin-top: 8px; scrollbar-gutter: stable; }
.melia-overlay .melia-sidebar.collapsed ~ .melia-main { border-radius: 20px; }
.melia-overlay .melia-greeting { color: #1a1a1a; }
.melia-overlay .melia-question { color: #666; }
.melia-overlay .melia-suggestion { border: 1px solid #ddd; background: #fff; color: #333; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.melia-overlay .melia-suggestion:hover { border-color: #009900; color: #009900; box-shadow: 0 2px 8px rgba(0,153,0,0.12); }
.melia-overlay .melia-suggestion i { color: #009900; }
.melia-overlay .melia-sidebar-open { color: rgba(255,255,255,0.9); text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.melia-overlay .melia-sidebar-open:hover { background: rgba(255,255,255,0.15); color: #fff; }
.melia-overlay .melia-disclaimer { color: #999; }
.melia-overlay .melia-input-wrapper { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

/* --- Dark mode --- */
.melia-main.dark-mode { background: #1a1a1a !important; }
.melia-main.dark-mode .melia-greeting { color: #e0e0e0; }
.melia-main.dark-mode .melia-question { color: #999; }
.melia-main.dark-mode .melia-msg-ai .melia-msg-bubble { background: #2a2a2a; color: #ddd; }
.melia-main.dark-mode .melia-msg-user .melia-msg-bubble { background: #1b3d1b; color: #d4edda; }
.melia-main.dark-mode .melia-msg-avatar { background: #2a2a2a; }
.melia-main.dark-mode .melia-input-wrapper { background: #2a2a2a; border-color: #444; }
.melia-main.dark-mode .melia-input-wrapper:focus-within { border-color: #009900; box-shadow: 0 2px 16px rgba(0,153,0,0.2); }
.melia-main.dark-mode .melia-input-wrapper textarea { color: #e0e0e0; }
.melia-main.dark-mode .melia-input-wrapper textarea::placeholder { color: #666; }
.melia-main.dark-mode .melia-send-btn { color: #009900; }
.melia-main.dark-mode .melia-suggestion { background: #2a2a2a; border-color: #444; color: #ccc; }
.melia-main.dark-mode .melia-suggestion:hover { border-color: #009900; background: #1b3d1b; color: #d4edda; }
.melia-main.dark-mode .melia-disclaimer { color: #666; }

/* --- Mobile --- */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .melia-chat-section.melia-white,
  .melia-banner-section {
    height: 80vh;
    min-height: 400px;
    max-width: 100vw;
  }
  .melia-overlay .melia-chat-wrapper { position: relative; }
  .melia-overlay .melia-sidebar { display: none; }
  .melia-sidebar.mobile-open {
    display: flex;
    position: absolute;
    top: 20px; left: 15px; bottom: 30px;
    z-index: 20;
    width: 260px;
    background: #fff;
    color: #333;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    border-radius: 20px;
    overflow: hidden;
  }
  .melia-sidebar.mobile-open .melia-sidebar-header { border-bottom-color: #eee; }
  .melia-sidebar.mobile-open .melia-sidebar-title { color: #1a1a1a; text-shadow: none; }
  .melia-sidebar.mobile-open .melia-sidebar-toggle { color: #666; }
  .melia-sidebar.mobile-open .melia-sidebar-toggle:hover { color: #333; background: rgba(0,0,0,0.05); }
  .melia-sidebar.mobile-open .melia-new-chat { color: #333; border-color: #ddd; }
  .melia-sidebar.mobile-open .melia-history-label { color: #999; }
  .melia-sidebar.mobile-open .melia-history-item { color: #555; }
  .melia-sidebar.mobile-open .melia-history-item.active { color: #009900; background: rgba(0,153,0,0.08); }
  .melia-sidebar.mobile-open .melia-sidebar-footer { border-top-color: #eee; }
  .melia-sidebar.mobile-open .melia-user-avatar { background: #f0f0f0; color: #333; }
  .melia-sidebar.mobile-open .melia-user-name { color: #1a1a1a; text-shadow: none; }
  .melia-sidebar.mobile-open .melia-login-btn { color: #333; }
  .melia-sidebar.mobile-open .melia-theme-toggle { color: #333; }
  .melia-sidebar.mobile-open .melia-theme-toggle:hover { background: rgba(0,0,0,0.05); }
  .melia-sidebar-open {
    display: flex !important;
  }
  .melia-overlay .melia-main { border-radius: 20px; }
  .melia-greeting { font-size: 30px !important; }
  .melia-question { font-size: 16px !important; }
  .melia-suggestions { gap: 8px; }
  .melia-suggestion { padding: 8px 14px !important; font-size: 13px !important; }
  .melia-input-area { padding: 12px 16px 8px; }
}

/* ============================================= */
/* MAI+ Widget — Barra fija en footer            */
/* ============================================= */
.mai-widget {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  font-family: inherit;
}

.mai-widget-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 24px;
  background: #2d2d2d;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
  overflow: visible;
}

.mai-widget-bar:hover {
  background: #3a3a3a;
}

.mai-widget-icon {
  font-size: 36px;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2db84b, #009900);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: -16px;
  margin-bottom: -16px;
  box-shadow: 0 4px 16px rgba(0, 153, 0, 0.4), 0 0 0 3px #2d2d2d;
  animation: mai-icon-pulse 2.5s ease-in-out infinite;
}

@keyframes mai-icon-pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(0, 153, 0, 0.4), 0 0 0 3px #2d2d2d; }
  50% { box-shadow: 0 6px 24px rgba(0, 153, 0, 0.6), 0 0 0 3px #2d2d2d; }
}

.mai-widget-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff !important;
}

.mai-widget-subtitle {
  font-size: 13px;
  flex: 1;
  color: #fff !important;
}

.mai-widget-toggle {
  background: #009900;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
}

.mai-widget-toggle:hover {
  background: #007a1e;
}

.mai-widget-body {
  display: none;
  height: calc(100vh - 160px);
  max-height: 600px;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.2);
}

.mai-widget.expanded .mai-widget-body {
  display: block;
}

.mai-widget.expanded .mai-widget-toggle i {
  transform: rotate(180deg);
}

.mai-widget-body .melia-banner-section {
  height: 100%;
  min-height: auto;
  padding-top: 0;
}

.mai-widget-body .melia-chat-section.melia-overlay {
  height: 100%;
}

.mai-widget-body .melia-overlay .melia-chat-wrapper {
  padding: 10px 15px 15px;
}

/* Mobile widget */
@media (max-width: 768px) {
  .mai-widget-bar {
    padding: 5px 16px;
  }
  .mai-widget-icon {
    font-size: 28px;
    width: 40px;
    height: 40px;
    top: -12px;
    margin-bottom: -12px;
  }
  .mai-widget-title {
    font-size: 15px;
  }
  .mai-widget-subtitle {
    font-size: 12px;
  }
  .mai-widget-body {
    height: 70vh;
  }
  .mai-widget-body .melia-overlay .melia-chat-wrapper {
    padding: 8px;
  }
}
