/* Modern Kitchen V4.4 — separate premium shopping assistant and WhatsApp stack */
body.mk-luxury-v4 {
  --mka-stack-right: clamp(14px,2vw,28px);
  --mka-wa-bottom: clamp(18px,2.5vw,32px);
  --mka-avatar-bottom: calc(var(--mka-wa-bottom) + 82px);
}
/* Restore the actual WhatsApp launcher independently. */
body.mk-luxury-v4 .mkv4-whatsapp-float {
  display:flex!important;
  position:fixed!important;
  right:var(--mka-stack-right)!important;
  bottom:var(--mka-wa-bottom)!important;
  left:auto!important;
  width:60px!important;
  height:60px!important;
  z-index:9904!important;
}
/* The assistant remains its existing button; only its identity changes. */
body.mk-luxury-v4 #mka-launch {
  position:fixed!important;
  right:calc(var(--mka-stack-right) - 5px)!important;
  bottom:var(--mka-avatar-bottom)!important;
  left:auto!important;
  width:70px!important;
  height:70px!important;
  border-radius:50%!important;
  padding:0!important;
  border:3px solid #f5c79d!important;
  background:linear-gradient(135deg,#534036,#28231f)!important;
  box-shadow:0 14px 32px rgba(30,21,16,.24),0 0 0 4px rgba(225,160,106,.13)!important;
  overflow:visible!important;
  z-index:9905!important;
  display:grid!important;
  place-items:center!important;
  transition:transform .25s ease,box-shadow .25s ease!important;
}
body.mk-luxury-v4 #mka-launch:hover,
body.mk-luxury-v4 #mka-launch:focus-visible {
  transform:translateY(-3px) scale(1.035);
  box-shadow:0 17px 36px rgba(30,21,16,.28),0 0 0 5px rgba(225,160,106,.22)!important;
}
body.mk-luxury-v4 #mka-launch img.mka-person-avatar {
  width:100%!important;height:100%!important;
  display:block!important;
  object-fit:cover!important;
  border-radius:50%!important;
  pointer-events:none;
  background:#5e4338;
}
body.mk-luxury-v4 #mka-launch > svg {display:none!important}
body.mk-luxury-v4 #mka-launch .mka-status-dot {
  position:absolute!important;
  width:15px!important;height:15px!important;
  top:auto!important;right:0!important;bottom:2px!important;
  background:#24bc69!important;border:3px solid #fff!important;
  border-radius:50%!important;z-index:2!important;
}
/* One calm welcome bubble to the left of the portrait. */
body.mk-luxury-v4 .mka-avatar-welcome {
  position:fixed;
  right:calc(var(--mka-stack-right) + 80px);
  bottom:calc(var(--mka-avatar-bottom) + 5px);
  width:max-content;
  max-width:min(270px,calc(100vw - 120px));
  min-width:180px;
  z-index:9905;
  direction:rtl;
  text-align:right;
  background:#fffcf8;
  border:1px solid #e2cbb5;
  border-radius:18px 18px 5px 18px;
  box-shadow:0 16px 44px rgba(35,26,19,.18);
  color:#30251d;
  padding:13px 32px 13px 15px;
  font-family:"IBM Plex Sans Arabic","Tajawal",Tahoma,sans-serif;
  opacity:0;visibility:hidden;transform:translateX(10px) translateY(5px);
  pointer-events:none;
  transition:opacity .35s ease,transform .35s ease,visibility .35s;
}
body.mk-luxury-v4 .mka-avatar-welcome::after {
  content:"";position:absolute;right:-6px;bottom:17px;
  width:11px;height:11px;transform:rotate(45deg);
  border-top:1px solid #e2cbb5;border-right:1px solid #e2cbb5;
  background:#fffcf8;
}
body.mk-luxury-v4 .mka-avatar-welcome.is-visible{
  opacity:1;visibility:visible;transform:translateX(0) translateY(0);
  pointer-events:auto;
}
body.mk-luxury-v4 .mka-avatar-welcome strong {
  display:block;font-size:.85rem;font-weight:750;line-height:1.75;
  color:#33271f;
}
body.mk-luxury-v4 .mka-avatar-welcome small {
  display:block;margin-top:2px;color:#7c6b5a;font-size:.73rem;line-height:1.75;
}
body.mk-luxury-v4 .mka-avatar-welcome button {
  position:absolute;top:5px;left:6px;right:auto;
  width:26px;height:26px;display:grid;place-items:center;
  padding:0!important;background:transparent;color:#76604e;border:0;
  border-radius:7px;font-size:17px;cursor:pointer;
}
body.mk-luxury-v4 .mka-avatar-welcome button:hover{background:#f3e8dc;color:#4b3021}
body.mk-luxury-v4 .mka-avatar-welcome :focus-visible{outline:2px solid #ad704d;outline-offset:2px}
/* The chat panel lives above the *two* independent buttons. */
body.mk-luxury-v4 #mka-panel {
  right:var(--mka-stack-right)!important;
  left:auto!important;
  bottom:calc(var(--mka-avatar-bottom) + 82px)!important;
  max-height:min(650px,calc(100dvh - (var(--mka-avatar-bottom) + 98px)))!important;
  z-index:9906!important;
}
body.mk-luxury-v4 .mka-header-badge {
  background:#3e3028 url("shopping-assistant-avatar.webp") center/cover no-repeat!important;
  font-size:0!important;
}
body.mk-luxury-v4 .mka-header-badge::first-letter{font-size:0}
/* Mobile drawer and other overlays take priority over floating surfaces. */
body.mk-luxury-v4.mkv4-filters-opened .mka-avatar-welcome,
body.mk-luxury-v4.mkv4-filters-opened #mka-launch,
body.mk-luxury-v4.mkv4-filters-opened #mka-panel {
  visibility:hidden!important;opacity:0!important;pointer-events:none!important;
}
@media(max-width:500px){
  body.mk-luxury-v4 {
    --mka-stack-right:15px;
    --mka-wa-bottom:max(15px,env(safe-area-inset-bottom) + 12px);
    --mka-avatar-bottom:calc(var(--mka-wa-bottom) + 74px);
  }
  body.mk-luxury-v4 .mkv4-whatsapp-float{width:56px!important;height:56px!important}
  body.mk-luxury-v4 #mka-launch{width:62px!important;height:62px!important;right:12px!important}
  body.mk-luxury-v4 .mka-avatar-welcome {
    right:calc(var(--mka-stack-right) + 70px);
    bottom:calc(var(--mka-avatar-bottom) + 3px);
    min-width:0;width:210px;max-width:calc(100vw - 105px);
    padding:11px 27px 11px 12px;
  }
  body.mk-luxury-v4 .mka-avatar-welcome strong{font-size:.77rem}
  body.mk-luxury-v4 .mka-avatar-welcome small{font-size:.68rem}
  body.mk-luxury-v4 #mka-panel{
    right:12px!important;
    bottom:calc(var(--mka-avatar-bottom) + 72px)!important;
    width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - (var(--mka-avatar-bottom) + 90px))!important;
  }
}
@media(max-height:570px){
  body.mk-luxury-v4 .mka-avatar-welcome{display:none!important}
  body.mk-luxury-v4 #mka-panel{max-height:calc(100dvh - 170px)!important}
}
@media(prefers-reduced-motion:reduce){
  body.mk-luxury-v4 #mka-launch,
  body.mk-luxury-v4 .mka-avatar-welcome {transition:none!important;animation:none!important}
}


/* Hide the old pre-unified launcher: there must be only the portrait + WhatsApp. */
body.mk-luxury-v4 .mk-chat-launch,
body.mk-luxury-v4 #mk-chat-panel {display:none!important;visibility:hidden!important;pointer-events:none!important}
