/* js/label-tools.js: the action icons in a setting's label row. Same look as the full-screen icon of Advanced; the tap area is larger than the picture. */
.lt-src { display: none !important; }
.lt-tools { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; padding-inline-start: 6px; flex: none; }
.lt-btn { position: relative; flex: none; inline-size: 26px; block-size: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--text-muted); cursor: pointer; }
.lt-btn[hidden] { display: none; }
.lt-btn::after { content: ""; position: absolute; inset: -7px -4px; }
.lt-btn:hover, .lt-btn:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.lt-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.lt-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--pink-soft, var(--surface-2)); }
.lt-btn:disabled { opacity: .45; cursor: default; }
/* inside a form row the label is small: the icon must not make the row taller than its neighbours */
.pfw-ll > .lt-tools { margin-block: -5px; }
.pfw-ll > .lt-tools .lt-btn { inline-size: 24px; block-size: 24px; }
.sm-label > .lt-tools { margin-block: -4px; }
/* a label with both the full-screen icon and an action icon: the two sit together at the end */
.sm-label > .pf-expand ~ .lt-tools { margin-inline-start: 0; padding-inline-start: 0; }
.sm-label > .lt-tools ~ .pf-expand { margin-inline-start: 0; }

/* "Edit as code" in the header of a group of settings: the same icon as in a label row (its words stay for screen readers and the tooltip) */
button.pfw-code-t.pf-gcode { position: relative; flex: none; inline-size: 26px; block-size: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--text-muted); }
button.pfw-code-t.pf-gcode > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
button.pfw-code-t.pf-gcode > svg { display: none; }
button.pfw-code-t.pf-gcode::before { content: ""; inline-size: 14px; block-size: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7l-5 5 5 5M16 7l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7l-5 5 5 5M16 7l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat; }
button.pfw-code-t.pf-gcode::after { content: ""; position: absolute; inset: -7px -4px; }
button.pfw-code-t.pf-gcode:hover, button.pfw-code-t.pf-gcode:focus-visible, button.pfw-code-t.pf-gcode[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
/* a code switch moved to the label row leaves its own bar empty: no gap stays behind */
.pfw-bar:has(> span:empty + .lt-src) { display: none; }
