/*
 * GILDONG_COMMUNITY_EMOTE_UI_V2
 */


/* =========================================================
   ORIGINAL TEXTAREA
========================================================= */

.community-emote-source-v2{
  position:absolute !important;

  width:1px !important;
  height:1px !important;

  margin:0 !important;
  padding:0 !important;

  opacity:0 !important;

  pointer-events:none !important;

  overflow:hidden !important;

  clip-path:
    inset(50%) !important;
}


/* =========================================================
   VISUAL COMPOSER
========================================================= */

.community-rich-editor{
  width:100%;

  box-sizing:border-box;

  padding:14px 16px;

  border:
    1px solid
    rgba(95,110,93,.20);

  border-radius:10px;

  background:#fff;

  color:#394139;

  font:inherit;

  line-height:1.65;

  white-space:pre-wrap;

  word-break:break-word;

  outline:none;

  cursor:text;

  transition:
    border-color .15s ease,
    box-shadow .15s ease;
}


.community-rich-editor.is-comment-editor{
  min-height:112px;
}


.community-rich-editor.is-post-editor{
  min-height:280px;
}


.community-rich-editor:focus{
  border-color:
    rgba(56,95,66,.42);

  box-shadow:
    0 0 0 3px
    rgba(72,108,80,.08);
}


.community-rich-editor:empty::before{
  content:
    attr(data-placeholder);

  color:#9ca49c;

  pointer-events:none;
}


.community-compose-emote{
  display:inline-block;

  width:58px;
  height:58px;

  margin:
    2px 4px;

  object-fit:contain;

  vertical-align:middle;

  user-select:none;
}


/* =========================================================
   DISPLAYED POST / COMMENT EMOTE
========================================================= */

.community-inline-emote{
  display:inline-block;

  width:58px;
  height:58px;

  margin:
    2px 4px;

  object-fit:contain;

  vertical-align:middle;
}


/* =========================================================
   TOOLBAR
========================================================= */

.community-emote-toolbar{
  display:flex;
  align-items:center;

  margin:
    8px 0;
}


.community-emote-open{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  gap:6px;

  min-height:34px;

  padding:
    0 12px;

  border:
    1px solid
    rgba(132,110,73,.16);

  border-radius:10px;

  background:#f8f5ee;

  color:#655b4d;

  font:inherit;

  font-size:12px;
  font-weight:850;

  cursor:pointer;
}


.community-emote-open:hover{
  background:#f2eadb;
}


/* =========================================================
   NATIVE TOP-LAYER PICKER
========================================================= */

dialog.community-emote-picker{
  width:
    min(720px,calc(100vw - 40px));

  max-width:none;

  max-height:
    min(760px,calc(100dvh - 40px));

  margin:auto;

  padding:0;

  border:
    1px solid
    rgba(137,110,65,.16);

  border-radius:24px;

  background:#fffdf8;

  color:#453d32;

  overflow:hidden;

  box-shadow:
    0 28px 80px
    rgba(32,26,18,.32);
}


dialog.community-emote-picker::backdrop{
  background:
    rgba(24,20,15,.58);

  backdrop-filter:
    blur(6px);
}


.community-emote-picker-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;

  gap:18px;

  padding:
    20px 22px 16px;

  border-bottom:
    1px solid
    rgba(123,101,64,.10);
}


.community-emote-picker-head > div{
  display:flex;
  flex-direction:column;

  min-width:0;
}


.community-emote-picker-head strong{
  color:#332e27;

  font-size:20px;
  font-weight:950;
}


.community-emote-picker-head span{
  margin-top:4px;

  color:#918778;

  font-size:11px;
}


.community-emote-picker-close{
  flex:0 0 auto;

  width:38px;
  height:38px;

  padding:0;

  border:
    1px solid
    rgba(119,98,65,.12);

  border-radius:50%;

  background:#f4efe5;

  color:#615748;

  font-size:26px;
  line-height:1;

  cursor:pointer;
}


.community-emote-picker-body{
  max-height:
    calc(100dvh - 150px);

  overflow:auto;

  padding:
    18px 22px 24px;
}


.community-emote-picker-message{
  min-height:220px;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:30px;

  color:#918779;

  text-align:center;

  line-height:1.7;
}


/* =========================================================
   PACK
========================================================= */

.community-emote-pack +
.community-emote-pack{
  margin-top:24px;

  padding-top:22px;

  border-top:
    1px solid
    rgba(120,99,65,.10);
}


.community-emote-pack-head{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:12px;

  margin-bottom:11px;
}


.community-emote-pack-head strong{
  min-width:0;

  color:#4a4135;

  font-size:15px;
  font-weight:950;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}


.community-emote-pack-head span{
  flex:0 0 auto;

  color:#998e7e;

  font-size:10px;
  font-weight:800;
}


.community-emote-grid{
  display:grid;

  grid-template-columns:
    repeat(
      auto-fill,
      minmax(92px,1fr)
    );

  gap:10px;
}


.community-emote-item{
  min-width:0;

  display:flex;
  flex-direction:column;
  align-items:center;

  gap:6px;

  padding:8px;

  border:
    1px solid
    rgba(126,105,70,.11);

  border-radius:14px;

  background:#fff;

  color:#746a5d;

  font:inherit;

  font-size:9px;
  font-weight:800;

  cursor:pointer;
}


.community-emote-item:hover{
  transform:
    translateY(-2px);

  border-color:
    rgba(161,126,63,.26);

  box-shadow:
    0 8px 18px
    rgba(80,63,35,.08);
}


.community-emote-item img{
  display:block;

  width:76px;
  height:76px;

  max-width:100%;

  object-fit:contain;
}


.community-emote-item span{
  width:100%;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;

  text-align:center;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width:640px){

  .community-compose-emote,
  .community-inline-emote{
    width:50px;
    height:50px;
  }


  .community-rich-editor.is-post-editor{
    min-height:220px;
  }


  dialog.community-emote-picker{
    width:
      calc(100vw - 20px);

    max-height:
      calc(100dvh - 20px);

    margin:
      auto 10px 10px;

    border-radius:
      22px 22px 14px 14px;
  }


  .community-emote-picker-head{
    padding:
      17px 16px 14px;
  }


  .community-emote-picker-body{
    max-height:
      calc(100dvh - 120px);

    padding:
      15px 14px 20px;
  }


  .community-emote-grid{
    grid-template-columns:
      repeat(
        auto-fill,
        minmax(72px,1fr)
      );

    gap:8px;
  }


  .community-emote-item{
    padding:6px;
  }


  .community-emote-item img{
    width:62px;
    height:62px;
  }
}


/* =========================================================
   GILDONG_COMMUNITY_WRITE_COMPACT_EMOTE_V1
========================================================= */

.community-rich-editor.is-post-editor{
  min-height:
    210px;
}


@media(max-width:640px){

  .community-rich-editor.is-post-editor{
    min-height:
      170px;
  }

}



/* =========================================================
   GILDONG_COMMUNITY_WRITE_COMPACT_EMOTE_V2
========================================================= */

.community-rich-editor.is-post-editor{
  min-height:
    160px !important;
}


@media(max-width:760px){

  .community-rich-editor.is-post-editor{
    min-height:
      140px !important;
  }

}

