/**
 * @file
 * Icon buttons and links in observation lists (.sos-icon).
 *
 * Used by the remark icon (sos_remark_tooltip, a button) and the Artportalen
 * link icon (sos_artportalen_link, a link). The markup is a Bootstrap link
 * button (.btn.btn-link.btn-sm) with an inline SVG icon, see
 * sos-observation-remark.html.twig and sos-observation-link.html.twig. The
 * theme's Bootstrap CSS loads after this file, so the button variables are set
 * with two classes.
 */

/* Fallback look without Bootstrap; .btn replaces these values. */
.sos-icon {
  padding: 0;
  border: 0;
  background: transparent;
  color: #6c757d;
}

/*
 * A 1.5rem (24px) tap target around the 1rem icon. The negative margins keep
 * the table row from growing because of the larger target.
 */
.sos-icon.btn {
  --bs-btn-padding-x: 0;
  --bs-btn-padding-y: 0;
  --bs-btn-font-size: 1rem;
  --bs-btn-color: var(--bs-secondary-color, #6c757d);
  --bs-btn-hover-color: var(--bs-link-hover-color, #0a5c8c);
  --bs-btn-active-color: var(--bs-link-hover-color, #0a5c8c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  margin-block: -0.25rem;
  line-height: 1;
  vertical-align: middle;
}

/* A remark is read, not followed: the help cursor says so. */
.sos-remark.btn {
  cursor: help;
}

/* Links keep the link colour, so they look clickable. */
.sos-icon--link.btn {
  --bs-btn-color: var(--bs-link-color, #0f7aba);
}

.sos-icon svg {
  flex: none;
}
