/* TENIMPER v50.26.1 — comment action menu clipping fix */

/*
  The admin/comment action dropdown was being clipped near the bottom of
  the comments area. v50.22 also added contain:layout style to cards,
  which creates a containing/clipping context for absolutely positioned UI.
*/

/* Never clip action popovers inside a comment card. */
.comments-section,
.comments-section .comment-card,
.comments-section .ti-c49-card,
.comments-section .ti-c49-actions{
  overflow:visible!important;
}

.comments-section .comment-card,
.comments-section .ti-c49-card{
  contain:none!important;
}

/* The action row is the positioning anchor. */
.comments-section .ti-c49-actions{
  position:relative!important;
  z-index:20;
}

/* Open the menu upward so comments close to the page/footer stay fully visible. */
.comments-section .ti-c49-actions__menu{
  position:absolute!important;
  top:auto!important;
  bottom:calc(100% + 8px)!important;
  right:0!important;
  left:auto!important;
  z-index:1000!important;

  width:max-content!important;
  min-width:190px!important;
  max-width:min(270px,calc(100vw - 24px))!important;
  max-height:min(360px,60vh)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;

  border-radius:13px!important;
  box-shadow:0 14px 38px rgba(42,25,16,.18)!important;
}

/* Keep every menu item fully inside the popup. */
.comments-section .ti-c49-actions__menu > *,
.comments-section .ti-c49-actions__menu a,
.comments-section .ti-c49-actions__menu button{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  white-space:nowrap!important;
}

/* On very narrow phones the menu may align from the left edge of the action row. */
@media(max-width:520px){
  .comments-section .ti-c49-actions__menu{
    right:auto!important;
    left:0!important;
    min-width:180px!important;
    max-width:calc(100vw - 28px)!important;
  }
}
