.edmmix-smile-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  vertical-align: middle;
  z-index: 2;
}

.edmmix-smile-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.edmmix-smile-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* 挂到 body 上，避免被 activity/回复区 overflow 裁切 */
.edmmix-smile-panel {
  position: fixed;
  z-index: 999999;
  width: auto;
  max-width: calc(100vw - 16px);
  max-height: min(280px, 50vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(6, 36px);
  gap: 4px;
  justify-content: start;
  -webkit-overflow-scrolling: touch;
}

.edmmix-smile-panel[hidden] {
  display: none !important;
}

.edmmix-smile-panel a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 4px;
  box-sizing: border-box;
}

.edmmix-smile-panel a:hover {
  background: #f3f4f6;
}

.edmmix-smile-panel img {
  width: 28px;
  height: 28px;
  display: block;
}

#buddypress .ac-reply-content,
#buddypress .ac-form,
#buddypress #whats-new-options,
#buddypress #whats-new-submit,
#buddypress .activity-update-form {
  overflow: visible !important;
}

#buddypress .ac-reply-content .edmmix-smile-wrap,
.ac-form .edmmix-smile-wrap {
  margin: 6px 8px 6px 0;
}

.comt-ctrl .edmmix-smile-wrap {
  margin-right: 6px;
}

img.wp-smiley,
.activity img.wp-smiley,
.comment .wp-smiley,
.activity-inner img.wp-smiley,
.acomment-content img.wp-smiley {
  width: 28px !important;
  height: 28px !important;
  max-height: 28px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 2px !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

body.night .edmmix-smile-panel {
  background: #232323;
  border-color: #303030;
}

body.night .edmmix-smile-panel a:hover {
  background: #303030;
}
