/* Livespace Furniture Child 2.0.5
 * My Account DOM-order correction and spacing cleanup.
 * Woo/account templates in the parent framework may output account content
 * before navigation; assign grid areas explicitly so presentation never
 * depends on source order. Header intentionally untouched.
 */

html body.lsf-site.lsf-child-theme .live-space-account-v5{
  width:min(calc(100% - 48px),1380px)!important;
  padding:34px 0 56px!important;
}

html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-heading{
  margin-bottom:20px!important;
  padding-bottom:18px!important;
  gap:20px!important;
}

html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-heading h1{
  font-size:clamp(2.55rem,3.8vw,3.7rem)!important;
  line-height:.98!important;
}

html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-native > .woocommerce,
html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-native .woocommerce{
  display:grid!important;
  grid-template-columns:210px minmax(0,1fr)!important;
  grid-template-areas:"nav content"!important;
  align-items:start!important;
  gap:20px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}

/* Explicit placement fixes parent/Woo templates whose source order is content → navigation. */
html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-navigation{
  grid-area:nav!important;
  grid-column:1!important;
  grid-row:1!important;
  float:none!important;
  width:100%!important;
  min-width:0!important;
  position:sticky!important;
  top:148px!important;
  align-self:start!important;
  margin:0!important;
  padding:7px!important;
}

html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-content{
  grid-area:content!important;
  grid-column:2!important;
  grid-row:1!important;
  float:none!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:20px!important;
}

html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-navigation li a{
  min-height:40px!important;
  padding:0 11px!important;
  font-size:12px!important;
}

/* No downloadable catalogue is currently sold; avoid an empty destination in the customer menu. */
html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-navigation-link--downloads{
  display:none!important;
}

html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-overview{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0 0 14px!important;
}

html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-overview a{
  min-height:86px!important;
  padding:13px!important;
}

html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-support{
  width:calc(100% - 230px)!important;
  margin:16px 0 0 auto!important;
  padding:14px 16px!important;
}

/* Reset legacy pseudo-clears/floats that can manufacture blank account space. */
html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-native .woocommerce::before,
html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-native .woocommerce::after{
  display:none!important;
  content:none!important;
}

@media (max-width:980px){
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-native > .woocommerce,
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-native .woocommerce{
    grid-template-columns:1fr!important;
    grid-template-areas:"nav" "content"!important;
    gap:12px!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-navigation{
    grid-column:1!important;
    grid-row:1!important;
    position:static!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-content{
    grid-column:1!important;
    grid-row:2!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-navigation ul{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:4px!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-navigation li a{
    justify-content:center!important;
    text-align:center!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-support{
    width:100%!important;
  }
}

@media (max-width:700px){
  html body.lsf-site.lsf-child-theme .live-space-account-v5{
    width:min(calc(100% - 28px),1380px)!important;
    padding:26px 0 44px!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-heading h1{
    font-size:2.55rem!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-navigation ul{
    grid-template-columns:1fr 1fr!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-navigation li:last-child{
    grid-column:1 / -1!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .woocommerce-MyAccount-content{
    padding:15px!important;
  }
  html body.lsf-site.lsf-child-theme .live-space-account-v5 .lsf-account-overview{
    grid-template-columns:1fr!important;
  }
}
