/* Commonhand V90.34.4 — Provider mobile profile containment only.
   Intentionally scoped: does not alter global forms, auth/login, customer forms, or JS. */

@media (max-width: 760px) {
  /* Provider profile: checkbox/radio controls must never inherit the global input width:100%. */
  body.business-v13-mode [data-v13-view="profile"] input[type="checkbox"],
  body.business-v13-mode [data-v13-view="profile"] input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    flex: 0 0 18px !important;
    padding: 0 !important;
    margin: 1px 0 0 !important;
    box-sizing: border-box !important;
  }

  /* Capability/profile builder stacks naturally on phones. */
  body.business-v13-mode [data-v13-view="profile"] .profile-builder-grid,
  body.business-v13-mode [data-v13-view="profile"] .builder-checks,
  body.business-v13-mode [data-v13-view="profile"] .v79-fit-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.business-v13-mode [data-v13-view="profile"] .builder-check,
  body.business-v13-mode [data-v13-view="profile"] .v79-fit-checks label,
  body.business-v13-mode [data-v13-view="profile"] .business-v13-checkline {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    align-items: flex-start !important;
  }

  body.business-v13-mode [data-v13-view="profile"] .builder-check > span,
  body.business-v13-mode [data-v13-view="profile"] .v79-fit-checks label,
  body.business-v13-mode [data-v13-view="profile"] .v79-fit-checks label > span,
  body.business-v13-mode [data-v13-view="profile"] .business-v13-checkline > span {
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  body.business-v13-mode [data-v13-view="profile"] .capability-dropdown,
  body.business-v13-mode [data-v13-view="profile"] .builder-section,
  body.business-v13-mode [data-v13-view="profile"] .v79-business-fit {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }

  /* Customize Dashboard modal is appended outside the profile view, so scope it to its own backdrop. */
  .v48-customize-backdrop {
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  .v48-customize-backdrop .v48-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 24px) !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
  }

  .v48-customize-backdrop .v48-modal-head,
  .v48-customize-backdrop .v48-modal-body {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .v48-customize-backdrop .v48-checks {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .v48-customize-backdrop .v48-check {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    align-items: flex-start !important;
  }

  .v48-customize-backdrop .v48-check input[type="checkbox"],
  .v48-customize-backdrop .v48-check input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    flex: 0 0 18px !important;
    padding: 0 !important;
    margin: 1px 0 0 !important;
  }

  .v48-customize-backdrop .v48-check > span,
  .v48-customize-backdrop .v48-check {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}
