/* ============================================================
   Maxxage Valencia — Chat Widget
   Palette: burgundy #664750 · cream #fdf7f2 · warm tan #bfa498
   Fonts: EB Garamond (serif display) + Muli (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@500;600;700&family=Mulish:wght@400;500;600;700&display=swap');

#maxxag-chat-root * {
  box-sizing: border-box; margin: 0; padding: 0;
  font-family: 'Mulish', 'Muli', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── VLC Color tokens ────────────────────────────────────────── */
/* --primary: #664750 (burgundy)
   --primary-rgb: 102,71,80
   --accent: #bfa498 (warm tan)
   --bg-dark: #3a2c39 (charcoal plum)
   --bg-window: rgba(58,44,57,0.75)
   --text: #fdf7f2 (cream)  */

/* ── Floating button ─────────────────────────────────────────── */
#maxxag-chat-btn {
  position: fixed; bottom: 28px; right: 28px;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, #664750, #3a2c39);
  box-shadow: 0 6px 24px rgba(102,71,80,0.45);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(191,164,152,0.2); z-index: 99998;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
#maxxag-chat-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 32px rgba(102,71,80,0.6);
}
#maxxag-chat-btn svg { width: 24px; height: 24px; fill: #fdf7f2; }
#maxxag-chat-btn .maxxag-btn-avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
#maxxag-chat-btn::before {
  content: ''; position: absolute; width: 100%; height: 100%;
  border-radius: 50%; background: rgba(102,71,80,0.3);
  animation: maxxag-pulse 2.8s ease-out infinite;
}
@keyframes maxxag-pulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(2.1); opacity: 0; }
}
.maxxag-notif {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  background: #f51957; border-radius: 50%; border: 2px solid #3a2c39;
  font-size: 10px; color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ── Chat window ─────────────────────────────────────────────── */
#maxxag-chat-window {
  position: fixed; bottom: 104px; right: 28px;
  width: 380px; max-width: calc(100vw - 32px);
  height: 580px; min-height: 320px; max-height: calc(100vh - 130px);
  background: linear-gradient(180deg, rgba(58,44,57,0.96) 0%, rgba(45,34,44,0.98) 100%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-radius: 20px;
  border: 1px solid rgba(191,164,152,0.1);
  box-shadow: 0 25px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(191,164,152,0.05);
  display: flex; flex-direction: column; overflow: hidden;
  z-index: 99999;
  transform: translateY(22px) scale(0.96);
  opacity: 0; pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34,1.5,0.64,1), opacity 0.28s ease;
}
#maxxag-chat-window.maxxag-open {
  transform: translateY(0) scale(1); opacity: 1; pointer-events: auto;
}
@supports not (backdrop-filter: blur(1px)) {
  #maxxag-chat-window { background: rgba(50,38,49,0.99); }
}

/* ── Header — premium gradient ───────────────────────────────── */
#maxxag-chat-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(102,71,80,0.35), rgba(58,44,57,0.2));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(191,164,152,0.1);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.maxxag-header-avatar-wrap {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(191,164,152,0.3);
  flex-shrink: 0; background: rgba(191,164,152,0.1);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 0 12px rgba(102,71,80,0.3);
}
.maxxag-header-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.maxxag-header-avatar-wrap::after {
  content: ''; position: absolute; bottom: 1px; right: 1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #28a800; border: 2px solid rgba(58,44,57,0.9);
  box-shadow: 0 0 6px rgba(40,168,0,0.5);
  animation: maxxag-online-pulse 2s ease-in-out infinite;
}
@keyframes maxxag-online-pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.maxxag-avatar-letter { font-size: 16px; font-weight: 700; color: #fdf7f2; font-family: 'EB Garamond', serif; }
.maxxag-header-info { flex: 1; min-width: 0; }
.maxxag-bot-name {
  font-size: 14px; font-weight: 600; color: #fdf7f2;
  font-family: 'EB Garamond', serif;
  letter-spacing: 0.3px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.maxxag-status {
  font-size: 11px; color: rgba(253,247,242,0.7);
  margin-top: 2px; display: flex; align-items: center; gap: 4px;
}
.maxxag-status::before {
  content: ''; width: 0; height: 0; display: none;
}
#maxxag-chat-close {
  background: rgba(253,247,242,0.04); border: none;
  width: 44px; height: 44px; border-radius: 50%;
  color: rgba(253,247,242,0.5); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; line-height: 1; flex-shrink: 0;
}
#maxxag-chat-close:hover { background: rgba(253,247,242,0.1); color: #fdf7f2; }
#maxxag-chat-close svg { width: 14px; height: 14px; fill: currentColor; }

/* ── Messages — WhatsApp-style chat with logo watermark ───────── */
#maxxag-chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
  scrollbar-width: thin; scrollbar-color: rgba(191,164,152,0.15) transparent;
}
/* Logo watermark centered behind messages */
#maxxag-chat-window::after {
  content: ''; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 150px; height: 150px;
  background: url('logo-bg.png') center/contain no-repeat;
  opacity: 0.04; pointer-events: none; z-index: 0;
}
#maxxag-chat-messages::-webkit-scrollbar { width: 3px; }
#maxxag-chat-messages::-webkit-scrollbar-thumb { background: rgba(191,164,152,0.2); border-radius: 2px; }

/* User bubble — right, premium style with shadow accent */
.maxxag-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #664750, #4a3440);
  color: #fdf7f2;
  padding-left: 17px !important; padding-right: 17px !important; padding-top: 13px !important; padding-bottom: 12px !important;
  border-radius: 16px; border-bottom-right-radius: 6px;
  max-width: 80%; font-size: 13.5px; line-height: 1.55;
  word-break: break-word;
  box-shadow: 0 4px 12px rgba(102,71,80,0.35), 0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: maxxag-fade-in 0.25s ease-out; white-space: pre-line;
  display: flex; flex-direction: column; gap: 6px;
}
.maxxag-msg.user .maxxag-ts { margin: 0; align-self: flex-end; float: none; }

/* Bot bubble — left */
.maxxag-bot-group {
  display: flex; flex-direction: column; gap: 4px;
  align-self: flex-start; max-width: 88%; width: 100%;
  animation: maxxag-fade-in 0.25s ease-out;
  margin-top: 14px;
}
.maxxag-bot-group + .maxxag-bot-group { margin-top: 4px; }
.maxxag-bot-meta { display: flex; align-items: center; gap: 6px; padding: 0 2px; margin-bottom: 3px; }
.maxxag-bot-meta-avatar {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden;
  border: 1px solid rgba(191,164,152,0.15); flex-shrink: 0;
  background: rgba(191,164,152,0.08);
}
.maxxag-bot-meta-avatar img { width: 100%; height: 100%; object-fit: cover; }
.maxxag-bot-meta-name { font-size: 10px; font-weight: 600; color: rgba(253,247,242,0.4); font-family: 'EB Garamond', serif; }
.maxxag-msg.bot {
  background: rgba(253,247,242,0.22);
  border: 1px solid rgba(191,164,152,0.15);
  color: rgba(253,247,242,0.96);
  padding-left: 17px !important; padding-right: 17px !important; padding-top: 13px !important; padding-bottom: 12px !important;
  border-radius: 16px; border-top-left-radius: 6px;
  font-size: 13.5px; line-height: 1.55; white-space: pre-line; align-self: flex-start; max-width: 100%;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  display: flex; flex-direction: column; gap: 6px;
}
.maxxag-msg.bot .maxxag-ts { margin: 0; align-self: flex-end; float: none; }

/* Timestamps — own row inside bubble (no overlap) */
.maxxag-ts {
  font-size: 10px; color: rgba(253,247,242,0.35);
  display: block; float: none; margin: 0; line-height: 1;
  align-self: flex-end;
}
.maxxag-ts.right { color: rgba(253,247,242,0.4); }
.maxxag-ts.right::after { content: ' \2713\2713'; font-size: 9px; color: rgba(100,200,255,0.5); }
.maxxag-bot-group .maxxag-ts::after { content: ' \2713'; font-size: 9px; color: rgba(100,200,255,0.4); }
.maxxag-user-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-left: 20%; margin-top: 14px; animation: maxxag-fade-in 0.25s ease-out; }
.maxxag-user-wrap + .maxxag-user-wrap { margin-top: 4px; }
@keyframes maxxag-fade-in { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

/* Typing */
.maxxag-typing {
  display: flex; align-items: center; gap: 4px; padding: 10px 14px;
  background: rgba(253,247,242,0.1); border: none;
  border-radius: 8px; border-top-left-radius: 2px;
  align-self: flex-start; width: fit-content; animation: maxxag-fade-in 0.2s ease;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
.maxxag-typing span { width: 6px; height: 6px; background: rgba(191,164,152,0.5); border-radius: 50%; animation: maxxag-bounce 0.85s ease-in-out infinite; }
.maxxag-typing span:nth-child(2){animation-delay:.15s;}
.maxxag-typing span:nth-child(3){animation-delay:.3s;}
@keyframes maxxag-bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-4px)} }

/* ── Language selector — flag grid ───────────────────────────── */
.maxxag-lang-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; gap: 16px; animation: maxxag-fade-in 0.3s ease; height: 100%; }
.maxxag-lang-title { font-size: 20px; font-weight: 600; color: #fdf7f2; text-align: center; margin-bottom: 0; font-family: 'EB Garamond', serif; }
.maxxag-lang-subtitle { font-size: 12px; color: rgba(253,247,242,0.45); text-align: center; margin-bottom: 8px; }
.maxxag-lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 240px; }
.maxxag-lang-flag {
  aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 2px solid rgba(191,164,152,0.15); background: rgba(253,247,242,0.04);
  padding: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.maxxag-lang-flag img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) {
  .maxxag-lang-flag:hover { border-color: rgba(191,164,152,0.4); transform: scale(1.06); box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
}
.maxxag-lang-flag:active { transform: scale(0.97); }

/* ── Quick-reply buttons — visible & easy-to-tap ────────────── */
.maxxag-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; width: 100%; }
.maxxag-btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.maxxag-btn-grid .maxxag-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.maxxag-btn-divider { height: 1px; background: rgba(191,164,152,0.12); margin: 4px 0; }
.maxxag-btn {
  background: linear-gradient(135deg, rgba(102,71,80,0.7), rgba(58,44,57,0.85));
  color: #fdf7f2;
  border: none; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  line-height: 1.3; text-align: center;
  animation: maxxag-btn-in 0.2s ease both;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25), inset 0 -1px 0 rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
  min-height: 44px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: transform 0.18s cubic-bezier(0,0,0.2,1), box-shadow 0.18s ease;
}
.maxxag-btn::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(191,164,152,0.5);
  transform: translate(-50%, -50%);
  transition: width 0.5s cubic-bezier(0,0,0.2,1), height 0.5s cubic-bezier(0,0,0.2,1);
  z-index: 0;
}
@media (hover: hover) {
  .maxxag-btn:hover::before { width: 220%; height: 220%; }
}
.maxxag-btn > * { position: relative; z-index: 1; }
.maxxag-btn-grid .maxxag-btn:nth-child(1){animation-delay:.03s} .maxxag-btn-grid .maxxag-btn:nth-child(2){animation-delay:.08s}
.maxxag-btn-grid .maxxag-btn:nth-child(3){animation-delay:.13s} .maxxag-btn-grid .maxxag-btn:nth-child(4){animation-delay:.18s}
.maxxag-btn-grid .maxxag-btn:nth-child(5){animation-delay:.23s} .maxxag-btn-grid .maxxag-btn:nth-child(6){animation-delay:.28s}
@keyframes maxxag-btn-in { from{opacity:0;transform:translateY(6px) scale(0.96)} to{opacity:1;transform:translateY(0) scale(1)} }
@media (hover: hover) {
  .maxxag-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(102,71,80,0.4); }
}
.maxxag-btn:active { transform: scale(0.97); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

/* Action buttons (Reservar, Contacto) — premium gradient like PriyanshuGupta28 */
.maxxag-btn.action-btn {
  background: linear-gradient(43deg, #664750 0%, #8a5a6e 50%, #bfa498 100%);
  color: #fff; font-weight: 700;
  box-shadow: rgba(102,71,80,0.4) 0px 12px 24px -8px, inset 0 -2px 0 rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.15);
}
.maxxag-btn.action-btn:hover {
  box-shadow: rgba(0,0,0,0.3) 0px 14px 28px, rgba(102,71,80,0.5) 0px 8px 12px;
  transform: translateY(-2px);
}
.maxxag-btn.full-width { width: 100%; }

/* WhatsApp button — green gradient like Telegram style */
.maxxag-btn.wa-btn {
  background: linear-gradient(to bottom, #25D366 0%, #128C7E 100%);
  color: #fff; font-weight: 700; border: none;
  box-shadow: 0 4px 10px rgba(37,211,102,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.maxxag-btn.wa-btn::before { background: rgba(255,255,255,0.25); }
.maxxag-btn.wa-btn:hover { box-shadow: 0 8px 18px rgba(37,211,102,0.5); transform: translateY(-3px); }

/* Telegram button — gradient cyan/blue like eirikvold */
.maxxag-btn.tg-btn {
  background: linear-gradient(to bottom, #4dc7d9 0%, #66a6ff 100%);
  color: #fff; font-weight: 700; border: none;
  box-shadow: 0 4px 10px rgba(102,166,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.maxxag-btn.tg-btn::before { background: rgba(255,255,255,0.25); }
.maxxag-btn.tg-btn:hover { box-shadow: 0 8px 18px rgba(102,166,255,0.5); transform: translateY(-3px); }

/* ── Girl cards — photo-focused glass style (responsive) ─────── */
/* 2 columns default (desktop, tablet). Aspect-ratio ensures photo is never cropped awkwardly. */
.maxxag-girls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.maxxag-girls-grid .maxxag-girl-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

.maxxag-girl-card {
  position: relative;
  background: rgba(217,217,217,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  user-select: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: maxxag-fade-in 0.3s ease;
}
@media (hover: hover) {
  .maxxag-girl-card:hover { border-color: rgba(255,255,255,0.35); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
  .maxxag-girl-card:hover img { filter: brightness(1.08); }
}
/* Shine effect on touch/tap — bright glow */
.maxxag-girl-card:active {
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 0 28px rgba(255,255,255,0.25), 0 12px 30px rgba(0,0,0,0.4);
  transform: scale(0.98);
}
.maxxag-girl-card:active img { filter: brightness(1.15) saturate(1.1); }
.maxxag-girl-card img, .maxxag-girl-card { transition: filter 0.15s ease, transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }

/* Photo: clean, full, no filters, no overlay */
.maxxag-girl-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 15%; /* face/torso visible */
  display: block;
  flex-shrink: 0;
  background: #1a1a1a;
}

/* Name: clean caption BELOW photo (no overlay, no gradient) */
.maxxag-girl-name {
  padding: 8px 10px 4px;
  font-size: 14px; font-weight: 600;
  color: #fff;
  font-family: 'EB Garamond', serif;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* WhatsApp button area */
.maxxag-girl-info { padding: 0 8px 8px; display: flex; flex-direction: column; flex-shrink: 0; }
.maxxag-girl-wa {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, #25D366, #128C7E);
  border: none; color: #fff; font-size: 12px; font-weight: 700;
  padding: 8px 12px; border-radius: 10px; text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 6px rgba(37,211,102,0.4);
  width: 100%;
  min-height: 38px;
  white-space: nowrap;
}
.maxxag-girl-wa:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(37,211,102,0.55); }
.maxxag-girl-wa:active { transform: translateY(0); }

/* ── Rates ───────────────────────────────────────────────────── */
.maxxag-rates { width: 100%; }
.maxxag-rates-title { font-size: 15px; font-weight: 700; color: #fdf7f2; margin-bottom: 10px; font-family: 'EB Garamond', serif; }
.maxxag-rates-table { width: 100%; border-collapse: collapse; }
.maxxag-rates-table tr { border-bottom: 1px solid rgba(191,164,152,0.08); }
.maxxag-rates-table tr:last-child { border-bottom: none; }
.maxxag-rates-table td { padding: 8px 6px; font-size: 13px; color: rgba(253,247,242,0.7); }
.maxxag-rates-table td:last-child { font-weight: 700; color: #bfa498; text-align: right; font-size: 14px; }
.maxxag-rates-note { font-size: 11px; color: rgba(253,247,242,0.3); margin-top: 8px; font-style: italic; }

/* ── Input bar ───────────────────────────────────────────────── */
#maxxag-chat-input-row {
  background: rgba(58,44,57,0.85);
  border-top: 1px solid rgba(191,164,152,0.08);
  padding: 10px 12px; display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
#maxxag-chat-input {
  flex: 1; background: rgba(253,247,242,0.04); border: 1px solid rgba(191,164,152,0.1);
  border-radius: 20px; padding: 8px 16px; outline: none;
  color: rgba(253,247,242,0.9); font-size: 14px; resize: none; max-height: 80px;
  line-height: 1.5; font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
#maxxag-chat-input:focus { border-color: rgba(191,164,152,0.3); background: rgba(253,247,242,0.06); }
#maxxag-chat-input::placeholder { color: rgba(253,247,242,0.4); }
#maxxag-chat-send {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #664750, #4a3440);
  border: none; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 3px 12px rgba(102,71,80,0.4);
}
#maxxag-chat-send:hover { transform: scale(1.1); box-shadow: 0 5px 18px rgba(102,71,80,0.6); }
#maxxag-chat-send:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
#maxxag-chat-send svg { width: 17px; height: 17px; fill: #fdf7f2; }

/* ── Proactive notification ──────────────────────────────────── */
.maxxag-proactive {
  position: fixed;
  bottom: 90px; right: 16px;
  background: linear-gradient(135deg, rgba(102,71,80,0.95), rgba(74,52,64,0.95));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: #fdf7f2;
  padding: 14px 18px 14px 16px;
  border-radius: 18px 18px 6px 18px;
  font-size: 14px;
  font-family: inherit;
  box-shadow: 0 8px 32px rgba(102,71,80,0.4), 0 0 0 1px rgba(191,164,152,0.15);
  cursor: pointer;
  animation: maxxag-proactive-in 0.4s ease;
  z-index: 99998;
  max-width: min(260px, calc(100vw - 32px));
  line-height: 1.4;
  display: flex; align-items: center; gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.maxxag-proactive:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 44px rgba(102,71,80,0.5); }
.maxxag-proactive-bell {
  position: relative; font-size: 22px; line-height: 1;
  animation: maxxag-bell-ring 0.6s ease 0.5s;
}
.maxxag-proactive-badge {
  position: absolute; top: -5px; right: -6px;
  background: #f51957; color: #fff;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(74,52,64,0.95);
}
.maxxag-proactive-text { flex: 1; }
@keyframes maxxag-proactive-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes maxxag-bell-ring {
  0% { transform: rotate(0); }
  20% { transform: rotate(15deg); }
  40% { transform: rotate(-15deg); }
  60% { transform: rotate(10deg); }
  80% { transform: rotate(-5deg); }
  100% { transform: rotate(0); }
}

/* ── Focus & accessibility ───────────────────────────────────── */
.maxxag-btn:focus-visible, .maxxag-lang-flag:focus-visible,
#maxxag-chat-close:focus-visible, #maxxag-chat-send:focus-visible,
.maxxag-girl-wa:focus-visible {
  outline: 2px solid rgba(191,164,152,0.6);
  outline-offset: 2px;
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Performance: contain on all bubbles */
.maxxag-msg { contain: layout style paint; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   - Desktop:  > 768px   (2 cols, 380x580 window)
   - Tablet:   441-768px (2 cols, fullscreen on portrait)
   - Mobile:   <= 440px  (2 cols still, fullscreen, safe area)
   ============================================================ */

/* ── Tablet (portrait) ─────────────────────────────────────── */
@media (min-width: 441px) and (max-width: 768px) and (orientation: portrait) {
  #maxxag-chat-window {
    bottom: 0; right: 0;
    width: 100%; max-width: 100%;
    height: 100vh; height: 100dvh;
    max-height: 100vh; max-height: 100dvh;
    border-radius: 0;
  }
  .maxxag-girls-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .maxxag-girls-grid .maxxag-girl-card:last-child:nth-child(odd) { grid-column: auto; }
}

/* ── Mobile (phones) ──────────────────────────────────────── */
@media (max-width: 440px) {
  #maxxag-chat-window {
    top: 0; bottom: 0; left: 0; right: 0;
    width: 100%; max-width: 100%;
    height: 100vh; height: 100dvh;
    max-height: 100vh; max-height: 100dvh;
    min-height: 0;
    border-radius: 0;
  }
  #maxxag-chat-btn { bottom: 18px; right: 18px; }

  /* Girls: keep 2 columns but tight gap so both fit well */
  .maxxag-girls-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .maxxag-girls-grid .maxxag-girl-card:last-child:nth-child(odd) { grid-column: auto; }
  .maxxag-girl-card { border-radius: 12px; }
  .maxxag-girl-name { font-size: 12.5px; padding: 6px 8px 3px; }
  .maxxag-girl-info { padding: 0 6px 6px; }
  .maxxag-girl-wa { font-size: 11px; padding: 7px 10px; min-height: 36px; }

  /* Input bar: safe-area-inset-bottom for iOS home indicator / Android nav */
  #maxxag-chat-input-row {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  /* Send button stays 44px for WCAG tap target */
  #maxxag-chat-send { width: 42px; height: 42px; }

  /* Messages scroll smoothly on iOS */
  #maxxag-chat-messages { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* Proactive bubble off on mobile (intrusive, flickers) */
  .maxxag-proactive { display: none; }

  /* Header more compact on small screens */
  #maxxag-chat-header { padding: 10px 12px; }
  .maxxag-header-avatar-wrap { width: 36px; height: 36px; }
  .maxxag-bot-name { font-size: 13px; }

  /* Lang flags bigger on mobile to prevent tiny taps */
  .maxxag-lang-grid { max-width: 280px; gap: 12px; }
  .maxxag-lang-flag { border-radius: 10px; }

  /* Menu buttons more touch-friendly */
  .maxxag-btn { padding: 11px 12px; font-size: 13px; min-height: 44px; }
}

/* ── Very small screens (320-360px) ───────────────────────── */
@media (max-width: 360px) {
  /* Fallback: 1 column if really cramped */
  .maxxag-girls-grid { grid-template-columns: 1fr; gap: 10px; }
  .maxxag-girl-name { font-size: 15px; padding: 10px 12px 5px; }
  .maxxag-girl-wa { font-size: 13px; padding: 9px 14px; min-height: 40px; }
  .maxxag-girl-info { padding: 0 10px 10px; }
}
