/* Post Reactions CSS */

.emoji {
  width: 40px;
  height: 40px;
  margin: 5px;
  background: #ffda6a;
  display: inline-block;
  border-radius: 50%;
  position: relative;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.emoji:hover {
  transform: scale(1.3);
}

.emoji:after {
  position: absolute;
  bottom: -22px;
  font-size: 10px;
  width: 40px;
  left: calc(50% - 20px);
  color: #8a8a8a;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.emoji:hover:after {
  opacity: 1;
}

.emoji__face,
.emoji__eyebrows,
.emoji__eyes,
.emoji__mouth,
.emoji__tongue,
.emoji__heart,
.emoji__hand,
.emoji__thumb {
  position: absolute;
}

.emoji__face:before, .emoji__face:after,
.emoji__eyebrows:before,
.emoji__eyebrows:after,
.emoji__eyes:before,
.emoji__eyes:after,
.emoji__mouth:before,
.emoji__mouth:after,
.emoji__tongue:before,
.emoji__tongue:after,
.emoji__heart:before,
.emoji__heart:after,
.emoji__hand:before,
.emoji__hand:after,
.emoji__thumb:before,
.emoji__thumb:after {
  position: absolute;
  content: "";
}

.emoji__face {
  width: inherit;
  height: inherit;
}

/* Like */
.emoji--like {
  background: #548dff;
}

.emoji--like .emoji__hand {
  left: 8px;
  bottom: 10px;
  width: 7px;
  height: 13px;
  background: #ffffff;
  border-radius: 2px;
  z-index: 0;
  -webkit-animation: hands-up 2s linear infinite;
          animation: hands-up 2s linear infinite;
}
.emoji--like .emoji__hand:before {
  left: 8px;
  bottom: 2px;
  width: 13px;
  background: inherit;
  height: 3px;
  border-radius: 1px 3px 3px 1px;
  box-shadow: 0px -3px 0 0px #ffffff, 0px -6px 0 1px #ffffff, 0px -9px 0 1px #ffffff;
}
.emoji--like .emoji__thumb {
  border-bottom: 7px solid #ffffff;
  border-left: 7px solid transparent;
  top: -8px;
  right: -8px;
  z-index: 2;
  transform: rotate(5deg);
  transform-origin: 0% 100%;
  -webkit-animation: thumbs-up 2s linear infinite;
          animation: thumbs-up 2s linear infinite;
}
.emoji--like .emoji__thumb:before {
  border-radius: 50% 50% 0 0;
  background: #ffffff;
  width: 3px;
  height: 4px;
  left: -3px;
  top: -3px;
  transform: rotate(-15deg);
  transform-origin: 100% 100%;
  box-shadow: -0.5px 1px 0 -0.5px #ffffff;
}

/* Love */
.emoji--love {
  background: #f55064;
}

.emoji--love .emoji__heart {
  left: calc(50% - 13px);
  top: calc(50% - 13px);
  width: 26px;
  height: 26px;
  -webkit-animation: heart-beat 1s linear infinite alternate;
          animation: heart-beat 1s linear infinite alternate;
}
.emoji--love .emoji__heart:before, .emoji--love .emoji__heart:after {
  left: calc(50% - 7px);
  top: calc(50% - 11px);
  width: 13px;
  height: 21px;
  background: #ffffff;
  border-radius: 7px 7px 0 0;
}
.emoji--love .emoji__heart:before {
  transform: translate(7px) rotate(-45deg);
  transform-origin: 0 100%;
}
.emoji--love .emoji__heart:after {
  transform: translate(-7px) rotate(45deg);
  transform-origin: 100% 100%;
}

/* Haha */

.emoji--haha .emoji__face {
  -webkit-animation: haha-face 2s linear infinite;
          animation: haha-face 2s linear infinite;
}
.emoji--haha .emoji__eyes {
  width: 9px;
  height: 2px;
  border-radius: 1px;
  left: calc(50% - 4px);
  top: 12px;
  transform: rotate(20deg);
  background: transparent;
  box-shadow: -8px 2px 0 0 #000000, 8px -2px 0 0 #000000;
}
.emoji--haha .emoji__eyes:after {
  left: 0;
  top: 0;
  width: 9px;
  height: 2px;
  border-radius: 1px;
  transform: rotate(-40deg);
  background: transparent;
  box-shadow: -8px -2px 0 0 #000000, 8px 2px 0 0 #000000;
}
.emoji--haha .emoji__mouth {
  width: 26px;
  height: 13px;
  left: calc(50% - 13px);
  top: 50%;
  background: #000000;
  border-radius: 0 0 13px 13px;
  overflow: hidden;
  z-index: 1;
  -webkit-animation: haha-mouth 2s linear infinite;
          animation: haha-mouth 2s linear infinite;
}
.emoji--haha .emoji__tongue {
  width: 23px;
  height: 10px;
  background: #f55064;
  left: calc(50% - 11px);
  bottom: -3px;
  border-radius: 50%;
}

/* Care */
.emoji--care:after {
  -webkit-animation: care-reverse 1s linear infinite;
          animation: care-reverse 1s linear infinite;
}
.emoji--care .emoji__face {
  -webkit-animation: care 1s linear infinite alternate;
          animation: care 1s linear infinite alternate;
}
.emoji--care .emoji__eyebrows {
  left: calc(50% - 1px);
  top: 10px;
  height: 2px;
  width: 2px;
  border-radius: 50%;
  background: transparent;
  box-shadow: -2px 0 0 0 #000000, -12px 0 0 0px #000000, 2px 0 0 0 #000000, 12px 0 0 0px #000000;
}
.emoji--care .emoji__eyebrows:before, .emoji--care .emoji__eyebrows:after {
  width: 12px;
  height: 6px;
  border-radius: 20px 20px 0 0;
  background: transparent;
  border: 2px solid black;
  box-sizing: border-box;
  border-bottom: 0;
  bottom: 1px;
  left: calc(50% - 6px);
}
.emoji--care .emoji__eyebrows:before {
  margin-left: -7px;
}
.emoji--care .emoji__eyebrows:after {
  margin-left: 7px;
}
.emoji--care .emoji__mouth {
  top: 20px;
  background: transparent;
  left: 50%;
}
.emoji--care .emoji__mouth:after {
  width: 26px;
  height: 26px;
  left: calc(50% - 13px);
  top: -25px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #000000;
  box-sizing: border-box;
  border-top-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
  z-index: 1;
}
.emoji--care .emoji__mouth:before {
  width: 2px;
  height: 2px;
  background: transparent;
  border-radius: 50%;
  bottom: 1px;
  left: calc(50% - 1px);
  box-shadow: -8px 0 0 0 #000000, 8px 0 0 0 #000000, -12px -0.5px 10px 3px #d5234c, 12px -0.5px 10px 3px #d5234c;
}

/* Wow */

.emoji--wow .emoji__face {
  -webkit-animation: wow-face 3s linear infinite;
          animation: wow-face 3s linear infinite;
}
.emoji--wow .emoji__eyebrows {
  left: calc(50% - 1px);
  height: 2px;
  width: 2px;
  border-radius: 50%;
  background: transparent;
  box-shadow: -6px 0 0 0 #000000, -11px 0 0 0 #000000, 6px 0 0 0 #000000, 11px 0 0 0 #000000;
  -webkit-animation: wow-brow 3s linear infinite;
          animation: wow-brow 3s linear infinite;
}
.emoji--wow .emoji__eyebrows:before, .emoji--wow .emoji__eyebrows:after {
  width: 8px;
  height: 7px;
  border: 2px solid #000000;
  box-sizing: border-box;
  border-radius: 50%;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
  top: -1px;
  left: calc(50% - 4px);
}
.emoji--wow .emoji__eyebrows:before {
  margin-left: -8px;
}
.emoji--wow .emoji__eyebrows:after {
  margin-left: 8px;
}
.emoji--wow .emoji__eyes {
  width: 5px;
  height: 8px;
  left: calc(50% - 2.5px);
  top: 12px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 8px 0 0 0 #000000, -8px 0 0 0 #000000;
}
.emoji--wow .emoji__mouth {
  width: 10px;
  height: 15px;
  left: calc(50% - 5px);
  top: 50%;
  border-radius: 50%;
  background: #000000;
  -webkit-animation: wow-mouth 3s linear infinite;
          animation: wow-mouth 3s linear infinite;
}

/* Sad */

.emoji--sad .emoji__face {
  -webkit-animation: sad-face 2s ease-in infinite;
          animation: sad-face 2s ease-in infinite;
}
.emoji--sad .emoji__eyebrows {
  left: calc(50% - 1px);
  top: 12px;
  height: 2px;
  width: 2px;
  border-radius: 50%;
  background: transparent;
  box-shadow: -13px 3px 0 0 #000000, -8px 0 0 0 #000000, 8px 0 0 0 #000000, 13px 3px 0 0 #000000;
}
.emoji--sad .emoji__eyebrows:before, .emoji--sad .emoji__eyebrows:after {
  width: 10px;
  height: 7px;
  border: 2px solid #000000;
  box-sizing: border-box;
  border-radius: 50%;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
  top: 0.5px;
  left: calc(50% - 5px);
}
.emoji--sad .emoji__eyebrows:before {
  margin-left: -10px;
  transform: rotate(-30deg);
}
.emoji--sad .emoji__eyebrows:after {
  margin-left: 10px;
  transform: rotate(30deg);
}
.emoji--sad .emoji__eyes {
  width: 5px;
  height: 5px;
  left: calc(50% - 2.5px);
  top: 16px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 8px 0 0 0 #000000, -8px 0 0 0 #000000;
}
.emoji--sad .emoji__eyes:after {
  background: #548dff;
  width: 4px;
  height: 4px;
  margin-left: 2px;
  border-radius: 0 100% 40% 50%/0 50% 40% 100%;
  transform-origin: 0% 0%;
  -webkit-animation: tear-drop 2s ease-in infinite;
          animation: tear-drop 2s ease-in infinite;
}
.emoji--sad .emoji__mouth {
  width: 20px;
  height: 26px;
  left: calc(50% - 10px);
  top: 26px;
  box-sizing: border-box;
  border: 2px solid #000000;
  border-radius: 50%;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
  background: transparent;
  -webkit-animation: sad-mouth 2s ease-in infinite;
          animation: sad-mouth 2s ease-in infinite;
}
.emoji--sad .emoji__mouth:after {
  width: 2px;
  height: 2px;
  background: transparent;
  border-radius: 50%;
  top: 1px;
  left: calc(50% - 1px);
  box-shadow: -6px 0 0 0 #000000, 6px 0 0 0 #000000;
}

/* Angry */
.emoji--angry {
  background: linear-gradient(#d5234c -10%, #ffda6a);
  background-size: 100%;
  -webkit-animation: angry-color 2s ease-in infinite;
          animation: angry-color 2s ease-in infinite;
}

.emoji--angry .emoji__face {
  -webkit-animation: angry-face 2s ease-in infinite;
          animation: angry-face 2s ease-in infinite;
}
.emoji--angry .emoji__eyebrows {
  left: calc(50% - 1px);
  top: 18px;
  height: 2px;
  width: 2px;
  border-radius: 50%;
  background: transparent;
  box-shadow: -14px 2px 0 0 #000000, -2px 5px 0 0 #000000, 2px 5px 0 0 #000000, 14px 2px 0 0 #000000;
}
.emoji--angry .emoji__eyebrows:before, .emoji--angry .emoji__eyebrows:after {
  width: 16px;
  height: 7px;
  border: 2px solid #000000;
  box-sizing: border-box;
  border-radius: 50%;
  border-top-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
  top: 0;
  left: calc(50% - 8px);
}
.emoji--angry .emoji__eyebrows:before {
  margin-left: -8px;
  transform: rotate(15deg);
}
.emoji--angry .emoji__eyebrows:after {
  margin-left: 8px;
  transform: rotate(-15deg);
}
.emoji--angry .emoji__eyes {
  width: 4px;
  height: 4px;
  left: calc(50% - 2px);
  top: 23px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 8px 0 0 0 #000000, -8px 0 0 0 #000000;
}
.emoji--angry .emoji__mouth {
  width: 12px;
  height: 6px;
  left: calc(50% - 6px);
  bottom: 5px;
  background: #000000;
  border-radius: 50%;
  -webkit-animation: angry-mouth 2s ease-in infinite;
          animation: angry-mouth 2s ease-in infinite;
}

/* Animations (Adjusted values slightly for smaller scale) */

@-webkit-keyframes heart-beat {
  25% { transform: scale(1.1); }
  75% { transform: scale(0.6); }
}
@keyframes heart-beat {
  25% { transform: scale(1.1); }
  75% { transform: scale(0.6); }
}

@-webkit-keyframes haha-face {
  10% { transform: translateY(8px); }
  20% { transform: translateY(5px); }
  30% { transform: translateY(8px); }
  40% { transform: translateY(5px); }
  50% { transform: translateY(8px); }
  60% { transform: translateY(0); }
  70% { transform: translateY(-3px); }
  80% { transform: translateY(0); }
  90% { transform: translateY(-3px); }
}
@keyframes haha-face {
  10% { transform: translateY(8px); }
  20% { transform: translateY(5px); }
  30% { transform: translateY(8px); }
  40% { transform: translateY(5px); }
  50% { transform: translateY(8px); }
  60% { transform: translateY(0); }
  70% { transform: translateY(-3px); }
  80% { transform: translateY(0); }
  90% { transform: translateY(-3px); }
}

@-webkit-keyframes haha-mouth {
  10% { transform: scale(0.6); top: 45%; }
  20% { transform: scale(0.8); top: 45%; }
  30% { transform: scale(0.6); top: 45%; }
  40% { transform: scale(0.8); top: 45%; }
  50% { transform: scale(0.6); top: 45%; }
  60% { transform: scale(1); top: 50%; }
  70% { transform: scale(1.2); top: 50%; }
  80% { transform: scale(1); top: 50%; }
  90% { transform: scale(1.1); top: 50%; }
}
@keyframes haha-mouth {
  10% { transform: scale(0.6); top: 45%; }
  20% { transform: scale(0.8); top: 45%; }
  30% { transform: scale(0.6); top: 45%; }
  40% { transform: scale(0.8); top: 45%; }
  50% { transform: scale(0.6); top: 45%; }
  60% { transform: scale(1); top: 50%; }
  70% { transform: scale(1.2); top: 50%; }
  80% { transform: scale(1); top: 50%; }
  90% { transform: scale(1.1); top: 50%; }
}

@-webkit-keyframes care {
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}
@keyframes care {
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

@-webkit-keyframes wow-face {
  15%, 25% { transform: rotate(20deg) translateX(-8px); }
  45%, 65% { transform: rotate(-20deg) translateX(8px); }
  75%, 100% { transform: rotate(0deg) translateX(0); }
}
@keyframes wow-face {
  15%, 25% { transform: rotate(20deg) translateX(-8px); }
  45%, 65% { transform: rotate(-20deg) translateX(8px); }
  75%, 100% { transform: rotate(0deg) translateX(0); }
}

@keyframes wow-brow {
  15%, 65% { top: 8px; }
  75%, 100%, 0% { top: 5px; }
}

@keyframes wow-mouth {
  10%, 30% { width: 7px; height: 7px; left: calc(50% - 3.5px); }
  50%, 70% { width: 10px; height: 13px; left: calc(50% - 5px); }
  75%, 100% { height: 16px; }
}

@keyframes sad-face {
  25%, 35% { top: -5px; }
  55%, 95% { top: 3px; }
  100%, 0% { top: 0; }
}

@keyframes sad-mouth {
  25%, 35% { transform: scale(0.85); top: 23px; }
  55%, 100%, 0% { transform: scale(1); top: 26px; }
}

@keyframes tear-drop {
  0%, 100% { display: block; left: 11px; top: 5px; transform: rotate(45deg) scale(0); }
  25% { display: block; left: 11px; transform: rotate(45deg) scale(2); }
  49.9% { display: block; left: 11px; top: 21px; transform: rotate(45deg) scale(0); }
  50% { display: block; left: -11px; top: 5px; transform: rotate(45deg) scale(0); }
  75% { display: block; left: -11px; transform: rotate(45deg) scale(2); }
  99.9% { display: block; left: -11px; top: 21px; transform: rotate(45deg) scale(0); }
}

@keyframes hands-up {
  25% { transform: rotate(15deg); }
  50% { transform: rotate(-15deg) translateY(-3px); }
  75%, 100% { transform: rotate(0deg); }
}

@keyframes thumbs-up {
  25% { transform: rotate(20deg); }
  50%, 100% { transform: rotate(5deg); }
}

@keyframes angry-color {
  45%, 60% { background-size: 250%; }
  85%, 100%, 0% { background-size: 100%; }
}

@keyframes angry-face {
  35%, 60% { transform: translateX(0) translateY(3px) scale(0.9); }
  40% { transform: translateX(-2px) translateY(3px) scale(0.9); }
  45% { transform: translateX(2px) translateY(3px) scale(0.9); }
  50% { transform: translateX(-2px) translateY(3px) scale(0.9); }
  55% { transform: translateX(2px) translateY(3px) scale(0.9); }
}

@keyframes angry-mouth {
  25%, 50% { height: 2px; bottom: 8px; }
}

/* Reaction Bar Styling */
.reactions-wrapper {
  position: relative;
  display: inline-block;
}

.reactions-bar {
  position: absolute;
  bottom: 100%;
  left: 0;
  display: flex;
  background: white;
  border-radius: 30px;
  padding: 5px 10px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(10px);
  z-index: 100;
  margin-bottom: 5px;
}

.reactions-wrapper:hover .reactions-bar {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.reaction-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.reaction-active {
    font-weight: bold;
}

.reaction-active[data-type="like"] { color: #548dff; }
.reaction-active[data-type="love"] { color: #f55064; }
.reaction-active[data-type="care"] { color: #ffda6a; }
.reaction-active[data-type="haha"] { color: #ffda6a; }
.reaction-active[data-type="wow"] { color: #ffda6a; }
.reaction-active[data-type="sad"] { color: #548dff; }
.reaction-active[data-type="angry"] { color: #d5234c; }

/* Comment-level reaction bar adjustments */
.comment-reactions-wrapper .reactions-bar {
    padding: 3px 6px;
    border-radius: 20px;
    margin-bottom: 3px;
    z-index: 200;
}

.comment-reactions-wrapper .reactions-bar .reaction-btn {
    transform: scale(0.65);
}

.comment-reactions-wrapper .reactions-bar .reaction-btn:hover {
    transform: scale(0.85);
}

/* Skeleton Loading Effects */
.skeleton {
    background: #e1e9ee;
    background-image: linear-gradient(90deg, #e1e9ee 0px, #f2f8fc 40px, #e1e9ee 80px);
    background-size: 600px;
    animation: skeleton-pulse 1.6s infinite linear;
}

@keyframes skeleton-pulse {
    0% { background-position: -100px; }
    40%, 100% { background-position: 140px; }
}

.skeleton-avatar {
    width: 36px;
    height: 36px;
}

.skeleton-bubble {
    background: #f0f2f5;
}

.skeleton-name {
    width: 80px;
    height: 12px;
    border-radius: 4px;
}

.skeleton-text {
    width: 100%;
    height: 10px;
    border-radius: 4px;
}

.skeleton-action {
    width: 40px;
    height: 10px;
    background: #e1e9ee;
    border-radius: 4px;
}
