/*
 * WebXtent v0.8.109 — Developments mobile gallery control-row realignment.
 *
 * Restores a clean two-lane phone hierarchy after v0.8.106:
 *   lane 1 = PHOTOS label + project-level controls
 *   lane 2 = previous photo / counter / next photo (+ Files when available)
 *
 * Thumbnail sizing, next-card peek, frosted material and project-wheel typography
 * remain unchanged.
 */

@media (max-width:767px){

  /* ---------------------------------------------------------------------
   * LANE 1 — label + project controls.
   * v0.8.94 intentionally pushed this dock downward to meet an older control
   * row. v0.8.106 changed the photo row geometry, leaving the dock visually
   * colliding with it. Keep the dock in its natural label row instead.
   * ------------------------------------------------------------------ */
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-carousel-label,
  body.wxt-scene-developments .wxt-development-showcase__project-carousel-label{
    align-items:center!important;
    min-height:36px!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-carousel-label-core,
  body.wxt-scene-developments .wxt-development-showcase__project-carousel-label-core{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    width:100%!important;
    min-width:0!important;
    gap:10px!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-project-wheel__dock,
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase.has-touch-project-nav .wxt-development-project-wheel__dock,
  body.wxt-scene-developments .wxt-development-project-wheel__dock{
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    transform:none!important;
    margin:0 0 0 auto!important;
    align-self:center!important;
    width:max-content!important;
    height:32px!important;
    padding:1px!important;
    display:grid!important;
    grid-template-columns:repeat(3,30px)!important;
    gap:3px!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-project-wheel__dock .wxt-development-project-wheel__chevron,
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-project-wheel__dock button.wxt-development-gallery-visibility-toggle,
  body.wxt-scene-developments .wxt-development-project-wheel__dock .wxt-development-project-wheel__chevron,
  body.wxt-scene-developments .wxt-development-project-wheel__dock button.wxt-development-gallery-visibility-toggle{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    min-height:30px!important;
    margin:0!important;
    align-self:center!important;
    justify-self:center!important;
  }

  /* ---------------------------------------------------------------------
   * LANE 2 — photo navigation.
   * Use exactly three balanced columns while Files is absent. This is the
   * alignment shown in the annotated screenshot: previous / 01-07 / next.
   * ------------------------------------------------------------------ */
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-carousel-nav,
  body.wxt-scene-developments .wxt-development-showcase__project-carousel-nav{
    position:relative!important;
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr) 42px!important;
    align-items:center!important;
    justify-content:stretch!important;
    width:100%!important;
    min-height:42px!important;
    gap:10px!important;
    margin:0!important;
  }

  body.wxt-scene-developments .wxt-development-showcase__project-carousel-line,
  body.wxt-scene-developments .wxt-development-showcase__project-status{
    display:none!important;
  }

  body.wxt-scene-developments [data-wxt-construct="developments.showcase.gallery.photo-prev"]{
    grid-column:1!important;
    grid-row:1!important;
    justify-self:start!important;
    align-self:center!important;
  }

  body.wxt-scene-developments [data-wxt-construct="developments.showcase.gallery.counter"]{
    grid-column:2!important;
    grid-row:1!important;
    justify-self:stretch!important;
    align-self:center!important;
  }

  body.wxt-scene-developments [data-wxt-construct="developments.showcase.gallery.photo-next"]{
    grid-column:3!important;
    grid-row:1!important;
    justify-self:end!important;
    align-self:center!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase button.wxt-development-carousel-toggle,
  body.wxt-scene-developments .wxt-development-showcase button.wxt-development-carousel-toggle{
    display:grid!important;
    place-items:center!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-position,
  body.wxt-scene-developments .wxt-development-showcase__project-position{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    height:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0 12px!important;
    line-height:1!important;
    font-variant-numeric:tabular-nums!important;
  }

  /* When project files exist, add one dedicated fourth column instead of
   * compressing or displacing the photo navigation controls. */
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-carousel-nav:has(.wxt-development-files-toggle:not([hidden])),
  body.wxt-scene-developments .wxt-development-showcase__project-carousel-nav:has(.wxt-development-files-toggle:not([hidden])){
    grid-template-columns:42px minmax(0,1fr) 42px 42px!important;
  }

  body.wxt-scene-developments [data-wxt-construct="developments.showcase.files.toggle"]{
    grid-column:4!important;
    grid-row:1!important;
    justify-self:end!important;
    align-self:center!important;
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0!important;
  }

  body.wxt-scene-developments .wxt-development-files-toggle__label,
  body.wxt-scene-developments .wxt-development-files-toggle__count{
    display:none!important;
  }
}

@media (max-width:380px){
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-carousel-nav,
  body.wxt-scene-developments .wxt-development-showcase__project-carousel-nav{
    grid-template-columns:40px minmax(0,1fr) 40px!important;
    gap:8px!important;
    min-height:40px!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-carousel-nav:has(.wxt-development-files-toggle:not([hidden])),
  body.wxt-scene-developments .wxt-development-showcase__project-carousel-nav:has(.wxt-development-files-toggle:not([hidden])){
    grid-template-columns:40px minmax(0,1fr) 40px 40px!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase button.wxt-development-carousel-toggle,
  body.wxt-scene-developments .wxt-development-showcase button.wxt-development-carousel-toggle,
  body.wxt-scene-developments [data-wxt-construct="developments.showcase.files.toggle"]{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-position,
  body.wxt-scene-developments .wxt-development-showcase__project-position{
    height:40px!important;
    min-height:40px!important;
  }
}
