/* KBM Core 1.9.9-rc.57 — Submit/Dashboard Mobile Regression Recovery */

/* Focused submit routes must not inherit the global footer/app-bar/scroll-top shell. */


/* Remove the excessive reserved bottom area visible after the final button. */
body.kbm-clean-submit-app,
body.kbm-sdmr57-submit{min-height:100dvh!important;padding-bottom:0!important}
body.kbm-clean-submit-app .kbm-clean-shell{
  min-height:0!important;
  padding-bottom:max(22px,env(safe-area-inset-bottom,0px))!important;
}
body.kbm-clean-submit-app :is(.kbm-clean-form,.kbm-submit-recode,.kbm-submit-recode-form),
body.kbm-sdmr57-submit :is(.kbm-submit-recode,.kbm-submit-recode-form,.kbm-submit-form,form[data-kbm-submit]){
  min-height:0!important;
  padding-bottom:0!important;
  margin-bottom:0!important;
}

/* One canonical final action only. It remains inside normal document flow. */
body.kbm-clean-submit-app :is(.kbm-submit-recode-actions,[data-kbm-submit-actions]),
body.kbm-sdmr57-submit :is(.kbm-submit-recode-actions,[data-kbm-submit-actions]){
  position:static!important;
  inset:auto!important;
  z-index:auto!important;
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  margin:16px 0 0!important;
  padding:14px 0 0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  transform:none!important;
}
body.kbm-clean-submit-app :is(.kbm-submit-dock.kbm-pcm-generated-dock,.kbm-pcm-generated-dock),
body.kbm-sdmr57-submit :is(.kbm-submit-dock.kbm-pcm-generated-dock,.kbm-pcm-generated-dock){display:none!important}
body.kbm-clean-submit-app .kbm-submit-recode-submit,
body.kbm-sdmr57-submit .kbm-submit-recode-submit{
  position:static!important;
  width:100%!important;
  min-height:54px!important;
  margin:0!important;
  white-space:normal!important;
  line-height:1.65!important;
}

/* Do not allow an orphan primary +/ثبت tile to paint directly over dashboard content. */
body.kbm-sdmr57-dashboard > :is(.kbm-quf-app-bar__item--primary,[data-key="submit"]){display:none!important}

/* Dashboard card geometry: preserve horizontal writing and stop price letters stacking vertically. */
body.kbm-sdmr57-dashboard :is(
  .kbm-dashboard-recode-card,
  .kbm-dashboard-recode-card *,
  .kbm-dashboard-recode-commercial,
  .kbm-dashboard-recode-commercial *
){writing-mode:horizontal-tb!important;text-orientation:mixed!important}
body.kbm-sdmr57-dashboard .kbm-dashboard-recode-card{min-width:0!important;overflow:hidden!important}
body.kbm-sdmr57-dashboard .kbm-dashboard-recode-card-body{min-width:0!important;overflow:hidden!important}
body.kbm-sdmr57-dashboard .kbm-dashboard-recode-commercial{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:4px 9px!important;
  min-width:0!important;
}
body.kbm-sdmr57-dashboard :is(.kbm-dashboard-recode-commercial__price,.kbm-dashboard-recode-commercial strong,.kbm-dashboard-recode-card-price){
  display:inline-flex!important;
  align-items:baseline!important;
  max-width:100%!important;
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}
body.kbm-sdmr57-dashboard :is(.kbm-dashboard-recode-commercial__period,.kbm-dashboard-recode-commercial small){
  white-space:nowrap!important;
  word-break:keep-all!important;
}

@media(max-width:640px){
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-card{
    display:grid!important;
    grid-template-columns:112px minmax(0,1fr)!important;
    align-items:stretch!important;
    min-height:174px!important;
  }
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-card-media{
    width:112px!important;
    min-width:112px!important;
    height:100%!important;
    min-height:174px!important;
    max-height:none!important;
    aspect-ratio:auto!important;
  }
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-card-body{
    padding:11px!important;
    gap:7px!important;
  }
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-card-title{
    font-size:15px!important;
    line-height:1.65!important;
  }
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-commercial{
    padding:8px 9px!important;
    border-radius:12px!important;
  }
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    width:100%!important;
  }
}
@media(max-width:390px){
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-card{grid-template-columns:96px minmax(0,1fr)!important}
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-card-media{width:96px!important;min-width:96px!important;min-height:164px!important}
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-card-body{padding:9px!important}
  body.kbm-sdmr57-dashboard .kbm-dashboard-recode-commercial strong{font-size:13px!important}
}
