/* Desktop comment drawer */
.comment-drawer,
.description-drawer {
  width: 500px;
  overflow: auto;
  background: #fff;
  border: 1px solid #ddd;
  transition: right 0.3s;
  margin-left: 27px;
  border-radius: 12px;
  z-index: 2;
}

.scrollable {
  /* max-height: 60vh; */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* smooth scrolling on iOS */
}

/* When open */
.comment-drawer.open {
  right: 0;
}

/* Mobile bottom sheet */
.comment-sheet {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 80vh;
  background: #fff;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
  transition: bottom 0.3s;
  z-index: 1050;
}

/* When open */
.comment-sheet.open {
  bottom: 0;
}

.text-black {
  color: black !important;
}

.reels-feed {
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  /* smooth scrolling on iOS */
  z-index: 0;
  position: relative;
}

.comment-drawer::-webkit-scrollbar,
.reels-feed::-webkit-scrollbar {
  display: none;
}

.reel-item {
  width: 100%;
  display: flex;
  position: relative;
  margin-bottom: 20px;
  justify-content: center;
  align-items: end;
}

.reel-btn-dots::after {
  display: none;
}

.open {
  display: block;
}

.close {
  display: none;
}

.reel-container {
  display: flex;
  justify-content: center;
}

/* Circular icon background */
.icon-btn {
  background: rgba(0, 0, 0, 0.5);
  /* semi-transparent black */
  color: #fff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  border: none;
  border: 1px solid white;
  transition: background 0.2s, transform 0.2s;
}

/* Hover effect */
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.promotional-link-wrapper .promoted-badge-btn {
  display: inline-block;
  color: black;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s ease;
  padding: 10px 15px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  border: 1px solid black;
  align-items: center;
}

.promoted-badge-btn:hover {
  background-color: black;
  color: white;
}

.promoted-badge-btn:hover i {
  color: white;
}

.reel-overlay {
  overflow: none;
  border-bottom: 1px solid #dee2e6;
  padding: 8px;
  z-index: 1;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.reel-overlay img {
  border: 1px solid white;
}

.comment-footer {
  background: #fff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.reel-video {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reel-description {
  max-height: 300px;
  /* adjust for visible area */
  overflow-y: auto;
  word-wrap: break-word;
  /* scroll if content exceeds height */
}

.reel-description::-webkit-scrollbar {
  width: 6px;
}

.reel-description::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.reel-description-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.reel-overplay {
  width: 400px;
}

.reel-description {
  font-size: 0.9rem;
  line-height: 1.2rem;
  overflow: none;
  max-height: 400px;
  position: relative;
}

/* Optional: style Read More link */
.reel-description a.read-more {
  cursor: pointer;
  text-decoration: underline;
}

.small-description {
  border-top: 1px solid #dee2e6;
  margin-top: 10px;
  margin-bottom: 0;
  word-break: break-word;
}

.reaction-btn,
.reply-reaction-btn {
  position: relative;
}

.reaction-emojis,
.reply-reaction-emojis {
  display: none;
  position: absolute;
  top: -30px;
  left: 0;
  background: #fff;
  padding: 4px 6px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  z-index: 10;
}

.reaction-emojis .emoji,
.reply-reaction-emojis .emoji {
  cursor: pointer;
  font-size: 1.2rem;
  margin: 0 4px;
}

.reaction-picker {
  bottom: 40px;
  right: 0;
  width: 230px;
  background-color: white;
  z-index: 1;
  display: none;
}

.reaction-btn:hover .reaction-picker {
  display: block;
}

.comment-reaction .reaction-picker {
  bottom: auto;
  left: 0;
  right: auto;
  width: max-content;
}

.reply-reaction .reaction-picker {
  left: 0;
  bottom: 35px;
  right: auto;
}

.reel-overlay {
  position: absolute;
  border: unset;
  width: 85%;
  top: 0;
  left: 0;
  border-top-right-radius: 12px;
  border-top-left-radius: 12px;
  color: white;
  background: linear-gradient(to bottom, rgb(0 0 0 / 75%), rgb(0 0 0 / 0%))
}

.reel-overlay * {
  color: white;
}

.reel-user-details div {
  position: absolute;
  width: 100%;
}

.reel-user-details * {
  color: white;
}

.reaction-btn:hover .reaction-emojis,
.reply-reaction-btn:hover .reply-reaction-emojis {
  display: block !important;
}

.number-count {
  color: black
}

.sidebar {
  height: 100%;
}

.sidebar .report-post .dropdown .dropdown-toggle::after {
  display: none;
}

.report-post ul li {
  padding: 5px 10px;
}

.save-post-btn * {
  position: relative;
  z-index: -1;
}

.comment-body {
  word-break: break-all;
  overflow-y: auto;
  height: calc(100vh - 275px);
}

@media screen and (max-width: 1024px) {
  .small-description {
    border-top: unset;
    margin-top: 0;
  }

  .comment-body {
    overflow-y: auto;
    height: 100%
  }


  .view-all-comments-wrap {
    position: sticky;
    bottom: 52px;
    background-color: white;
  }

  .comment-drawer,
  .description-drawer {
    position: absolute;
    width: 100%;
    bottom: 0;
    height: 100%;
    margin: 0;
  }

  .comment-footer {
    position: sticky;
    width: 100%;
    bottom: 0;
  }
}

@media screen and (max-width: 801px) {
  .reel-video {
    max-width: 800px;
  }
}

@media screen and (max-width: 768px) {
  .reel-item {
    flex-direction: column;
    align-items: center;
  }

  .number-count {
    color: white
  }


  .reel-wrapper {
    position: relative;
  }

  .sidebar {
    position: absolute;
    top: auto;
    right: 10px;
    z-index: 2;
    bottom: 75px;
  }
}

@media screen and (max-width: 376px) {
  .reel-item {
    margin-top: 0;
  }

  .reel-video {
    max-width: 315px;
  }
}