/* Same icon-button-toggles-a-panel pattern as .toc-open-button/
   .toc-overlay-panel (article_toc/article_toc_overlay.css) -- see union_position_info.js. */
.position-info-widget {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
}

.position-info-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
}

.position-info-button:hover,
.position-info-button:focus-visible {
  color: var(--accent-color, var(--color-border));
}

.position-info-icon {
  width: 1.3rem;
  height: 1.3rem;
}

/* background-color/border come from ../shared/popover_base.css */
.position-info-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  z-index: 50;
  width: min(85vw, 20rem);
  box-sizing: border-box;
  padding: 1rem;
  text-align: left;
  border-left: 6px solid var(--accent-color, var(--color-border));
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--color-shadow);
}

.position-info-panel[hidden] {
  display: none;
}

/* Mobile: same problem as the nav dropdown (dropdownmenu.css) -- anchored
to a small icon whose position varies per card in the grid, so the panel
can run into the sidemenu or off the edge of the screen. The icon itself
(.position-info-widget) stays exactly where it is; only the panel escapes
to a fixed, viewport-relative spot instead of growing from the icon.
`top` is set inline by union_position_info.js -- just under the icon,
pushed back up if that would run it off the bottom of the screen. */
@media (max-width: 45rem) {
  .position-info-panel {
    position: fixed;
    /* 60px clears the sidemenu's collapsed rail at any width in this
       range (60px desktop-collapsed / 56px mobile-collapsed, see
       sidemenu.css), plus a small gutter matching the page's own mobile
       side padding (home_layout.css). */
    left: calc(60px + 0.75rem);
    right: 0.75rem;
    margin-top: 0;
    width: auto;
    max-width: none;
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* display/align-items/justify-content/gap come from ../shared/popover_base.css */
.position-info-header {
  margin: 0 0 0.5rem;
}

/* margin/font-weight come from ../shared/popover_base.css */
.position-info-title {
  font-size: 0.85rem;
}

/* flex/cursor come from ../shared/popover_base.css */
.position-info-close {
  padding: 0.1rem 0.5rem;
  background: none;
  border: 1px solid var(--color-text-muted);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.position-info-close:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}

/* Bigger text + more breathing room between lines/items, specifically
inside this popover -- the inline Open Positions card (union_member_
card.css's own .union-position-responsibilities rule, shared by both
contexts) stays at its original compact size; two-class selectors here
outweigh that one-class rule regardless of stylesheet order, so only this
reading context gets scaled up. */
.position-info-panel .union-position-responsibilities h4 {
  font-size: 0.95rem;
}

.position-info-panel .union-position-responsibilities ul {
  font-size: 0.95rem;
  line-height: 1.6;
}

.position-info-panel .union-position-responsibilities li + li {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-border);
}
