/* ── Messenger Widget for mebeldagestana.ru ─────────────────── */
.float-wa { display: none !important; }

#msgr-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 99998;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── FAB ── */
#msgr-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 99999;
}

#msgr-fab:hover { transform: scale(1.08); }

#msgr-fab svg { width: 28px; height: 28px; fill: #fff; }

#msgr-widget.msgr-open #msgr-fab {
  transform: rotate(180deg) scale(0.9);
  background: #B5A38D;
}

#msgr-widget.msgr-open #msgr-fab svg { opacity: 0; }

#msgr-widget.msgr-open #msgr-fab::after {
  content: '✕';
  position: absolute;
  font-size: 22px;
  color: #fff;
  font-weight: 300;
}

/* ── Tooltip ── */
#msgr-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#msgr-tooltip::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  border: 7px solid transparent;
  border-left-color: #fff;
}

#msgr-widget:not(.msgr-open):hover #msgr-tooltip { opacity: 1; }

/* ── Expanded menu ── */
#msgr-menu {
  position: absolute !important;
  bottom: 68px !important;
  right: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
}

#msgr-widget.msgr-open #msgr-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ── Menu items ── */
.msgr-item {
  display: flex !important;
  align-items: center !important;
  background: #fff !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  text-decoration: none !important;
  color: #333 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
  transition: transform 0.2s ease;
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 200px !important;
}

.msgr-item:hover { transform: translateX(-3px); color: #333; }

.msgr-item span:first-child {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msgr-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 10px;
}

.msgr-item-icon svg { width: 20px; height: 20px; fill: #fff; }

.msgr-wa-icon { background: #25D366; }
.msgr-tg-icon { background: #0088cc; }
.msgr-max-icon { background: #6C5CE7; }

/* ── Footer ── */
#msgr-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

#msgr-footer svg { width: 14px; height: 14px; fill: #888; flex-shrink: 0; }

/* ── Mobile ── */
@media (max-width: 600px) {
  #msgr-widget { bottom: 20px; right: 20px; }
  #msgr-fab { width: 56px; height: 56px; }
  #msgr-menu { width: 220px; max-width: 220px; }
  #msgr-tooltip { display: none; }
}

/* ── Accessibility ── */
#msgr-fab:focus-visible,
.msgr-item:focus-visible {
  outline: 2px solid #0088cc;
  outline-offset: 3px;
}