/* Post ⋯ menus — must escape card bounds; futuristic dropdown skin */

article.x-post,
.x-post {
  overflow: visible !important;
}

.x-post-row,
.x-post-header,
.x-post-body,
.x-post-menu-wrap {
  overflow: visible !important;
}

.x-post-menu-wrap {
  position: relative;
  z-index: 40;
  isolation: isolate;
}

.x-post-more.is-open,
.x-post-more[aria-expanded="true"] {
  color: #1d9bf0 !important;
  background: rgba(29, 155, 240, 0.18) !important;
  box-shadow: 0 0 16px rgba(29, 155, 240, 0.45), inset 0 0 0 1px rgba(138, 99, 255, 0.25);
}

.x-post-menu,
.yal-reply-menu.open,
.yal-reply-menu-wrap.open .yal-reply-menu {
  z-index: 14000 !important;
  position: absolute !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  min-width: 240px;
  padding: 0.35rem 0;
  border-radius: 14px !important;
  border: 1px solid rgba(138, 99, 255, 0.38) !important;
  background: rgba(6, 8, 12, 0.94) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(29, 155, 240, 0.18),
    0 0 40px rgba(138, 99, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  animation: yal-post-menu-in 0.22s cubic-bezier(0.34, 1.45, 0.64, 1);
  transform-origin: top right;
}

.x-post-menu::before,
.yal-reply-menu.open::before,
.yal-reply-menu-wrap.open .yal-reply-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(29, 155, 240, 0.55), rgba(138, 99, 255, 0.45), rgba(240, 36, 155, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

.x-post-menu button,
.yal-reply-menu button {
  position: relative;
  z-index: 1;
  color: #e7e9ea !important;
  font-weight: 600 !important;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, padding-left 0.16s ease;
}

.x-post-menu button:hover,
.yal-reply-menu button:hover {
  background: linear-gradient(90deg, rgba(29, 155, 240, 0.16), rgba(138, 99, 255, 0.14)) !important;
  transform: translateX(2px);
}

.x-post-menu button.danger,
.yal-reply-menu button[data-action="delete-reply"] {
  color: #f4212e !important;
}

.x-post-menu button.danger:hover,
.yal-reply-menu button[data-action="delete-reply"]:hover {
  background: rgba(244, 33, 46, 0.14) !important;
  color: #ff5a67 !important;
}

.yal-reply-menu-wrap.open .yal-reply-more {
  color: #1d9bf0;
  background: rgba(29, 155, 240, 0.14);
  box-shadow: 0 0 12px rgba(29, 155, 240, 0.35);
}

.yal-profile-more-menu {
  z-index: 15000 !important;
  border: 1px solid rgba(138, 99, 255, 0.38) !important;
  background: rgba(6, 8, 12, 0.96) !important;
  backdrop-filter: blur(14px);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(29, 155, 240, 0.18) !important;
  animation: yal-post-menu-in 0.22s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.yal-profile-more-menu button:hover {
  background: linear-gradient(90deg, rgba(29, 155, 240, 0.16), rgba(138, 99, 255, 0.14)) !important;
}

@keyframes yal-post-menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .x-post-menu,
  .yal-reply-menu.open,
  .yal-reply-menu-wrap.open .yal-reply-menu,
  .yal-profile-more-menu {
    animation: none !important;
  }
}