/*
 * WebXtent v0.8.113 — Developments mobile heading + control baseline.
 *
 * Phone-only correction from the annotated iPhone reference:
 * - current project title is reduced another 10px (34px -> 24px canonical default);
 * - project controls and photo controls share one deterministic baseline;
 * - hidden Files no longer reserves an empty grid column.
 */

@media (max-width:767px){

  body.wxt-scene-developments .wxt-development-project-wheel__item--current,
  body.wxt-scene-developments .wxt-development-project-wheel__ghost{
    font-size:var(--wxt-dev-mobile-title-size,24px)!important;
  }

  /* One positioning context for the entire control bar. Earlier layers made
   * label-core and the photo nav separate positioning contexts, which allowed
   * their vertical baselines to drift apart. */
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-carousel-bar,
  body.wxt-scene-developments .wxt-development-showcase__project-carousel-bar{
    position:relative!important;
    min-height:92px!important;
    padding-bottom:48px!important;
  }

  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,
  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{
    position:static!important;
  }

  /* Left side: previous project / gallery visibility / next project. The dock
   * occupies the same 42px baseline box as the photo navigation so the smaller
   * project buttons are optically centered rather than sitting high/low. */
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase.has-touch-project-nav .wxt-development-project-wheel__dock,
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-project-wheel__dock,
  body.wxt-scene-developments .wxt-development-project-wheel__dock{
    position:absolute!important;
    left:0!important;
    right:auto!important;
    top:auto!important;
    bottom:5px!important;
    transform:none!important;
    margin:0!important;
    padding:0!important;
    width:max-content!important;
    min-width:0!important;
    height:42px!important;
    display:grid!important;
    grid-template-columns:repeat(3,var(--wxt-dev-mobile-project-control-size,31px))!important;
    gap:4px!important;
    align-items:center!important;
    justify-content:start!important;
    overflow:visible!important;
    z-index:8!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:var(--wxt-dev-mobile-project-control-size,31px)!important;
    height:var(--wxt-dev-mobile-project-control-size,31px)!important;
    min-width:var(--wxt-dev-mobile-project-control-size,31px)!important;
    min-height:var(--wxt-dev-mobile-project-control-size,31px)!important;
    align-self:center!important;
    justify-self:center!important;
    margin:0!important;
  }

  /* Right side: previous photo / next photo / counter. Do not reserve a Files
   * column when Files is hidden; that empty track was one source of the visual
   * misalignment in the annotated screenshot. */
  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:absolute!important;
    right:0!important;
    left:auto!important;
    top:auto!important;
    bottom:5px!important;
    width:max-content!important;
    max-width:calc(100% - 108px)!important;
    min-height:42px!important;
    height:42px!important;
    display:grid!important;
    grid-template-columns:34px 34px minmax(94px,100px)!important;
    align-items:center!important;
    justify-content:end!important;
    gap:5px!important;
    margin:0!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:34px 34px minmax(94px,100px) 34px!important;
  }

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

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

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

  body.wxt-scene-developments [data-wxt-construct="developments.showcase.files.toggle"]{
    grid-column:4!important;
    grid-row:1!important;
    align-self:center!important;
    justify-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{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;
    margin:0!important;
    padding:0!important;
    align-self:center!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-position,
  body.wxt-scene-developments .wxt-development-showcase__project-position{
    width:100px!important;
    min-width:94px!important;
    max-width:100px!important;
    height:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0 8px!important;
    align-self:center!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-files-toggle,
  body.wxt-scene-developments .wxt-development-files-toggle{
    width:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    margin:0!important;
    padding:0!important;
    align-self:center!important;
    justify-content:center!important;
  }
}

@media (max-width:359px){
  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:30px 30px minmax(72px,88px)!important;
    max-width:calc(100% - 104px)!important;
    gap:4px!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:30px 30px minmax(72px,88px) 30px!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,
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-files-toggle,
  body.wxt-scene-developments .wxt-development-files-toggle{
    width:30px!important;
    min-width:30px!important;
    max-width:30px!important;
    height:30px!important;
    min-height:30px!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-position,
  body.wxt-scene-developments .wxt-development-showcase__project-position{
    width:88px!important;
    min-width:72px!important;
    max-width:88px!important;
  }
}
