/* Pin */

@layer stageshow {
  /* The rim and the face share one shape: a rounded square whose pointed
     corner is square. Percentage radii keep the inner shape nested inside
     the outer one at any size, so the corner never pokes out */
  .ss-pin {
    --ss-pin-r: 50% 50% 50% 0;
    position: relative;
    display: inline-grid;
    flex-shrink: 0;
    place-items: center;
    padding: 2px;
    box-sizing: border-box;
    border-radius: var(--ss-pin-r);
    background: var(--ss-surface);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.25);
    will-change: transform;
    transition: box-shadow 0.3s ease;
  }

  .ss-pin[data-corner="br"] { --ss-pin-r: 50% 50% 0 50%; }
  .ss-pin[data-corner="tl"] { --ss-pin-r: 0 50% 50% 50%; }
  .ss-pin[data-corner="tr"] { --ss-pin-r: 50% 0 50% 50%; }

  .ss-pin__face {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--ss-pin-r);
    background: var(--ss-ink-3);
    color: var(--ss-text-strong);
    font-weight: 600;
    line-height: 1;
  }

  .ss-pin[data-tone="accent"] .ss-pin__face {
    background: var(--ss-accent);
    color: #fff;
  }

  .ss-pin__face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* The open pin: a ring in its own color, with the surface showing between */
  .ss-pin[data-selected] {
    box-shadow: 0 0 0 1.5px var(--ss-surface), 0 0 0 3px var(--ss-accent), 0 2px 6px -1px rgba(0, 0, 0, 0.25);
  }

  .ss-pin[data-selected][data-tone="ink"] {
    box-shadow: 0 0 0 1.5px var(--ss-surface), 0 0 0 3px var(--ss-ink-5), 0 2px 6px -1px rgba(0, 0, 0, 0.25);
  }
}
