/* =========================================================
   NUI POST UI STABLE
   IMPORTANT : aucune règle sur html/body/Feed global.
========================================================= */


/* =========================================================
   TEXTE LONG
========================================================= */

.nui-post-long-stable{
  cursor:pointer!important;
  touch-action:pan-y!important;
}


.nui-post-long-collapsed{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:5!important;

  overflow:hidden!important;

  max-height:none!important;
}


.nui-post-long-expanded{
  display:block!important;

  -webkit-line-clamp:unset!important;

  overflow:visible!important;

  max-height:none!important;
}


/* =========================================================
   COMMENTAIRES FAÇON FACEBOOK
========================================================= */

.nui-comments-facebook-overlay{
  position:fixed!important;
  inset:0!important;

  z-index:2147480000!important;

  display:flex!important;
  align-items:flex-end!important;

  background:rgba(18,30,40,.52)!important;

  backdrop-filter:blur(3px)!important;
}


.nui-comments-facebook-sheet{
  position:absolute!important;

  left:0!important;
  right:0!important;
  bottom:0!important;
  top:auto!important;

  width:100%!important;

  /*
   * Le panneau monte maintenant très haut,
   * comme Facebook.
   */
  height:78dvh!important;
  max-height:78dvh!important;
  min-height:78dvh!important;

  margin:0!important;

  border-radius:
    26px 26px 0 0!important;

  overflow:hidden!important;

  display:flex!important;
  flex-direction:column!important;

  background:#fff!important;

  box-shadow:
    0 -10px 35px rgba(0,0,0,.20)!important;
}


/*
 * Petit trait supérieur type Facebook.
 */
.nui-comments-facebook-sheet::before{
  content:""!important;

  display:block!important;

  flex:0 0 auto!important;

  width:42px!important;
  height:5px!important;

  margin:
    8px auto 2px!important;

  border-radius:999px!important;

  background:#c7cdd2!important;
}


/*
 * La partie commentaires peut défiler,
 * mais le reste de l'application reste totalement libre.
 */
.nui-comments-facebook-scroll{
  min-height:0!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}


/*
 * La zone de saisie reste en bas du panneau.
 */
.nui-comments-facebook-sheet form,
.nui-comments-facebook-sheet
  > *:has(
    input[placeholder*="commentaire" i]
  ),
.nui-comments-facebook-sheet
  > *:has(
    textarea[placeholder*="commentaire" i]
  ){
  flex:0 0 auto!important;
}


/*
 * Sur très petit écran :
 * toujours suffisamment haut.
 */
@media(max-height:700px){

  .nui-comments-facebook-sheet{
    height:84dvh!important;
    max-height:84dvh!important;
    min-height:84dvh!important;
  }
}
