/* WebXtent v0.8.106 — Developments phone gallery optimisation.
 *
 * Keeps the accepted full-bleed stage, project wheel, navy frosted material and
 * gesture runtime, while giving the photo gallery a deliberate phone-native
 * layout: larger readable cards, a visible next-card peek, balanced controls,
 * and a taller title-to-gallery safety zone.
 */

@media (max-width:767px){

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-carousel,
  body.wxt-scene-developments .wxt-development-showcase__project-carousel{
    left:12px!important;
    right:12px!important;
    bottom:max(var(--wxt-dev-mobile-gallery-bottom,16px),env(safe-area-inset-bottom,0px))!important;
    gap:9px!important;
    padding:10px 10px 11px!important;
    border-radius:22px!important;
  }

  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{
    gap:8px!important;
  }

  /* Keep the project controls where the accepted v0.8.94 wheel places them,
   * while making the photo-navigation row read naturally as back / count / 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{
    display:grid!important;
    grid-template-columns:42px minmax(64px,1fr) 42px auto!important;
    align-items:center!important;
    width:100%!important;
    gap:7px!important;
  }

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

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

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

  body.wxt-scene-developments [data-wxt-construct="developments.showcase.files.toggle"]{
    grid-column:4!important;
    grid-row:1!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:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    border-radius:13px!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:100%!important;
    min-width:64px!important;
    min-height:42px!important;
    padding:0 10px!important;
    border:1px solid rgba(220,237,247,.12)!important;
    border-radius:13px!important;
    background:rgba(255,255,255,.045)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.055)!important;
    font-size:.92rem!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-files-toggle,
  body.wxt-scene-developments .wxt-development-files-toggle{
    min-height:42px!important;
    height:42px!important;
    border-radius:13px!important;
  }

  /* Phone-native filmstrip: one clear card plus a partial next card. This makes
   * horizontal swiping discoverable without shrinking the project photography. */
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-track,
  body.wxt-scene-developments .wxt-development-showcase__project-track{
    gap:var(--wxt-dev-mobile-gallery-gap,8px)!important;
    padding:2px 16% 3px 1px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x mandatory!important;
    scroll-padding-inline:1px!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  body.wxt-scene-developments .wxt-development-showcase__project-track::-webkit-scrollbar{
    display:none;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase button.wxt-development-stack-card,
  body.wxt-scene-developments .wxt-development-showcase button.wxt-development-stack-card{
    flex:0 0 var(--wxt-dev-mobile-gallery-card-width,74%)!important;
    width:var(--wxt-dev-mobile-gallery-card-width,74%)!important;
    min-height:var(--wxt-dev-mobile-gallery-card-height,104px)!important;
    height:var(--wxt-dev-mobile-gallery-card-height,104px)!important;
    border-radius:14px!important;
    scroll-snap-align:start!important;
    scroll-snap-stop:always;
    opacity:.76!important;
    transition:opacity .2s ease,border-color .2s ease,box-shadow .2s ease!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase button.wxt-development-stack-card.is-active,
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase button.wxt-development-stack-card[aria-current="true"],
  body.wxt-scene-developments .wxt-development-showcase button.wxt-development-stack-card.is-active,
  body.wxt-scene-developments .wxt-development-showcase button.wxt-development-stack-card[aria-current="true"]{
    opacity:1!important;
  }

  body.wxt-scene-developments .wxt-development-stack-card__media,
  body.wxt-scene-developments .wxt-development-stack-card__media img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }

  body.wxt-scene-developments .wxt-development-stack-card__copy{
    left:9px!important;
    right:9px!important;
    bottom:8px!important;
    display:flex!important;
    align-items:flex-end!important;
    gap:7px!important;
    min-width:0!important;
  }

  body.wxt-scene-developments .wxt-development-stack-card__copy small{
    flex:0 0 auto!important;
    min-width:25px!important;
    height:20px!important;
    padding:0 6px!important;
    font-size:7.5px!important;
  }

  body.wxt-scene-developments .wxt-development-showcase[data-wxt-gallery-captions="1"] .wxt-development-stack-card__copy strong{
    display:block!important;
    min-width:0!important;
    max-width:22ch!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    color:rgba(255,255,255,.92)!important;
    font-size:9.5px!important;
    font-weight:650!important;
    line-height:1.15!important;
    letter-spacing:.01em!important;
    text-shadow:0 1px 10px rgba(0,0,0,.45)!important;
  }

  body.wxt-scene-developments .wxt-development-showcase[data-wxt-gallery-captions="0"] .wxt-development-stack-card__copy strong{
    display:none!important;
  }

  /* The larger phone gallery needs an explicit safe zone for the project wheel.
   * This prevents the current/adjacent project titles from colliding with the tray. */
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__hero-copy,
  body.wxt-scene-developments .wxt-development-showcase__hero-copy{
    bottom:calc(var(--wxt-dev-mobile-gallery-card-height,104px) + 136px)!important;
  }
}

@media (max-width:380px){
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__project-carousel,
  body.wxt-scene-developments .wxt-development-showcase__project-carousel{
    left:9px!important;
    right:9px!important;
    padding:9px!important;
  }

  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(56px,1fr) 40px auto!important;
    gap:6px!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:40px!important;
    height:40px!important;
    min-width: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,
  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-files-toggle,
  body.wxt-scene-developments .wxt-development-files-toggle{
    min-height:40px!important;
    height:40px!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase button.wxt-development-stack-card,
  body.wxt-scene-developments .wxt-development-showcase button.wxt-development-stack-card{
    flex-basis:min(80%,var(--wxt-dev-mobile-gallery-card-width,74%))!important;
    width:min(80%,var(--wxt-dev-mobile-gallery-card-width,74%))!important;
  }

  html.wxt-developments-mobile-viewport body.wxt-scene-developments .wxt-development-showcase__hero-copy,
  body.wxt-scene-developments .wxt-development-showcase__hero-copy{
    bottom:calc(var(--wxt-dev-mobile-gallery-card-height,104px) + 130px)!important;
  }
}

@media (max-width:767px) and (prefers-reduced-motion:reduce){
  body.wxt-scene-developments .wxt-development-showcase button.wxt-development-stack-card{
    transition:none!important;
  }
}
