/* SB Hero Tags — by Storvik & Bjerkeng. Change #hero-tags if your hero uses a different ID */
#hero-tags {
  position: relative;
  overflow: hidden;
}
/* Desktop only: hide the system cursor over the hero; the dot follows instead */
@media (hover: hover) and (pointer: fine) {
  #hero-tags.sb-tags-ready { cursor: none; }
}
/* Mobile and tablet: tagging is off, so hide the hint and the cursor dot */
@media not all and (hover: hover) and (pointer: fine) {
  #hero-tags [data-tag-hint],
  #hero-tags .sb-tag-cursor { display: none; }
}
#hero-tags a, #hero-tags button, #hero-tags [data-no-tag], #hero-tags [data-tag-hint] { cursor: pointer; }
#hero-tags .tag-label { cursor: text; }

/* Shared dot look: placed tags and the cursor use the same rules */
.tag-dot,
.sb-tag-cursor {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ff9133;
  box-shadow: 0 0 0 5px rgba(255,255,255,.35), 0 1px 4px rgba(0,0,0,.3);
}

.sb-tag-cursor {
  position: absolute;
  top: 0; left: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transition: opacity .12s;
}
.sb-tag-cursor.is-visible { opacity: 1; }

.tag {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  width: 0; height: 0;
}
.tag-dot {
  position: absolute;
  left: -6px; top: -6px;
  padding: 0;
  border: 0;
  appearance: none;
  cursor: pointer;
  animation: tag-pop .25s ease-out;
  transition: transform .15s ease-out;
}
/* Bigger click area than the visible 12px dot */
.tag-dot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
/* Hover/focus: dot turns white. The #hero-tags prefix beats theme/Elementor button styles. */
#hero-tags .tag-dot:hover,
#hero-tags .tag-dot:focus,
#hero-tags .tag-dot:active {
  background: #fff;
  color: inherit;
  border: 0;
  outline: none;
  box-shadow: 0 0 0 5px rgba(255,255,255,.35), 0 1px 4px rgba(0,0,0,.3);
}
#hero-tags .tag-dot:hover { transform: scale(1.2); }
#hero-tags .tag-dot:focus:not(:hover) { background: #ff9133; }
#hero-tags .tag-dot:focus-visible { background: #fff; outline: 2px solid #fff; outline-offset: 6px; }

/* Fade out when removed */
.tag { transition: opacity .2s ease-out; }
.tag.is-removing { opacity: 0; pointer-events: none; }
.tag-label {
  position: absolute;
  top: 0;
  left: 18px;
  transform: translateY(-50%);
  width: max-content;
  max-width: 200px;
  white-space: normal;
  overflow-wrap: anywhere;
  background: #fff;
  padding: 10px;
  border-radius: 6px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  color: #1a1a1a;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  outline: none;
  min-width: 1ch;
}
.tag-label:empty::before { content: attr(data-placeholder); color: #9a9a9a; }
.tag-label:focus-visible { box-shadow: 0 0 0 2px #1a1a1a, 0 2px 10px rgba(0,0,0,.15); }
.tag.flip .tag-label { left: auto; right: 18px; }

/* Timestamp: opposite side of the dot from the label */
.tag-time {
  position: absolute;
  top: 0;
  right: 18px;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.6);
  pointer-events: none;
  user-select: none;
}
.tag.flip .tag-time { right: auto; left: 18px; }

@keyframes tag-pop { from { transform: scale(0); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .tag-dot, .tag { animation: none; transition: none; } .sb-tag-cursor { transition: none; } }
