/* The Gitea "Edit" link beside "Download PDF" (owner, 28 November 2026; src/_includes/suggest-edit.njk). Linked only from an
   activity page that has the link. The link is the Download PDF button (.activity-download in activities.css); this adds
   the row's gap, the help text and the pencil.

   Each control's box is 2 lines tall, so the row stays on the baseline when the two sit side by side and when they wrap.
   The row is only as wide as its buttons (fit-content), so its end is the Edit link's end. */
.activity-text .activity-actions {
  position: relative;
  width: fit-content;
  flex-wrap: wrap;
  column-gap: var(--cn-space-16);
}
.activity-actions > .activity-download {
  margin-block: calc((var(--b) * 2 - var(--cn-component-button-medium-height)) / 2);
}
.suggest-edit {
  display: inline-flex;
  padding-block: calc((var(--b) * 2 - var(--cn-component-button-medium-height)) / 2);
}
/* Help text, as constituition's explanation box (src/components/SuggestEdit.astro): its top on the link's bottom edge with
   no gap, its end on the link's end, and no wider than the row, so it stays inside the text column and the screen at every
   width without a script. It is inside the link's own box, so the pointer can move from the link into it without it
   closing. */
.suggest-edit-help {
  position: absolute;
  top: calc(100% - (var(--b) * 2 - var(--cn-component-button-medium-height)) / 2);
  inset-inline-end: 0;
  z-index: 2;
  width: min(260px, 100%);
  box-sizing: border-box;
  padding: var(--cn-space-8) var(--cn-space-16);
  border: var(--cn-border-hairline) solid var(--cn-border-muted);
  background: var(--cn-surface-page);
  color: var(--cn-text-default);
  font-family: var(--cn-type-body-family);
  font-size: var(--cn-type-body-size);
  line-height: var(--cn-type-body-lh);
  white-space: normal;
  visibility: hidden;
}
.suggest-edit-link:focus-visible + .suggest-edit-help {
  visibility: visible;
}
@media (hover: hover) {
  .suggest-edit:hover .suggest-edit-help {
    visibility: visible;
  }
}
@media print {
  .suggest-edit { display: none; }
}

/* The pencil: Feather edit-2 (https://feathericons.com).

The MIT License (MIT)

Copyright (c) 2013-2023 Cole Bemis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
