/* Glass shimmer: the shared hover sweep (a clipped ::after gradient) on interactive controls. */
button, .btn-icon, .btn-icon-text, .coord-tab, .pill-toggle, .idle-create-btn,
.accent-dd-trigger, .name-edit-btn, .project-row, .connect-row, .accent-dd-opt,
.project-menu-item, .ctx-item, .vs-color, .oi-color,
.shimmer { position: relative; overflow: hidden; }
button::after, .btn-icon::after, .btn-icon-text::after, .coord-tab::after, .pill-toggle::after,
.idle-create-btn::after, .accent-dd-trigger::after, .name-edit-btn::after, .project-row::after,
.connect-row::after, .accent-dd-opt::after, .project-menu-item::after, .ctx-item::after, .vs-color::after, .oi-color::after, .shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(115deg, transparent 38%,
        color-mix(in srgb, #ffffff 55%, transparent) 50%, transparent 62%);
    transform: translateX(-135%);
    opacity: 0;
}
button:hover:not(:disabled)::after, .btn-icon:hover:not(:disabled)::after,
.btn-icon-text:hover:not(:disabled)::after, .coord-tab:hover::after, .pill-toggle:hover::after,
.idle-create-btn:hover::after, .accent-dd-trigger:hover::after, .name-edit-btn:hover:not(:disabled)::after,
.project-row:hover::after, .connect-row:hover::after, .accent-dd-opt:hover::after,
.project-menu-item:hover::after, .project-menu-item.is-drag-hover::after, .ctx-item:hover::after,
.vs-color:hover::after, .oi-color:hover::after, .shimmer:hover::after {
    animation: ui-shimmer 0.75s ease;
}
@keyframes ui-shimmer {
    from { transform: translateX(-135%); opacity: 1; }
    to   { transform: translateX(135%);  opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
    button::after, .btn-icon::after, .btn-icon-text::after, .coord-tab::after, .pill-toggle::after,
    .idle-create-btn::after, .accent-dd-trigger::after, .name-edit-btn::after, .shimmer::after { content: none; }
}
/* Inputs can't host an ::after: their shimmer is a background band over the field's own colour. */
input[type="text"], input[type="number"], input[type="search"], input[type="url"],
input[type="password"], select {
    background-repeat: no-repeat;
    background-size: 250% 100%;
    background-position: 185% 0;
}
/* Hover ring, the desktop's twin (theme.cpp QLineEdit/QComboBox:hover): an INSET shadow, not a thicker
   border that grows the box. `!important` over the id-level borders (#zoom-input…). */
input[type="text"]:hover:not(:disabled):not(:focus),
input[type="number"]:hover:not(:disabled):not(:focus),
input[type="search"]:hover:not(:disabled):not(:focus),
input[type="url"]:hover:not(:disabled):not(:focus),
input[type="password"]:hover:not(:disabled):not(:focus),
textarea:hover:not(:disabled):not(:focus),
select:hover:not(:disabled):not(:focus),
.accent-dd-trigger:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent) !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent) !important;
}
input[type="text"]:hover:not(:disabled):not(:focus),
input[type="number"]:hover:not(:disabled):not(:focus),
input[type="search"]:hover:not(:disabled):not(:focus),
input[type="url"]:hover:not(:disabled):not(:focus),
input[type="password"]:hover:not(:disabled):not(:focus),
select:hover:not(:disabled) {
    background-image: linear-gradient(115deg, transparent 42%,
        color-mix(in srgb, #ffffff 26%, transparent) 50%, transparent 58%);
    /* 1.5x the ::after's 0.75s: across a field the same clock reads much faster (user report). */
    animation: ui-shimmer-bg 1.125s ease;
}
@keyframes ui-shimmer-bg {
    from { background-position: 185% 0; }
    to   { background-position: -85% 0; }
}
@media (prefers-reduced-motion: reduce) {
    input[type="text"]:hover, input[type="number"]:hover, input[type="search"]:hover, input[type="url"]:hover,
    input[type="password"]:hover, select:hover { animation: none; background-image: none; }
}
/* A <tr> can't host an ::after; row tints are background-COLOR longhands so the band survives. */
.coordinates-table tbody tr { background-repeat: no-repeat; background-size: 250% 100%; background-position: 150% 0; }
.coordinates-table tbody tr:hover:not(.row-focused):not(.leaving) {
    background-image: linear-gradient(115deg, transparent 40%,
        color-mix(in srgb, #ffffff 24%, transparent) 50%, transparent 60%);
    animation: ui-shimmer-row 0.75s ease;
}
.coordinates-table tbody tr.row-highlighted:hover:not(.row-focused):not(.leaving) {
    animation: ui-shimmer-row 0.75s ease, rowPulse 0.5s ease;
}
/* 150% → -50% of a 250% band crosses the row in the middle half of the clock. */
@keyframes ui-shimmer-row {
    from { background-position: 150% 0; }
    to   { background-position: -50% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .coordinates-table tbody tr:hover:not(.row-focused):not(.leaving),
    .coordinates-table tbody tr.row-highlighted:hover:not(.row-focused):not(.leaving) { animation: none; background-image: none; }
}
