/* core/button — BUTTONS, ICON BUTTONS, LINKS. Ported from reference/css/components.css.
   The render filter (inc/block-extensions.php) puts the reference classes (.lm-btn, .lm-icon-btn, .lm-link) on the
   link, so the selectors are the reference ones. */
.lm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--wp--preset--spacing--20);
  border: var(--wp--custom--border--control) solid transparent;
  border-radius: var(--wp--custom--radius--pill);
  font-weight: var(--wp--custom--font-weight--bold);
  line-height: var(--wp--custom--line-height--control);
  text-align: center; white-space: nowrap; cursor: pointer;
  transition: transform var(--wp--custom--motion--fast) ease, background-color var(--wp--custom--motion--fast) ease, border-color var(--wp--custom--motion--fast) ease, color var(--wp--custom--motion--fast) ease;
}
.lm-btn:hover { transform: translateY(-1px); }
.lm-btn--sm { min-height: var(--wp--custom--control--sm); padding-inline: var(--wp--preset--spacing--40); font-size: var(--wp--preset--font-size--small); }
.lm-btn--md { min-height: var(--wp--custom--control--md); padding-inline: var(--wp--preset--spacing--60); font-size: var(--wp--preset--font-size--ui); }
.lm-btn--lg { min-height: var(--wp--custom--control--lg); padding-inline: var(--wp--preset--spacing--60); font-size: var(--wp--preset--font-size--body); }
.lm-btn--xl { min-height: var(--wp--custom--control--xl); padding-inline: var(--wp--preset--spacing--70); font-size: var(--wp--preset--font-size--medium); }

.lm-btn--primary     { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
.lm-btn--dark        { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--contrast); }
.lm-btn--light       { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--ink); }
.lm-btn--outline     { border-color: var(--wp--preset--color--outline); color: var(--wp--preset--color--contrast); }
.lm-btn--outline:hover { border-color: var(--wp--preset--color--contrast); }
.lm-btn--outline-ink { border-color: var(--wp--preset--color--outline-ink); color: var(--wp--preset--color--ink); }
.lm-btn--outline-ink:hover { border-color: var(--wp--preset--color--ink); }
.lm-btn--ghost       { background: var(--wp--preset--color--fill-strong); border-color: var(--wp--preset--color--line-strong); color: var(--wp--preset--color--contrast); }
.lm-btn--block       { display: flex; width: 100%; }

.lm-icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: var(--wp--custom--control--md); height: var(--wp--custom--control--md);
  border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line-strong);
  border-radius: var(--wp--custom--radius--pill);
  color: var(--wp--preset--color--contrast); cursor: pointer;
  transition: border-color var(--wp--custom--motion--fast) ease, color var(--wp--custom--motion--fast) ease, background-color var(--wp--custom--motion--fast) ease;
}
.lm-icon-btn:hover { border-color: var(--wp--preset--color--accent-line); }
.lm-icon-btn--soft  { background: var(--wp--preset--color--fill-strong); border-color: var(--wp--preset--color--line); }
.lm-icon-btn--glass { background: var(--wp--preset--color--glass); border-color: var(--wp--preset--color--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lm-icon-btn--sm    { width: var(--wp--custom--control--sm); height: var(--wp--custom--control--sm); }
.lm-icon-btn--xl    { width: var(--wp--custom--control--xl); height: var(--wp--custom--control--xl); border-width: var(--wp--custom--border--control); }
.lm-icon-btn--plain { border-color: transparent; color: var(--wp--preset--color--muted); }
.lm-icon-btn--plain:hover { border-color: transparent; color: var(--wp--preset--color--contrast); }

.lm-link {
  display: inline-flex; align-items: center; gap: var(--wp--preset--spacing--20);
  color: var(--wp--preset--color--accent);
  font-size: var(--wp--preset--font-size--medium); font-weight: var(--wp--custom--font-weight--bold);
  min-height: 24px; line-height: var(--wp--custom--line-height--control); cursor: pointer;
  position: relative;
}
/* Invisible hit area: 44px tall without changing the layout box. */
.lm-link::after { content: ""; position: absolute; inset: -10px 0; }
.lm-link .lm-icon { transition: transform var(--wp--custom--motion--fast) ease; }
.lm-link:hover .lm-icon--arrow-right { transform: translateX(4px); }
.lm-link:hover .lm-icon--arrow-left { transform: translateX(-4px); }
.lm-link--sm { font-size: var(--wp--preset--font-size--small); }
.lm-link--underline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.lm-link--muted { color: var(--wp--preset--color--muted); font-weight: var(--wp--custom--font-weight--medium); font-size: var(--wp--preset--font-size--ui); }
