/* SkyyCast Bluesky Image Size Checker (/tools/bluesky-image-size-checker) --
 * workspace-only layout refinements.
 *
 * Loaded after assets/sc-image-checker.css, which this page otherwise
 * relies on entirely (it has no other tool-specific stylesheet). Every rule
 * here is scoped to #ic-tool or #ic-isc-hero -- both unique to this page --
 * so none of it reaches the other tools that also use the shared `ic-*`
 * classes (.ic-drop, .ic-btn, .ic-workspace, .ic-tool, ...). Nothing in
 * assets/sc-image-checker.css itself is modified.
 *
 * The image list stays a real control after a result appears -- selecting
 * a different image updates the detail panel -- so unlike the batch tools'
 * Setup/Result tabs, it is never hidden. On narrow screens it becomes a
 * horizontally scrollable thumbnail strip instead, always visible directly
 * above the detail panel. */

/* ---- Hero: trimmed so the dropzone and workspace aren't pushed further
   down than necessary on shorter desktop viewports. ---- */
#ic-isc-hero { margin: 0 auto .9rem; }
#ic-isc-hero .sc-eyebrow { margin-bottom: .4rem; }
#ic-isc-hero h1 { margin-bottom: .5rem; }
#ic-isc-hero .ic-chips { margin-top: .75rem; }

/* ---- Dropzone: once files exist, the workspace header's own "+ Add
   images" button already covers adding more, and drag-and-drop stays
   available on the (now compact) dropzone -- so there is no reason to
   keep it at full empty-state size once the list and detail panel are
   the things that matter. ---- */
.pub-site #ic-tool:has(#ic-workspace:not([hidden])) #ic-drop {
  flex-direction: row;
  justify-content: center;
  gap: .5rem;
  padding: .55rem .9rem;
  text-align: left;
}
.pub-site #ic-tool:has(#ic-workspace:not([hidden])) .ic-drop-icon {
  width: 30px; height: 30px;
  margin-bottom: 0;
  flex: none;
}
.pub-site #ic-tool:has(#ic-workspace:not([hidden])) .ic-drop-icon svg { width: 16px; height: 16px; }
.pub-site #ic-tool:has(#ic-workspace:not([hidden])) .ic-drop-title { font-size: .9375rem; }
.pub-site #ic-tool:has(#ic-workspace:not([hidden])) .ic-drop-formats { display: none; }

/* ---- Facts grid: narrower minimum column so the five prepared-result
   facts (Original, Prepared, Saved, Dimensions, Format) can sit in one
   row on desktop instead of wrapping to two -- shortens the result panel
   without shrinking any individual fact. ---- */
.pub-site #ic-tool .ic-facts { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }

/* ---- Desktop: list column a touch narrower, giving the detail panel
   (preview + facts + actions) more of the available width. ---- */
@media (min-width: 981px) {
  .pub-site #ic-tool .ic-layout { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
}

/* ---- Mobile / narrow tablet: the list becomes a horizontally scrollable
   thumbnail strip, sitting directly above the detail panel -- both stay
   visible together (selecting an image is still one tap), and the page
   never has to grow to fit up to 4 stacked full-width cards. ---- */
@media (max-width: 760px) {
  /* "+ Add images" / "Clear all" stay reachable without scrolling back to
     the top of the tool: once the thumbnail strip and detail panel below
     make the workspace taller than the screen, a plain top-of-workspace
     header can scroll out of reach. Sticking it to the viewport top keeps
     both actions visible throughout -- it releases naturally once the
     tool section itself scrolls past (sticky is scoped to its containing
     block, not the whole page), so it never follows the user into the
     educational content below the tool. */
  .pub-site #ic-tool .ic-ws-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--pub-surface);
    padding-top: .85rem;
    margin-top: -.85rem;
  }

  .pub-site #ic-tool .ic-layout { grid-template-columns: minmax(0, 1fr); }
  .pub-site #ic-tool .ic-list {
    display: flex;
    flex-direction: row;
    gap: .6rem;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    padding: .15rem .25rem .6rem;
    scroll-snap-type: x proximity;
  }
  .pub-site #ic-tool .ic-card {
    flex: 0 0 136px;
    scroll-snap-align: start;
  }
  .pub-site #ic-tool .ic-card-main {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: .4rem;
    padding: .55rem .5rem .6rem;
  }
  .pub-site #ic-tool .ic-thumb { width: 100%; height: 80px; }
  .pub-site #ic-tool .ic-card-body { justify-items: center; text-align: center; }
  .pub-site #ic-tool .ic-card-name { max-width: 100%; }
  .pub-site #ic-tool .ic-card-remove {
    position: absolute;
    top: .3rem; right: .3rem;
    /* Kept at 44px: tests/tools/bluesky-image-size-checker.spec.ts asserts
       .ic-card-remove height >= 43.5px as a touch-target invariant. */
    min-width: 44px; min-height: 44px;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    box-shadow: var(--pub-shadow-sm);
  }
}
