/* ── Open Image dialog: source tabs (Local file / URL link / Blank). A simple
   underline tab bar; the active tab is accent-colored with an accent underline. */
.oi-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-main); margin-bottom: 14px; }
.oi-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; margin-bottom: -1px;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); font-size: 13px; font-weight: 500; cursor: pointer;
}
/* button:hover paints the accent-2 pill under a hovered tab, so its ink flips to on-accent (accent
   text on it was unreadable, user report); :hover carries .is-active's specificity to win. */
.oi-tab:hover, .oi-tab.is-active:hover { color: var(--on-accent); }
.oi-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.oi-panel { margin-bottom: 2px; }
/* One dialog height across the tabs (desktop parity): sized for the tallest (Blank), so switching
   never resizes the window. */
#open-image-modal-overlay:not(.modal-popover) .app-modal { min-height: min(430px, 82vh); }
/* position: the arrival dust canvas is absolute inside this box, and a video's stage hangs
   here rather than on the crop stage an image gets — static would anchor it to the modal. */
.oi-preview { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 10px 0 4px; }
/* Never wraps: the hidden Album button keeps its space, and a wider skin font (webcore, aqua) dropped
   it — or the caption — onto a line of its own under the box. The caption's words wrap instead. */
.oi-crop-opt, .oi-incognito { display: inline-flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
/* The caption takes the slack, so the Album/Portrait button sits at the far edge (desktop
   checkCaptionRow) and the Custom W/H fields fill out to it. */
.oi-crop-opt, .oi-incognito { flex: 1 1 auto; min-width: 0; }
.oi-crop-opt > label.footer-hint, .oi-incognito > label.footer-hint { flex: 1 1 auto; min-width: 0; }
.oi-crop-opt > :not(label), .oi-incognito > input { flex: none; }
/* No hairline of its own (desktop twin: QSS #oiNoDivider) — the size row sits directly
   under Crop, itself hidden/shown by the row's own particle sweep, never a static line. */
#open-image-crop-row, #open-image-crop-size-row, #open-image-incognito-row { border-bottom: none; }
/* The caption IS the checkbox's <label for>: the pointer affordance says so too. */
.oi-crop-opt > label.footer-hint, .oi-incognito > label.footer-hint { cursor: pointer; }
/* Width pinned in JS (pinWidestFace), so a toggle never jumps (user report; desktop cropAlbum_);
   flex-start, so the icon never drifts as the words swap. */
#open-image-crop-orientation { justify-content: flex-start; }
/* Same gap as .oi-crop-opt above, so the two columns read as one table. */
.oi-crop-size { display: inline-flex; align-items: stretch; gap: 10px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
/* Basis 0, or the fields' default widths wrap the pair under the selector; stretched to its
   height (desktop: the spin boxes match the combo). */
.oi-crop-size-custom { display: inline-flex; align-items: stretch; gap: 6px; flex: 1 1 0; min-width: 0; }
/* W/H beside their field, a plain ratio pair with no unit (user report): two equal fields out
   to the Album/Portrait edge. */
.oi-crop-size-field { display: flex; align-items: stretch; gap: 4px; flex: 1 1 0; min-width: 0; }
.oi-crop-size-field label { font-size: 11px; color: var(--text-muted); align-self: center; }
/* Not [type="number"]: numericInput.js flips enhanced fields to type="text", and the field fell
   back to ~150px, wrapping W/H under the selector (user report). */
.oi-crop-size-custom input { width: auto; flex: 1 1 0; min-width: 0; }
/* Open-another-image + Open-in modals: a fixed label column with the controls left-aligned
   against it, not .vs-row's space-between. */
stencil-open-image-modal .vs-row,
stencil-open-in-modal .vs-row { justify-content: flex-start; }
stencil-open-image-modal .vs-row > label,
stencil-open-in-modal .vs-row > label { flex: 0 0 auto; min-width: 88px; }
/* The same column for a .vs-field row (URL): its own rule out-specifies the one above,
   and reads this — without it the URL input starts left of every other control. */
stencil-open-image-modal, stencil-open-in-modal { --vs-label-w: 88px; }
/* The file chooser reads as one control: the button butted against the path readout in one box
   (desktop twin: OpenImageDialog). */
.oi-file {
    display: inline-flex;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--ui-outline);
    border-radius: 4px;
    overflow: hidden;
}
.oi-file-btn {
    flex: 0 0 auto;
    border: none;
    border-radius: 0;
    padding: 8px 12px;
    font-size: 14px;
}
/* The chosen file's name, or the empty-state prompt — the field half of the pair, and a
   second way into the picker, so the whole control is one target. */
.oi-file-name {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 12px;
    font-size: 14px;
    color: var(--input-text);
    background: var(--input-bg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.oi-file-name:empty::before,
.oi-file-name.is-empty { color: var(--text-muted); }
/* One control, one focus ring round the whole box: overflow:hidden clipped the button's own ring
   to a line down the seam (user report). */
.oi-file-btn:focus-visible { outline: none; }
.oi-file:has(.oi-file-btn:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
/* "Loading…" while a source decodes, and load failures — desktop's preview hint. */
.oi-status:empty { display: none; }
.oi-status { color: var(--text-muted); font-size: 12px; margin: 10px 0 0 4px; }   /* .vs-row's own 4px */
/* Open-in modal: label · fixed checkbox slot · text, so both descriptions share one left edge;
   the empty .oi-slot reserves the column in the checkbox-less row. */
stencil-open-in-modal .vs-row.oi-row {
    display: grid;
    grid-template-columns: 88px 1.25rem 1fr;
    align-items: center;
    column-gap: 8px;
}
stencil-open-in-modal .vs-row.oi-row > label { min-width: 0; }
stencil-open-in-modal .oi-slot { justify-self: start; margin: 0; }
.oi-fallback { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.links-quickcrop-controls select { width: auto; min-width: 64px; }
.links-inline-check input:disabled + *, .links-quickcrop-controls select:disabled { opacity: .5; }
/* The frame scrub under the picture at its exact width, accent played side and thumb outlined in
   --ui-outline. Desktop twin: QSlider#oiFrameScrub (qss/app/fields.qss). */
.oi-scrub, .vs-range {
    -webkit-appearance: none;
    appearance: none;
    height: 13px;
    background: transparent;
    cursor: pointer;
    margin: 0;
}
.oi-scrub::-webkit-slider-runnable-track, .vs-range::-webkit-slider-runnable-track {
    height: 7px;
    box-sizing: border-box;
    border: 1px solid var(--ui-outline);
    border-radius: 4px;
    background: linear-gradient(to right, var(--accent) 0 var(--scrub-fill, 0%),
                                          var(--border-main) var(--scrub-fill, 0%) 100%);
}
.oi-scrub:hover::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--accent) 0 var(--scrub-fill, 0%),
                                          var(--text-muted) var(--scrub-fill, 0%) 100%);
}
.oi-scrub::-webkit-slider-thumb, .vs-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    margin-top: -3px;
    box-sizing: border-box;
    border: 1px solid var(--ui-outline);
    border-radius: 7px;
    background: var(--accent);
}
.oi-scrub::-moz-range-track, .vs-range::-moz-range-track {
    height: 7px; box-sizing: border-box; border: 1px solid var(--ui-outline);
    border-radius: 4px; background: var(--border-main);
}
.oi-scrub:hover::-moz-range-track { background: var(--text-muted); }
.oi-scrub::-moz-range-progress, .vs-range::-moz-range-progress { height: 7px; border-radius: 4px; background: var(--accent); }
.oi-scrub::-moz-range-thumb, .vs-range::-moz-range-thumb {
    width: 13px; height: 13px; box-sizing: border-box; border: 1px solid var(--ui-outline);
    border-radius: 7px; background: var(--accent);
}

/* The blank tab's custom fill is a well: the chip with its hex beside it (desktop setColorSwatch
   withHex, 140x30). */
.oi-color {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 10px;
    background: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-main);
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Menlo','Consolas',monospace;
    font-size: 12px;
}
.oi-color:hover { border-color: var(--accent); }
.oi-color input[type="color"] {
    flex: 0 0 auto;
    width: 32px;
    height: 18px;
    padding: 0;
    border: none;
    background: transparent;
}
.oi-hex { letter-spacing: 0.02em; }
