/* JKA Dealer Portal v1.6.26 — direct-pair card geometry hardening
   Removes Bootstrap column wrappers from paired settings cards. The paired cards
   are now the direct grid items, so equal-height behavior is deterministic.
   Shorter cards use their available body height instead of leaving a dead block. */

/* Settings pair geometry: direct card children only. */
body.homeaid-system .system-settings-page .settings-card-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:.78rem!important;
  width:100%!important;
  min-width:0!important;
}
body.homeaid-system .system-settings-page .settings-card-pair{
  display:grid!important;
  align-items:stretch!important;
  grid-auto-rows:1fr!important;
  gap:.78rem!important;
  width:100%!important;
  min-width:0!important;
}
body.homeaid-system .system-settings-page .settings-identity-pair{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
body.homeaid-system .system-settings-page .settings-product-support-pair{
  grid-template-columns:minmax(0,7fr) minmax(0,5fr)!important;
}
body.homeaid-system .system-settings-page .settings-card-pair > .settings-card{
  display:flex!important;
  flex-direction:column!important;
  align-self:stretch!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  min-height:0!important;
  height:100%!important;
  margin:0!important;
}
body.homeaid-system .system-settings-page .settings-card-pair > .settings-card > .premium-card-head{
  flex:0 0 auto!important;
}
body.homeaid-system .system-settings-page .settings-card-pair > .settings-card > .premium-card-body{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  min-height:0!important;
  height:auto!important;
}
body.homeaid-system .system-settings-page .settings-card-pair .settings-fields{
  flex:1 1 auto!important;
  min-height:0!important;
  margin:0!important;
}

/* First row: let System description absorb the real height difference. */
body.homeaid-system .system-settings-page .settings-fields-system{
  display:grid!important;
  grid-template-columns:minmax(0,2fr) minmax(0,1fr)!important;
  grid-template-rows:auto minmax(120px,1fr) auto!important;
  gap:.68rem!important;
  height:100%!important;
  align-items:stretch!important;
}
body.homeaid-system .system-settings-page .settings-fields-system > *{
  width:auto!important;
  max-width:none!important;
  padding:0!important;
  margin:0!important;
}
body.homeaid-system .system-settings-page .settings-fields-system > .col-md-8{grid-column:1!important}
body.homeaid-system .system-settings-page .settings-fields-system > .col-md-4{grid-column:2!important}
body.homeaid-system .system-settings-page .settings-fields-system > .col-12{
  grid-column:1/-1!important;
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
}
body.homeaid-system .system-settings-page .settings-fields-system > .col-12 textarea{
  flex:1 1 auto!important;
  width:100%!important;
  min-height:110px!important;
  height:100%!important;
  max-height:none!important;
  resize:vertical!important;
}
body.homeaid-system .system-settings-page .settings-fields-system > .col-md-6{
  width:auto!important;
  max-width:none!important;
  padding:0!important;
  margin:0!important;
}
body.homeaid-system .system-settings-page .settings-fields-company{
  align-content:start!important;
  row-gap:.68rem!important;
}

/* Product/Support row: Support card is the shorter content set. Spread its real
   controls through the matched body height so no unused bottom slab remains. */
body.homeaid-system .system-settings-page .settings-fields-support{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  gap:.64rem!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
}
body.homeaid-system .system-settings-page .settings-fields-support > *{
  flex:0 0 auto!important;
  width:100%!important;
  max-width:none!important;
  padding:0!important;
  margin:0!important;
}
body.homeaid-system .system-settings-page .settings-fields-product{
  align-content:start!important;
  row-gap:.68rem!important;
}
body.homeaid-system .system-settings-page .settings-fields-product textarea{
  min-height:76px!important;
}

/* Keep the save bar and the next section visually attached to the settings rows. */
body.homeaid-system .system-settings-page .settings-save-bar{
  width:100%!important;
  margin-top:.7rem!important;
}
body.homeaid-system .system-settings-page .notification-settings-card{
  margin-top:.7rem!important;
}

/* Email Center: keep paired cards exactly equal on desktop and use their body
   space instead of creating an empty lower band. */
body.homeaid-system .email-center-v1619 .email-compose-settings-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:1fr!important;
  align-items:stretch!important;
}
body.homeaid-system .email-center-v1619 .email-compose-settings-grid > .premium-card{
  align-self:stretch!important;
  height:100%!important;
}
body.homeaid-system .email-center-v1619 .email-compose-card .premium-card-body,
body.homeaid-system .email-center-v1619 .email-preferences-card .premium-card-body{
  height:100%!important;
}
body.homeaid-system .email-center-v1619 .email-compose-card .premium-card-body > form{
  height:100%!important;
}
body.homeaid-system .email-center-v1619 .email-compose-card .email-message-field,
body.homeaid-system .email-center-v1619 .email-compose-card .email-compose-message{
  min-height:0!important;
}

/* Tablet/mobile: cards stack and return to natural height. */
@media(max-width:1199.98px){
  body.homeaid-system .system-settings-page .settings-card-pair,
  body.homeaid-system .system-settings-page .settings-identity-pair,
  body.homeaid-system .system-settings-page .settings-product-support-pair,
  body.homeaid-system .email-center-v1619 .email-compose-settings-grid{
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:auto!important;
  }
  body.homeaid-system .system-settings-page .settings-card-pair > .settings-card,
  body.homeaid-system .email-center-v1619 .email-compose-settings-grid > .premium-card{
    height:auto!important;
  }
  body.homeaid-system .system-settings-page .settings-fields-system{
    display:flex!important;
    flex-direction:column!important;
    height:auto!important;
  }
  body.homeaid-system .system-settings-page .settings-fields-system > *{
    width:100%!important;
  }
  body.homeaid-system .system-settings-page .settings-fields-system > .col-12 textarea{
    min-height:92px!important;
    height:auto!important;
  }
  body.homeaid-system .system-settings-page .settings-fields-support{
    display:grid!important;
    height:auto!important;
    justify-content:initial!important;
  }
}

@media(max-width:575.98px){
  body.homeaid-system .system-settings-page .settings-card-layout,
  body.homeaid-system .system-settings-page .settings-card-pair{gap:.56rem!important}
  body.homeaid-system .system-settings-page .settings-save-bar,
  body.homeaid-system .system-settings-page .notification-settings-card{margin-top:.56rem!important}
}
