/* Deliberately scoped: no existing footer, link, span or details rules are changed. */
.share-exhibition {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--ink, #181916);
}

.share-exhibition > summary {
  display: list-item;
  min-height: 24px;
  padding-block: 6px;
  cursor: pointer;
  list-style-position: inside;
  white-space: nowrap;
}

.share-exhibition > summary:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.share-exhibition__panel {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(340px, calc(100vw - 2 * var(--gutter, 22px)));
  padding: 20px;
  border: 1px solid var(--ink, #181916);
  background: var(--paper, #f4f1e9);
  font: 14px/1.5 var(--sans, sans-serif);
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  overflow-wrap: anywhere;
}

.share-exhibition:not([open]) > .share-exhibition__panel {
  display: none;
}

.share-exhibition__intro {
  margin: 0 0 12px;
}

.share-exhibition__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.share-exhibition__actions > button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--ink, #181916);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.share-exhibition__actions > button:hover:not(:disabled) {
  background: var(--ink, #181916);
  color: var(--paper, #f4f1e9);
}

.share-exhibition__actions > button:disabled {
  border-style: dashed;
  cursor: default;
}

.share-exhibition__label {
  display: block;
  margin: 0 0 5px;
  font: 10px/1.5 var(--mono, monospace);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.share-exhibition__link {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 8px;
  border: 1px solid var(--line, #c6c1b5);
  border-radius: 0;
  background: transparent;
  color: var(--ink, #181916);
  font: 12px/1.5 var(--mono, monospace);
  resize: vertical;
  overflow-wrap: anywhere;
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
}

.share-exhibition__link::placeholder {
  color: var(--soft, #56564d);
  opacity: 1;
}

.share-exhibition__help {
  margin: 6px 0 0;
  color: var(--soft, #56564d);
  font-size: 12px;
}

.share-exhibition .share-exhibition__save {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  padding-block: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.share-exhibition__status {
  margin: 12px 0 0;
  font-size: 12px;
}

.share-exhibition__status:empty {
  margin: 0;
}

.share-exhibition > summary:focus-visible,
.share-exhibition__panel button:focus-visible,
.share-exhibition__panel a:focus-visible,
.share-exhibition__link:focus-visible {
  outline: 2px solid var(--ink, #181916);
  outline-offset: 4px;
}

/* In-flow expansion on small screens: nothing is clipped or obscures footer links. */
@media (max-width: 680px) {
  .share-exhibition > summary {
    min-height: 44px;
    padding-block: 15px;
  }

  .share-exhibition[open] {
    flex-basis: 100%;
  }

  .share-exhibition__panel {
    position: static;
    width: min(100%, 340px);
    margin-top: 6px;
    padding: 16px;
  }
}
