/* Share/export button chrome. Split mechanically from mobile-refinements.css;
   the lazy poster studio modal remains owned by poster-studio.css. */

body.is-map-active .panel-controls .share-button {
  min-height: 36px;
  padding-inline: 9px;
  font-size: 0.62rem;
}

.share-button {
  min-width: 124px;
  border-color: var(--material-black-key-edge);
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.13) 0 1px, transparent 1px 100%),
    var(--material-black-key);
  background-size: 7px 100%, auto;
  color: var(--material-black-key-text);
  line-height: 1.02;
}

.share-button {
  min-width: 104px;
  letter-spacing: 0.04em;
}

.share-button {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  overflow: hidden;
  border-color: rgba(0, 0, 0, 0.84);
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.13) 0 1px, transparent 1px 100%),
    var(--material-black-key);
  background-size: 7px 100%, auto;
  color: var(--material-black-key-text);
}

.share-button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--material-led-ready);
  box-shadow: 0 0 0 1px rgba(255, 253, 247, 0.16);
}

.share-button[data-share-context="route"]::before {
  background: var(--material-signal-teal);
}

.share-button[data-share-context="station"]::before,
.share-button[data-share-context="origin"]::before {
  background: var(--material-signal-red);
}

.share-button[data-share-state="loading"]::before {
  background: var(--material-led-amber);
  animation: share-output-pulse var(--motion-duration-feedback-loop) ease-in-out infinite;
}

.share-button[data-share-state="success"]::before {
  background: var(--material-led-ready);
  box-shadow: 0 0 0 1px rgba(255, 253, 247, 0.18), 0 0 10px rgba(127, 164, 95, 0.5);
}

.share-button[data-share-state="failure"]::before {
  background: var(--material-signal-red);
}

@keyframes share-output-pulse {
  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .share-button[data-share-state="loading"]::before {
    animation: none;
    opacity: 1;
  }
}

/* Share flat control state. Moved from the late refinement adapter;
   command-bar.css owns the map-active mast chrome with stronger selectors. */
.share-button {
  position: relative;
  border-color: var(--button-flat-border);
  background: var(--button-flat-active);
  box-shadow: none;
  color: var(--paper);
  text-shadow: none;
  transform: none;
  animation: none;
}

.share-button:hover {
  border-color: var(--ink);
  background: var(--button-flat-active);
  box-shadow: none;
  color: var(--paper);
  transform: none;
  animation: none;
}

.share-button::before {
  content: none;
  display: none;
  animation: none;
}
