.tmc-share-wrap {
  position: relative;
  display: inline-flex;
}

.tmc-share-wrap--forum-feed {
  order: 2;
  margin-left: auto;
}

.tmc-share-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  z-index: 200;
}

.tmc-share-wrap--align-end .tmc-share-menu {
  left: auto;
  right: 0;
}

/* Camping detail — share button sits on the right; keep dropdown in viewport */
.cd-page .cd-page-header,
.cd-page .cd-page-header-inner,
.cd-page .cd-header-actions,
.cd-page .tmc-share-wrap {
  overflow: visible;
}

.cd-page .tmc-share-wrap--pill .tmc-share-menu {
  z-index: 500;
}

.tmc-share-wrap--forum-feed .tmc-share-menu {
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 500;
}

.forum-feed-page .forum-feed-card__footer,
.forum-feed-page .forum-feed-card__actionbar {
  overflow: visible;
  position: relative;
  z-index: 2;
}

.forum-feed-page .forum-feed-card:has(.tmc-share-menu:not([hidden])) {
  overflow: visible;
  z-index: 30;
}

.forum-topic-page .forum-feed-card__footer,
.forum-topic-page .forum-feed-card__actionbar,
.forum-topic-page .forum-topic-post:has(.tmc-share-menu:not([hidden])) {
  overflow: visible;
}

.forum-topic-page .forum-topic-post:has(.tmc-share-menu:not([hidden])) {
  position: relative;
  z-index: 30;
}

.tmc-share-menu[hidden] {
  display: none;
}

.tmc-share-menu a,
.tmc-share-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #102a2d;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s ease;
}

.tmc-share-menu a:hover,
.tmc-share-menu button:hover {
  background: #f8fafc;
}

.tmc-share-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 18px;
  border-radius: 8px;
  background: #102a2d;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tmc-share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
