/* Container establishes the boundaries */
.image-widget {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;        /* Prevents overflow on small screens */
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
}

.image-widget img {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

/* The Overlay - covers the image entirely */
.image-widget .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75); /* Dark semi-transparent background */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Hidden state */
  opacity: 0;
  pointer-events: none; /* Prevents clicks on hidden links */
  transition: opacity 0.3s ease;
}

/* Active state (toggled via TypeScript) */
.image-widget.is-active .overlay {
  opacity: 1;
  pointer-events: auto;
}

.image-widget.is-active img {
  opacity: 0.4; /* Dims the background image to make links pop */
}

/* Internal Menu Styling */
.overlay-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  width: 80%;
  max-width: 250px;
}

.menu-title {
  color: #a1a1aa;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 12px;
}

.menu-title:first-child {
  margin-top: 0;
}

.menu-btn {
  color: #ffffff;
  text-decoration: none;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.menu-btn:active {
  transform: scale(0.98);
}
