/* 1440MM Bathroom Calculator — mobile-only stabilization v1.
   Scope: kalkulator-adaptacije-kupaonice-osijek.html only.
   Desktop is intentionally untouched. */
@media (max-width:760px){
  body.mm-bath-premium-v2{
    --bath-mobile-gap:14px;
    --bath-mobile-pad:18px;
  }

  /* Keep all mobile calculator content within the viewport. */
  body.mm-bath-premium-v2 .bath-calc-shell,
  body.mm-bath-premium-v2 .bath-calc-card,
  body.mm-bath-premium-v2 .bath-step,
  body.mm-bath-premium-v2 .mm-mobile-panel,
  body.mm-bath-premium-v2 .bath-field,
  body.mm-bath-premium-v2 .bath-info{
    min-width:0!important;
    max-width:100%!important;
  }

  /* Phase photo: crop without distortion. The picture owns the ratio; the image fills it. */
  body.mm-bath-premium-v2 .bath-calc-mobile-stage{
    margin:0 0 18px!important;
    padding:8px!important;
    overflow:hidden!important;
  }
  body.mm-bath-premium-v2 .bath-calc-mobile-stage picture{
    display:block!important;
    width:100%!important;
    aspect-ratio:4/3!important;
    overflow:hidden!important;
    border-radius:16px!important;
    background:#0b0e12!important;
  }
  body.mm-bath-premium-v2 .bath-calc-mobile-stage picture img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    object-fit:cover!important;
    object-position:center 46%!important;
    border-radius:0!important;
  }
  body.mm-bath-premium-v2 .bath-calc-mobile-stage .bath-calc-visual__caption{
    margin:10px 8px 4px!important;
    font-size:.78rem!important;
    line-height:1.35!important;
  }

  /* Compact the upper status area without removing information. */
  body.mm-bath-premium-v2 .bath-premium-pulse{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  body.mm-bath-premium-v2 .bath-premium-time{
    justify-self:start!important;
  }
  body.mm-bath-premium-v2 .bath-calc-progress{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:9px 12px!important;
    margin-bottom:14px!important;
    padding:12px!important;
  }
  body.mm-bath-premium-v2 .bath-premium-live-strip{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  body.mm-bath-premium-v2 .bath-premium-live-strip span{
    width:100%!important;
    padding:8px 11px!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  /* Question panels and inputs: one readable column. */
  body.mm-bath-premium-v2 .mm-mobile-panel{
    padding:var(--bath-mobile-pad)!important;
    border-radius:18px!important;
  }
  body.mm-bath-premium-v2 .mm-mobile-panel + .mm-mobile-panel{
    margin-top:var(--bath-mobile-gap)!important;
  }
  body.mm-bath-premium-v2 .bath-option-grid,
  body.mm-bath-premium-v2 .bath-field-grid,
  body.mm-bath-premium-v2 .mm-mobile-split-grid{
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
  }
  body.mm-bath-premium-v2 .bath-option{
    min-height:0!important;
    padding:15px 14px 15px 46px!important;
  }
  body.mm-bath-premium-v2 .bath-field :is(input,select,textarea){
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  body.mm-bath-premium-v2 .bath-consent{
    display:grid!important;
    grid-template-columns:24px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:start!important;
    line-height:1.5!important;
  }
  body.mm-bath-premium-v2 .bath-consent input{
    width:22px!important;
    height:22px!important;
    margin:2px 0 0!important;
  }

  /* Final explanatory cards: stack them; never squeeze paragraphs into three narrow columns. */
  body.mm-system-v3.mm-bath-premium-v2 main .bath-info-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
    align-items:start!important;
  }
  body.mm-bath-premium-v2 main .bath-info,
  body.mm-bath-premium-v2 main .bath-info:last-child{
    grid-column:auto!important;
    width:auto!important;
    min-height:0!important;
    height:auto!important;
    padding:20px!important;
    overflow:visible!important;
  }
  body.mm-bath-premium-v2 main .bath-info h3{
    margin:0 0 10px!important;
    font-size:1.08rem!important;
    line-height:1.25!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.mm-bath-premium-v2 main .bath-info :is(p,li){
    font-size:.96rem!important;
    line-height:1.58!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
  }
  body.mm-bath-premium-v2 main .bath-info ul{
    margin:0!important;
    padding-left:1.25rem!important;
  }

  /* Fixed action dock remains available only while the calculator itself is in view. */
  body.mm-bath-premium-v2 .bath-premium-dock{
    transition:opacity .18s ease,transform .18s ease,visibility .18s ease!important;
  }
  body.mm-bath-premium-v2 .bath-premium-dock.is-outside-calc,
  body.mm-bath-premium-v2 .bath-premium-dock.is-consent-open{
    opacity:0!important;
    visibility:hidden!important;
    transform:translateY(18px)!important;
    pointer-events:none!important;
  }
  body.mm-bath-premium-v2 .bath-calc-card{
    padding-bottom:104px!important;
  }
}

@media (max-width:390px){
  body.mm-bath-premium-v2 .bath-calc-mobile-stage picture{
    aspect-ratio:1.28/1!important;
  }
  body.mm-bath-premium-v2 .bath-step>h2{
    font-size:clamp(30px,9.6vw,40px)!important;
  }
}
